Skip to content

fix(ui): show sidebar tooltip shortcuts as keycap chips - #178084

Merged
roboclaw-bot merged 2 commits into
mainfrom
fix/sidebar-tooltip-kbd-shortcuts
Oct 20, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
fix/sidebar-tooltip-kbd-shortcuts

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

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

ShortcutHint was the shared tooltip helper, and it was the code that added the parentheses. It now renders the label, a space, and a .shortcut-hint__keys keycap (a tinted chip in kbd.css). The space keeps the announced or description text as "Label ⌘B". The sidebar controls that built their own Label (⌘B) strings (rail title attributes, the collapse toggle, and the collapsed-shell controls) now use ShortcutHint inside openclaw-tooltip. Its display: contents wrapper 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

Before: New conversation tooltip with parenthesized shortcut

After: New conversation

After: New conversation tooltip with keycap chip

Before: active rail view

Before: Sessions collapse tooltip with parenthesized shortcut

After: active rail view

After: Sessions collapse tooltip with keycap chip

After: light theme, non-Apple platform

After: light theme, Ctrl+Shift+O keycap

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.
  • UI E2E: 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 on kbd.css, and the oxfmt check are all clean.
  • Autoreview (Codex, P0–P2) found no actionable findings.

E2E updates that follow the new markup: the tooltip text assertions now expect Label ⌘B without parentheses, and the native-nav focus test reads the slotted tooltip content. Two more changes came from the first CI run (boot-module-boundaries and native-nav-responsive-layout). The rail search tooltip is now located through its wrapping openclaw-tooltip, and the session-menu click targets the menuitem role, because the hidden tooltip label shares that text. Both files pass locally (21 tests). The check-test-types-core-1 failure in the first run is in untouched session-scoped-delivery.e2e.test.ts, which #178096 fixed on main.

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]>
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 20, 2026 05:12
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces parenthesized sidebar shortcut hints with shared keycap chips.

Example: Hover New conversation on macOS.

  • Before: The tooltip displays New conversation (⌘⇧O).
  • After: The tooltip displays New conversation followed by a tinted ⌘⇧O keycap.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The visual result is directly demonstrated, but two diff-caused E2E failures prevent a clean validation verdict.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser screenshots from the mock Control UI show ShortcutHint rendering New conversation and Sessions with keycap chips instead of parentheses; the additional light-theme image shows the non-Apple Ctrl+Shift+O treatment.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Sidebar shortcut hints use parentheses instead of the requested keycap treatment.
Reason: This maintainer-authored PR supplies direction for the visual preference and reuses existing presentation owners.

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
Reviewed head: f013e14f0b9921f7aadc9304c8d4f027f82289e9

Before merge

  • Update the cold-tooltip test to locate the explicit tooltip owner (P2) - Wrapping .sidebar-brand__search in an explicit tooltip removes its title-preview ownership path. Explicit tooltips resolve the child trigger through TooltipOwner and leave host.anchor null, so this lookup returns no host. Exact-head CI fails at the following popupId assertion on both platforms, before exercising lazy reveal and dismissal. Locate the trigger's owning tooltip and retain the held-module, description, reveal, and Escape assertions.
  • Scope the compact-search click to the menu item (P2) - The new slotted ShortcutHint adds a span whose exact text is Open command palette. Opening the compact chat menu now leaves two matches for this global text locator: the tooltip label and the actual menu item. Exact-head CI reports that strict-mode violation for the desktop case. Select the command-palette menu item by role or scope the locator to the open menu.

Findings

  • [P2] Update the cold-tooltip test to locate the explicit tooltip owner — ui/src/e2e/typography-module-boundaries.test-support.ts:37-43
  • [P2] Scope the compact-search click to the menu item — ui/src/e2e/native-nav-responsive-layout.e2e.test.ts:136
Agent review details

How this fits together

Control 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]
Loading

Technical review

Best 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:

  • [P2] Update the cold-tooltip test to locate the explicit tooltip owner — ui/src/e2e/typography-module-boundaries.test-support.ts:37-43
    Wrapping .sidebar-brand__search in an explicit tooltip removes its title-preview ownership path. Explicit tooltips resolve the child trigger through TooltipOwner and leave host.anchor null, so this lookup returns no host. Exact-head CI fails at the following popupId assertion on both platforms, before exercising lazy reveal and dismissal. Locate the trigger's owning tooltip and retain the held-module, description, reveal, and Escape assertions.
    Confidence: 1
  • [P2] Scope the compact-search click to the menu item — ui/src/e2e/native-nav-responsive-layout.e2e.test.ts:136
    The new slotted ShortcutHint adds a span whose exact text is Open command palette. Opening the compact chat menu now leaves two matches for this global text locator: the tooltip label and the actual menu item. Exact-head CI reports that strict-mode violation for the desktop case. Select the command-palette menu item by role or scope the locator to the open menu.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 578578cdeca9.

Provenance checked

  • Shared shortcut-hint presentation changes intended behavior with a stated reason (41b7727: The Solid cutover preserved existing appearance while consolidating shortcut hints into the tooltip rich-content slot.)
  • Shared keyboard rendering and context styling keeps the original intent (7bd414f: Shared glyph rendering standardized alignment while retaining context-owned bare, filled, or bordered treatments.)
  • Rail and shell control behavior keeps the original intent (improve(ui): align desktop app titlebar controls with the navigation rail #171131: Native and web navigation controls retain their established placement, shortcuts, and actions; this PR changes their hint renderer.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm exec vitest run --config ui/vitest.e2e.config.ts ui/src/e2e/boot-module-boundaries.e2e.test.ts ui/src/e2e/native-nav-responsive-layout.e2e.test.ts
  • pnpm exec oxlint ui/src/e2e/typography-module-boundaries.test-support.ts ui/src/e2e/native-nav-responsive-layout.e2e.test.ts
  • pnpm exec oxfmt --check ui/src/e2e/typography-module-boundaries.test-support.ts ui/src/e2e/native-nav-responsive-layout.e2e.test.ts

What I checked:

PR surface

Source +40, Tests +2. Total +42 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 127 87 +40
Tests 3 9 7 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 136 94 +42

Labels

Label changes:

  • add P3: The requested change is visual consistency polish; the confirmed blockers are focused E2E selector repairs.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: The requested change is visual consistency polish; the confirmed blockers are focused E2E selector repairs.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

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]>
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 20, 2026 05:46
@roboclaw-bot
roboclaw-bot merged commit a876cbb into main Oct 20, 2026
98 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/sidebar-tooltip-kbd-shortcuts branch October 20, 2026 05:56
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
)

* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant