Skip to content

fix(control-ui): add guarded dashboard shortcuts#84827

Open
BunsDev wants to merge 1 commit into
mainfrom
meow/issue-81946-dashboard-shortcuts
Open

fix(control-ui): add guarded dashboard shortcuts#84827
BunsDev wants to merge 1 commit into
mainfrom
meow/issue-81946-dashboard-shortcuts

Conversation

@BunsDev

@BunsDev BunsDev commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

Refreshes the guarded Control UI dashboard shortcuts for #81946 on current origin/main.

  • Adds a centralized dashboard shortcut resolver for /, N, Esc, and existing Cmd/Ctrl+K palette behavior.
  • Keeps shortcut no-ops inside editable targets: inputs, textareas, selects, contenteditable roots, role="textbox", CodeMirror roots, and Monaco roots.
  • Preserves current-main chat session picker and mobile controls behavior, with Escape priority covering session picker before mobile controls.
  • Adds discoverability for the new-messages jump shortcut in the chat UI and a concise Control UI docs note.
  • Keeps the English chat.newMessages.* strings and regenerates locale bundles / .i18n metadata with pnpm ui:i18n:sync.
  • Drops the previous normal-PR CHANGELOG.md churn and unrelated docs/install/installer.md table 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 on origin/main 4f26cc9090, pushed as 3bec2bcca39c35ac417f498a23cbc70ba1aeb6a6.

Exact steps or command run after this patch:

  • node scripts/run-vitest.mjs ui/src/ui/navigation.browser.test.ts --reporter=verbose
  • node scripts/run-vitest.mjs ui/src/ui/views/chat.test.ts --reporter=verbose
  • pnpm 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.ts
  • node scripts/run-oxlint.mjs ui/src/ui/app-keyboard-shortcuts.ts
  • pnpm ui:i18n:check
  • pnpm tsgo:test:ui
  • git diff --check origin/main...HEAD
  • git merge-tree --write-tree origin/main HEAD
  • Testbox attempt: tbx_01kspf60p4nt0mn1ty963txesm / run 26555650911, command pnpm check:changed
  • Ambient blocker repro: from pristine origin/main, node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test-origin-main-recheck.tsbuildinfo

Evidence after fix:

  • navigation.browser.test.ts: 18 passed.
  • chat.test.ts: 59 passed.
  • oxfmt, focused oxlint, ui:i18n:check, tsgo:test:ui, git diff --check, and merge-tree passed locally.
  • ui:i18n:check reported all 18 locales clean, with the expected 3 fallback keys from the regenerated shortcut strings.
  • PR CI on 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, N jumps 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 same check-test-types failure currently reproduces on pristine origin/main in unrelated src/agents/minimax-vlm.normalizes-api-key.test.ts and src/agents/tools/pdf-native-providers.test.ts files.

Copilot AI review requested due to automatic review settings May 21, 2026 05:37
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 1:17 AM ET / 05:17 UTC.

Summary
The PR adds a guarded Control UI dashboard shortcut resolver for Cmd/Ctrl+K, /, N, and Esc, wires it into the app shell, updates new-message shortcut discoverability, regenerates UI i18n output, adds focused tests, and documents the behavior.

PR surface: Source +380, Tests +170, Docs +1. Total +551 across 44 files.

Reproducibility: not applicable. This PR implements an enhancement requested by the linked Control UI shortcut issue rather than reproducing a broken existing contract. The relevant behavior is source-reviewable through the new resolver and focused tests.

Review metrics: 1 noteworthy metric.

  • Document-level shortcut surface: 3 added, 1 preserved. The compatibility review hinges on the newly added /, N, and Esc dashboard bindings while preserving the existing Cmd/Ctrl+K palette shortcut.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Confirm the final shortcut contract is acceptable for Control UI users before merge.
  • [P2] Optionally add a short browser smoke or Mantis visual proof for the visible shortcut behavior.

Mantis proof suggestion
A short visible Control UI proof would help reviewers see the dashboard shortcuts and editable-field no-op behavior that tests describe. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify Control UI `/`, `N`, `Esc`, and Cmd/Ctrl+K shortcuts work while editable fields ignore dashboard shortcuts.

Risk before merge

  • [P1] The PR intentionally adds document-level /, N, and Esc behavior, so existing Control UI keyboard expectations change even though editable targets are guarded.
  • [P1] The PR body says the broad changed gate did not complete because Testbox stalled and an unrelated current-main core test typecheck failure reproduces on pristine main; maintainers should distinguish that upstream blocker from this UI diff before landing.
  • [P1] No live browser smoke is reported for the visible shortcut behavior; the PR relies on focused UI tests, local command output, and the maintainer/member proof path.

Maintainer options:

  1. Accept the guarded shortcut contract (recommended)
    Maintainers can land if they intentionally accept /, N, and Esc as guarded document-level dashboard shortcuts and treat the focused tests plus upstream-failure explanation as sufficient.
  2. Ask for a browser shortcut smoke
    Maintainers can request a short live Control UI browser proof showing the shortcuts and editable-target no-ops before merging the user-visible behavior.
  3. Narrow or defer the shortcut set
    If the key choices are not acceptable globally, pause this PR and keep the linked enhancement open for a smaller shortcut contract.

Next step before merge

  • [P2] This maintainer-labeled PR has no narrow automation repair target; the remaining action is human acceptance of the user-visible keyboard shortcut contract and CI/proof posture.

Security
Cleared: The diff is limited to Control UI code/tests/styles/i18n and docs, with no dependency, workflow, lockfile, secret-handling, or package-execution surface changes.

Review details

Best possible solution:

Land the guarded shortcut implementation only after maintainers explicitly accept the keyboard compatibility contract and are satisfied that any remaining red broad-check signal is current-main noise rather than PR-local behavior.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR implements an enhancement requested by the linked Control UI shortcut issue rather than reproducing a broken existing contract. The relevant behavior is source-reviewable through the new resolver and focused tests.

Is this the best way to solve the issue?

Yes, with maintainer signoff: centralizing the shortcut decision in one resolver and testing editable-target guards is a maintainable shape for this feature. The remaining question is product compatibility for the chosen global keys, not a concrete patch defect.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 8f6a2f0f6b11.

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member/maintainer-labeled PR, though the body records focused UI tests and notes that browser smoke was not run.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded Control UI user-facing improvement with focused tests but a real keyboard-compatibility decision before merge.
  • merge-risk: 🚨 compatibility: Document-level shortcut bindings can change existing users' keyboard interactions across the dashboard even with editable-target guards.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member/maintainer-labeled PR, though the body records focused UI tests and notes that browser smoke was not run.
Evidence reviewed

PR surface:

Source +380, Tests +170, Docs +1. Total +551 across 44 files.

View PR surface stats
Area Files Added Removed Net
Source 41 477 97 +380
Tests 2 170 0 +170
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 44 648 97 +551

What I checked:

  • Repository policy read: Read the full root AGENTS.md plus scoped docs/AGENTS.md and ui/AGENTS.md; the UI i18n guidance supports regenerating non-English locale bundles from the English source rather than hand-editing them. (ui/AGENTS.md:5, 8f6a2f0f6b11)
  • Shortcut resolver source: The new resolver keeps Cmd/Ctrl+K, guards printable shortcuts from text-entry/editor targets, and returns the added focus, new-message scroll, and dismiss actions from one closed action union. (ui/src/ui/app-keyboard-shortcuts.ts:60, 3bec2bcca39c)
  • App shell wiring: The app shell now delegates document keydown handling through the resolver and maps actions to palette toggle, composer focus, scroll-to-bottom, and transient dismissal helpers. (ui/src/ui/app.ts:663, 3bec2bcca39c)
  • Focused regression coverage: The navigation browser test covers routing / to chat focus, inactive and active N, editable-target no-ops, Cmd/Ctrl+K preservation, and Escape dismissal priority. (ui/src/ui/navigation.browser.test.ts:623, 3bec2bcca39c)
  • Accessibility and docs update: The New messages button now uses action-only aria-label plus aria-keyshortcuts/title, and the public Control UI doc names the shortcut behavior and editable-target guard. (ui/src/ui/views/chat.ts:1518, 3bec2bcca39c)
  • Current-main drift check: The touched primary UI files had no current-main drift after the PR merge base, and merge-tree produced a clean tree hash, so the review did not find a current-main supersession or obvious conflict. (8f6a2f0f6b11)

Likely related people:

  • BunsDev: The PR author also appears in prior merged history for the same Control UI app/chat files, including settings, slash-command, session, and dashboard UI work. (role: current PR owner and prior Control UI contributor; confidence: high; commits: 3bec2bcca39c, 2cfb660a9bb8, a710366e9ece; files: ui/src/ui/app.ts, ui/src/ui/views/chat.ts, ui/src/ui/app-render.ts)
  • Peter Steinberger: Current-main blame and shortlog show heavy recent ownership across the app shell, chat view, app render, and navigation browser tests touched by the PR. (role: recent area contributor; confidence: high; commits: c86667c5cfac, b303b6c49262, 7c862da6a1de; files: ui/src/ui/app.ts, ui/src/ui/views/chat.ts, ui/src/ui/app-render.ts)
  • joshavant: Recent history shows a cluster of UI render-flow and agent-panel refactors near the app-render surface that owns chat view props and dashboard state wiring. (role: adjacent Control UI render-flow contributor; confidence: medium; commits: 7dab807bc4da, 7030bdb6eaff, ca21090455ba; files: ui/src/ui/app-render.ts, ui/src/ui/app.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 OpenClawApp and 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.

Comment thread ui/src/ui/views/chat.ts Outdated
Comment thread ui/src/ui/app.ts Outdated
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: ✨ hatched 🥚 common Sunspot Crabkin. Rarity: 🥚 common. Trait: finds missing screenshots.

Details

Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Sunspot Crabkin in ClawSweeper.
Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels May 21, 2026
@BunsDev BunsDev force-pushed the meow/issue-81946-dashboard-shortcuts branch from d8b9c2b to a3464db Compare May 21, 2026 23:46
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label May 21, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels May 21, 2026
@BunsDev BunsDev force-pushed the meow/issue-81946-dashboard-shortcuts branch from 350aa01 to c8f37f6 Compare May 28, 2026 04:52
@BunsDev

BunsDev commented May 28, 2026

Copy link
Copy Markdown
Member Author

@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.

@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels May 28, 2026
@clawsweeper clawsweeper Bot added the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label May 28, 2026
@BunsDev BunsDev force-pushed the meow/issue-81946-dashboard-shortcuts branch from c8f37f6 to 3bec2bc Compare May 28, 2026 05:06
@BunsDev

BunsDev commented May 28, 2026

Copy link
Copy Markdown
Member Author

@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.

@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels May 28, 2026
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants