Repository navigation
fix(ui): show sidebar tooltip shortcuts as keycap chips - #178084
Conversation
Sidebar tooltips appended shortcuts in parentheses ("New conversation (⌘N)").
ShortcutHint now renders the label followed by a keycap chip, and the sidebar
controls that built parenthesized strings (rail views, rail search, collapse
toggle, collapsed-shell expand/search/home) use ShortcutHint.
Co-authored-by: Patrick-Erichsen <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR replaces parenthesized sidebar shortcut hints with shared keycap chips. Example: Hover New conversation on macOS.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: the maintainer-directed visual change is demonstrated, but two E2E consumers need updates for the new tooltip markup. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherControl UI sidebar and shell controls pass translated labels and shortcut combinations through ShortcutHint into the existing tooltip owner, which renders visual hints and accessible descriptions. flowchart LR
A[Sidebar and shell controls] --> B[ShortcutHint]
C[Shortcut contract] --> B
B --> D[KeyboardShortcut]
B --> E[Tooltip content slot]
E --> F[Tooltip owner]
F --> G[Visible hint and accessible description]
Technical reviewBest possible solution: Keep the shared keycap implementation and adapt the cold-tooltip and responsive-search E2E selectors without weakening their behavioral assertions. Do we have a high-confidence way to reproduce the issue? Current-main source and inspected before screenshots establish the parenthesized presentation; exact-head CI independently demonstrates the two introduced selector failures, without running target code locally. Is this the best way to solve the issue? The patch uses the existing shortcut and tooltip owners, preserves action handlers and accessible names, and needs only focused consumer-test updates. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 578578cdeca9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +40, Tests +2. Total +42 across 9 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 20, 2026, 1:29 AM ET / 05:29 UTC. |
The rail search tooltip is now a wrapping openclaw-tooltip instead of a title-anchored one, and its slotted label shares text with the session menu item, so locate both by structure and role. Co-authored-by: Patrick-Erichsen <[email protected]>
|
Merged via squash auto-merge.
|
) * fix(ui): show sidebar tooltip shortcuts as keycap chips Sidebar tooltips appended shortcuts in parentheses ("New conversation (⌘N)"). ShortcutHint now renders the label followed by a keycap chip, and the sidebar controls that built parenthesized strings (rail views, rail search, collapse toggle, collapsed-shell expand/search/home) use ShortcutHint. Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): follow sidebar tooltips into their openclaw-tooltip wrappers The rail search tooltip is now a wrapping openclaw-tooltip instead of a title-anchored one, and its slotted label shares text with the session menu item, so locate both by structure and role. Co-authored-by: Patrick-Erichsen <[email protected]> --------- Co-authored-by: Patrick-Erichsen <[email protected]>
What Problem This Solves
Sidebar tooltips showed keyboard shortcuts as parenthesized text, e.g. "New conversation (⌘⇧O)", instead of the keycap style used elsewhere.
Requested by @Patrick-Erichsen.
Work sessions
User Impact
User impact: sidebar tooltips now show the label followed by a keycap chip (for example, New conversation
⌘⇧O) with no parentheses. This applies to New conversation, the rail view toggles, the rail search button, Collapse sidebar, the Home toggle, and the collapsed-sidebar Expand/Search/Home controls. Accessible names don't change.Why This Change Was Made
ShortcutHintwas the shared tooltip helper, and it was the code that added the parentheses. It now renders the label, a space, and a.shortcut-hint__keyskeycap (a tinted chip inkbd.css). The space keeps the announced or description text as "Label ⌘B". The sidebar controls that built their ownLabel (⌘B)strings (railtitleattributes, the collapse toggle, and the collapsed-shell controls) now useShortcutHintinsideopenclaw-tooltip. Itsdisplay: contentswrapper doesn't change layout.Evidence
Mock Control UI (
pnpm dev:ui:mock) in dark theme. Each control is hovered, with a macOS platform override so the glyphs match the request.Before: New conversation
After: New conversation
Before: active rail view
After: active rail view
After: light theme, non-Apple platform
Checks run locally on the PR head:
pnpm test ui/src/components/solid/kbd.test.tsx ui/src/components/app-sidebar-rail.test.ts ui/src/components/tooltip.test.ts --maxWorkers=1: 74 passed in about 23s wall time.pnpm test ui/src/components/app-sidebar.interactions.test.ts ui/src/components/sidebar-attention-layout.browser.test.ts --maxWorkers=1: passed.chat-message-actions(header tooltip case),native-nav-sidebar-toggle,sidebar-rail,sidebar-rail-alignment,native-page-header-clearance,native-desktop-titlebar,sidebar-new-conversation: all passed (39 tests across the 6 sidebar and titlebar files, plus the message-actions case).pnpm tsgo:ui, oxlint on the touched files (one existing warning in untouched code), stylelint onkbd.css, and the oxfmt check are all clean.E2E updates that follow the new markup: the tooltip text assertions now expect
Label ⌘Bwithout parentheses, and the native-nav focus test reads the slotted tooltip content. Two more changes came from the first CI run (boot-module-boundariesandnative-nav-responsive-layout). The rail search tooltip is now located through its wrappingopenclaw-tooltip, and the session-menu click targets themenuitemrole, because the hidden tooltip label shares that text. Both files pass locally (21 tests). Thecheck-test-types-core-1failure in the first run is in untouchedsession-scoped-delivery.e2e.test.ts, which #178096 fixed on main.