fix(control-ui): add guarded dashboard shortcuts#84827
Conversation
|
Codex review: found issues before merge. Reviewed July 1, 2026, 2:53 AM ET / 06:53 UTC. Summary PR surface: Source +286, Tests +160, Docs +1. Total +447 across 44 files. Reproducibility: yes. at source level: current main checks open composer details and realtime Talk options before mobile controls, while the PR head's dismiss path closes mobile controls first. I did not run tests because this review is read-only. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a refreshed branch that keeps the centralized dispatcher, preserves current-main nested Escape dismissal priority, narrows the docs wording for Cmd/Ctrl+K, and closes the canonical shortcut issue after merge. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main checks open composer details and realtime Talk options before mobile controls, while the PR head's dismiss path closes mobile controls first. I did not run tests because this review is read-only. Is this the best way to solve the issue? No, not yet: the centralized dispatcher is a maintainable direction, but it needs the existing nested Escape branches, a docs correction, and a current-main refresh before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b2355ef6a226. Label changesLabel justifications:
Evidence reviewedPR surface: Source +286, Tests +160, Docs +1. Total +447 across 44 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
Pull request overview
Adds a centralized, guarded document-level keyboard shortcut dispatcher for the Control UI dashboard, enabling common chat actions without interfering with text entry fields or embedded editors.
Changes:
- Introduces
resolveDashboardShortcutAction()to map key events (/,N,Esc, Cmd/Ctrl+K) to app actions with editable-target guarding. - Wires the dispatcher into
OpenClawAppand implements focused handlers for toggling palette, focusing composer, scrolling to new messages, and dismissing transient UI. - Improves “New messages” discoverability with an on-button
<kbd>N</kbd>indicator and adds regression coverage for shortcut dispatch/guarding.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/ui/views/chat.ts | Adds Escape handling for the search bar input; updates “New messages” button UI/labels to show the N shortcut. |
| ui/src/ui/views/chat.test.ts | Adds a test asserting the new “New messages” shortcut discoverability and preserves click behavior. |
| ui/src/ui/navigation.browser.test.ts | Adds browser-level regression tests for global shortcut routing, editable no-op guarding, and Escape dismissal behavior. |
| ui/src/ui/app.ts | Replaces inline Cmd/Ctrl+K handler with centralized shortcut resolution and adds helper methods for the new actions. |
| ui/src/ui/app-keyboard-shortcuts.ts | New module implementing guarded shortcut-to-action resolution and editable-target detection. |
| ui/src/styles/chat/layout.css | Styles the new <kbd> indicator within the “New messages” button. |
| CHANGELOG.md | Documents the new guarded dashboard shortcuts feature. |
|
ClawSweeper PR egg: ✨ hatched 🥚 common Sunspot Crabkin. Rarity: 🥚 common. Trait: finds missing screenshots. DetailsShare on X: post this hatch
About:
|
d8b9c2b to
a3464db
Compare
350aa01 to
c8f37f6
Compare
|
@clawsweeper re-review Refreshed PR head to c8f37f6 and resolved the dirty merge state. Focused UI proof, i18n check, format, UI typecheck, and merge-tree are clean. Testbox changed gate tbx_01kspemnma51480h6q2bcwjwa3 is blocked by the current-main src/agents/tools/pdf-native-providers.test.ts core-test typecheck failure; the same command reproduces on pristine origin/main. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
c8f37f6 to
3bec2bc
Compare
|
@clawsweeper re-review Final refreshed head is 3bec2bc, rebased on current origin/main 4f26cc9. The dirty merge state is resolved, generated i18n was refreshed through the repo sync command, and the old changelog / installer-doc churn is gone. Focused Control UI tests, UI typecheck, i18n check, format/lint, diff check, and merge-tree are clean. Current red check is check-test-types in unrelated agent test files: src/agents/minimax-vlm.normalizes-api-key.test.ts and src/agents/tools/pdf-native-providers.test.ts. I reproduced the same failure on pristine origin/main with test/tsconfig/tsconfig.core.test.json, so this is not introduced by the Control UI shortcut diff. Testbox tbx_01kspf60p4nt0mn1ty963txesm detached/stalled before completion and was cancelled; details are in the PR body. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper review |
3bec2bc to
0aea33d
Compare
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Refreshes the guarded Control UI dashboard shortcuts for #81946 on current
origin/main./,N,Esc, and existing Cmd/Ctrl+K palette behavior.role="textbox", CodeMirror roots, and Monaco roots.chat.newMessages.*strings and regenerates locale bundles /.i18nmetadata withpnpm ui:i18n:sync.CHANGELOG.mdchurn and unrelateddocs/install/installer.mdtable churn.Duplicate/source PR #81958 is closed stale-unmerged, so this PR remains the active fix path.
Verification
Behavior addressed: guarded dashboard keyboard shortcuts for Control UI chat/navigation without stealing typing from editable fields.
Real environment tested: local OpenClaw worktree on branch
meow/refresh-84827-dashboard-shortcuts, rebased onorigin/main4f26cc9090, pushed as3bec2bcca39c35ac417f498a23cbc70ba1aeb6a6.Exact steps or command run after this patch:
node scripts/run-vitest.mjs ui/src/ui/navigation.browser.test.ts --reporter=verbosenode scripts/run-vitest.mjs ui/src/ui/views/chat.test.ts --reporter=verbosepnpm exec oxfmt --check --threads=1 docs/web/control-ui.md ui/src/i18n/locales/en.ts ui/src/styles/chat/layout.css ui/src/ui/app-keyboard-shortcuts.ts ui/src/ui/app.ts ui/src/ui/navigation.browser.test.ts ui/src/ui/views/chat.test.ts ui/src/ui/views/chat.tsnode scripts/run-oxlint.mjs ui/src/ui/app-keyboard-shortcuts.tspnpm ui:i18n:checkpnpm tsgo:test:uigit diff --check origin/main...HEADgit merge-tree --write-tree origin/main HEADtbx_01kspf60p4nt0mn1ty963txesm/ run26555650911, commandpnpm check:changedorigin/main,node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test-origin-main-recheck.tsbuildinfoEvidence after fix:
navigation.browser.test.ts: 18 passed.chat.test.ts: 59 passed.oxfmt, focusedoxlint,ui:i18n:check,tsgo:test:ui,git diff --check, andmerge-treepassed locally.ui:i18n:checkreported all 18 locales clean, with the expected 3 fallback keys from the regenerated shortcut strings.3bec2bcca39c:check-lint,checks-node-core-ui,check-docs,preflight,security-fast, and workflow sanity checks passed.Observed result after fix:
/focuses/switches to chat,Njumps to new messages only when available, Escape dismisses transient dashboard UI in the expected priority order, Cmd/Ctrl+K still opens the command palette, and printable dashboard shortcuts do nothing from editable/editor targets.What was not tested: browser smoke was not run. The broad changed gate did not complete: the Testbox wrapper detached with exit 143 and the backing Action was cancelled after it stayed in
Run Testbox; the samecheck-test-typesfailure currently reproduces on pristineorigin/mainin unrelatedsrc/agents/minimax-vlm.normalizes-api-key.test.tsandsrc/agents/tools/pdf-native-providers.test.tsfiles.