Skip to content

Fix ⌘ shortcut hints overlapping header buttons - #5869

Merged
ymichael merged 2 commits into
mainfrom
fix/shortcut-hints-header-overlap
Oct 20, 2026
Merged

ymichael merged 2 commits into
mainfrom
fix/shortcut-hints-header-overlap

Conversation

@ymichael

@ymichael ymichael commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Holding ⌘ shows shortcut pills, and the icon-only chrome buttons drew theirs outside their own bounds: the sidebar toggle's pill was absolute left-full, the back/forward pair was absolute right-full of the arrows, and the right-panel toggle's pill was absolute right-full, absolute top-full, or an inline sibling depending on the surface. Each assumed the space beside it was empty. The rail navigation (#5584) puts New thread, with its own ⇧⌘O pill, directly in that space, so ⌘ \ covered the New thread icon and ⌘[ ⌘] stacked on top of ⇧⌘O. In a thread, the inline ⌘J pushed the close and open-in-editor buttons sideways, and with the panel open the hide-panel ⌘J landed on the maximize button.

What changed

  • Sidebar toggle and back/forward: no held-modifier pill, matching the rail's own icon buttons. Their shortcut stays in the accessible label, and in the existing tooltip for back/forward.
    • AppLayout.tsx: the sidebar toggle hint is removed from all three header layouts (framed, macOS desktop chrome, browser overlay).
    • SidebarHistoryNavigationControls.tsx: the floating ⌘[ ⌘] pair is deleted.
  • Right-panel toggle (⌘J): the hint is kept but moved under the button, right-aligned, on every surface: RootComposeView.tsx, ThreadDetailHeader.tsx, ThreadSecondaryPanel.tsx, and SplitWorkspaceSecondaryPanelHost.tsx (which already used this placement). One constant, RIGHT_PANEL_TOGGLE_SHORTCUT_HINT_CLASS in panelToggleControlState.ts, holds the placement; z-10 keeps it above the open panel's body.
  • Pills inside wide, labeled controls are unchanged: New thread, model picker, composer focus, open-in-editor, thread rows ⌃1–9.

No wire, CLI, plugin API, or data changes.

How you verified

  • Real dev server with a connected host and seeded threads, ⌘ held at 1280×860, main (9e5c8a9) vs this branch on the same data. Home: main overlaps ⌘ \ with the New thread icon and ⌘[ ⌘] with ⇧⌘O; the branch shows only New thread's pill. Thread header: main's inline ⌘J shifts the close and open-in-editor buttons; the branch shows ⌘J under the toggle and the buttons stay put. Panel open: main's ⌘J lands on the maximize button; the branch shows it under the hide button, clear of maximize (without z-10 the panel body painted over it).
  • Adjacent pills still appear while ⌘ is held on the branch: ⇧⌘O, ⌃1–⌃3, ⇧⌘C, ⇧⌘M, ⌘O, and ⌘J on home, thread, and the open panel.
  • Controls still work: the sidebar toggle flips aria-expanded both ways; back/forward navigate between home and a thread; the back tooltip shows ⌘ [; ⌘J opens the panel and the hide button closes it; labels read Toggle sidebar (⌘ \) and Hide right panel (⌘ J).
  • pnpm exec turbo run typecheck lint --filter=@bb/app passes. vitest run src/components src/views in apps/app: 4386 passed, 3 skipped. The test that asserted the floating back/forward pair appears while ⌘ is held is deleted with the behavior it covered.

AGENT GENERATED

The sidebar toggle, back/forward arrows, and right-panel toggle drew
their held-modifier shortcut pills outside their own bounds. With the
rail navigation, New thread and its own hint sit in that space, so the
toggle's hint covered the New thread icon and the history hints stacked
on top of New thread's hint.

Icon-only buttons now follow the rail: no held-modifier pill, with the
shortcut kept in the accessible label (and the tooltip for back/forward).
Labeled controls keep their in-place pills.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael force-pushed the fix/shortcut-hints-header-overlap branch from b285c9f to d7def42 Compare October 20, 2026 17:16
The right-panel toggle's held-modifier hint now sits below the button,
right-aligned, on every surface that draws the toggle (home, thread
header, open panel, split workspace). That strip under the header is
empty, so the pill neither covers a sibling button nor shifts the header
actions. z-10 keeps it above the open panel's body.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit 81b48d3 into main Oct 20, 2026
28 checks passed
@ymichael
ymichael deleted the fix/shortcut-hints-header-overlap branch October 20, 2026 18:00
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