Skip to content

test(tui): cover home hint placement alignment (#55) - #59

Merged
quickbeard merged 2 commits into
mainfrom
test-home-placement
Jul 13, 2026
Merged

quickbeard merged 2 commits into
mainfrom
test-home-placement

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Summary

Adds a unit test for the placement threading introduced in #55 (flow transcript with a top-left banner). The home_bottom slot props gained placement?: "center" | "start", and the session banner passes placement="start" to left-align the hint under the logo while the home route keeps the centered layout.

The which-key HomeHint is now exported so its placement-driven alignment can be rendered in isolation; no behavior change.

Tests

test/feature-plugins/which-key-home-hint.test.tsx renders HomeHint inside a keymap provider and measures the hint line's left indentation in the captured frame:

  • placement="start" → the hint sits at column 0 (left-aligned, as under the session banner).
  • default (no placement) → the hint is indented (centered, as on the home route).

Verification

  • bun test test/feature-plugins/which-key-home-hint.test.tsx — 2 pass.
  • bun typecheck in packages/tui — clean.

🤖 Generated with Claude Code

quickbeard and others added 2 commits July 13, 2026 20:23
Export the which-key HomeHint and add a render test asserting the home_bottom
hint left-aligns when placement is "start" (the top-left session banner) and
stays centered by default (the home route).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard merged commit 41cb331 into main Jul 13, 2026
4 of 5 checks passed
@quickbeard
quickbeard deleted the test-home-placement branch July 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant