Skip to content

fix(ui): Cmd+K loses its mode on reload and ignores Cmd+Enter in Search - #199173

Merged
vyctorbrzezowski merged 4 commits into
mainfrom
openclaw/sharp-crayfish-5
Nov 14, 2026
Merged

vyctorbrzezowski merged 4 commits into
mainfrom
openclaw/sharp-crayfish-5

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #186059

What Problem This Solves

Fixes: Cmd+K forgets the last chosen Search or Compose mode after a page reload, and Cmd/Ctrl+Enter does nothing in Search instead of starting a new session.

User Impact

Users can reopen Cmd+K in their last chosen mode and start a background session from either mode without replacing their current conversation or draft. The design, layout, and styling are unchanged.

The mode choice is remembered in this browser when local storage is available; it is not account-synced. Prompt text and attachments are not persisted by this change.

Why This Change Was Made

The existing mode owner now remembers explicit choices across reloads, including the loading-to-ready handoff. Automatic switches caused by long prompts or attachments do not overwrite that choice. Both the loading and ready palette again route Cmd/Ctrl+Enter through the existing session-creation flow.

Evidence

  • All three new browser regression scenarios failed on the original implementation and pass with the fix: mode restoration after reload, the ready macOS shortcut path, and the loading Ctrl+Enter handoff.
  • The existing Compose creation scenario also passes, including foreground draft/focus preservation and preventing an empty repeat submission.
  • The author's initial run passed 83 focused unit/integration tests across palette search, shortcuts, lifecycle, pending searches, and loading input custody.
  • UI production build, pnpm tsgo:ui, formatting, and targeted lint pass. Lint retains one pre-existing Solid reactivity warning outside the changed lines.
  • Browser proof uses the production UI with a simulated Gateway and emulated platform identities, not live model execution. The initial mode change did not alter styling; the maintainer correction below makes existing refusal feedback visible in Search.
  • Author review and simplification completed: removed the two mode-specific submission gates; reused the existing mode owner and storage accessor. Tests cover mode restoration, ready and loading submission, and refusal feedback; stored preferences are isolated. Independent review during maintainer validation identified blocked Search submissions lacking visible feedback; the correction is described below.

Requested by and co-authored with @vyctorbrzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

Maintainer validation

A read-only user could press Cmd/Ctrl+Enter in Search and receive no explanation. The shared palette draft now derives the current refusal notice from the existing submission owner, and the existing alert is visible in both modes. Transient loading gates are not stored as submission errors, so a defaults refresh can complete and the user can retry normally. This does not change permission decisions, persist an automatic mode switch, or discard the draft.

The added regression failed on the incoming head because the alert was absent. With the final repair, 115 focused tests passed across palette shortcuts, mentions, draft submission, loading handoff, submit gates and agent/defaults invalidation. This includes the existing regression that requires a transient defaults refresh to leave the actual error state empty. Four Chromium browser scenarios passed: the three original mode/shortcut scenarios plus the refusal flow shown below. UI typecheck and scoped formatting/lint passed; the existing reactivity warning outside the changed lines remains. Browser evidence uses the production UI with a simulated Gateway, not a real model run.

Before: refusal without feedback After: refusal reason, draft retained
Before: Search submission silently refused After: Search refusal explained without changing the draft

The final correction received an independent P0–P2 review with no actionable findings. The browser refusal flow was rerun on the final code and remains visually unchanged from the capture above.

Validated source published at 645ca32a2ea9458a4e944405441bf8b3b7fcf012; current-head CI is pending.

roboclaw-bot and others added 2 commits November 14, 2026 20:19
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4418532c-a257-43a8-af6a-8967338cb24d
@clawsweeper

clawsweeper Bot commented Nov 14, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Nov 14, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 14, 2026 20:20
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR remembers the palette’s selected mode across browser reloads and enables Cmd/Ctrl+Enter to start background sessions from Search.

Example: Choose Compose, reload the page, and reopen Cmd+K.

  • Before: The palette opens in Search.
  • After: The palette restores Compose when browser storage is available.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The repair is focused and owner-directed, but a concrete silent-failure path remains and supplied behavioral evidence uses a simulated Gateway; the new persisted mode key also lacks latest-stable upgrade proof with existing preferences intact.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Cmd+K forgets the selected mode after reload and ignores the background-session shortcut in Search.
Reason: The maintainer-authored direction approves these focused interaction changes while retaining the existing layout, drafts, and session-creation owner.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this maintainer-authored PR open: the changes remain useful on current main, but Search submission can still fail silently before sending a request.

Priority: P2
Reviewed head: 9083d84a32d77d5cc087812949636513ef44fa5b

Before merge

  • Show admission failures when submitting from Search (P2) - With a nonempty short prompt in Search and a selected model that is unavailable, Cmd/Ctrl+Enter now calls submit(), but DraftSubmissionFlow.submit() returns at canSubmit() after recording a blocked attempt. PaletteSessionDraft exposes the reason only through disabledReason, whose control is rendered exclusively in Compose; the Search view never consumes blockedSubmitNotice(). The user sees no request, explanation, or recovery action. Surface the existing admission reason and a way to open the relevant Compose controls when this newly enabled path is blocked.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Show admission failures when submitting from Search — ui/src/components/command-palette-view.tsx:172-175

Tests

  • Missing end-to-end proof: Provide redacted real-Gateway browser evidence of reload restoration and ready/cold shortcut creation with the foreground draft intact; the reported baseline failures were not independently exercised here.
Agent review details

How this fits together

The Control UI palette routes keyboard input through loading and ready views to shared mode, search, and background-session draft owners.

flowchart TD
  A[Keyboard input] --> B[Loading palette]
  A --> C[Ready palette]
  B --> D[Shared mode owner]
  C --> D
  D --> E[Browser preference]
  B --> C
  C --> F[Session draft owner]
  F --> G[Gateway session creation]
Loading

Technical review

Best possible solution:

Retain the existing mode and submission owners, expose blocked Search submissions with an in-product recovery action, and preserve existing preferences during upgrade.

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

Current-main source establishes both reported paths, and the PR reports three red-before/green-after browser scenarios; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Persisting explicit choices in CommandPaletteModes and removing both shortcut gates is the smallest focused approach, but the newly reachable Search submission path also needs visible admission failures.

Full review comments:

  • [P2] Show admission failures when submitting from Search — ui/src/components/command-palette-view.tsx:172-175
    With a nonempty short prompt in Search and a selected model that is unavailable, Cmd/Ctrl+Enter now calls submit(), but DraftSubmissionFlow.submit() returns at canSubmit() after recording a blocked attempt. PaletteSessionDraft exposes the reason only through disabledReason, whose control is rendered exclusively in Compose; the Search view never consumes blockedSubmitNotice(). The user sees no request, explanation, or recovery action. Surface the existing admission reason and a way to open the relevant Compose controls when this newly enabled path is blocked.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 088178a6559f.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/e2e/command-palette-mode.e2e.test.ts
  • pnpm --dir ui test src/e2e/command-palette-create.e2e.test.ts
  • pnpm --dir ui test src/app/app-shell-command-palette-loading.test.ts
  • pnpm tsgo:ui
  • git diff --check

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 9b11465 adds ui/src/components/command-palette-mode.ts:21 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9b11465147cb; files: ui/src/components/command-palette-mode.ts)
  • Peter Steinberger: Raw commit 1fe031d adds ui/src/app/app-shell-command-palette-loading.ts:240 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1fe031d90b9f; files: ui/src/app/app-shell-command-palette-loading.ts)
  • RoboClaw: Raw commit 39ad38a adds ui/src/app/app-shell-command-palette-loading.ts:248 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 39ad38a34252; files: ui/src/app/app-shell-command-palette-loading.ts)

PR surface

Source +18, Tests +145, Docs +3. Total +166 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 22 4 +18
Tests 3 145 0 +145
Docs 1 5 2 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 172 6 +166

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus tests Production +22/-4 lines; tests +145 lines The growth covers browser persistence, ready shortcut submission, and cold handoff without adding another production owner.
Persisted browser preference 1 new localStorage key openclaw.command-palette.mode.v1 stores only search or compose; prompts and attachments remain outside this persistence path.

Labels

Label changes:

  • add P2: The palette interaction has limited blast radius and retains working Search and Compose alternatives.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The palette interaction has limited blast radius and retains working Search and Compose alternatives.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 November 14, 2026, 3:37 PM ET / 20:37 UTC.

@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) November 14, 2026 20:46
@vyctorbrzezowski
vyctorbrzezowski merged commit f2c308e into main Nov 14, 2026
98 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/sharp-crayfish-5 branch November 14, 2026 21:24
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
…ch (openclaw#199173)

* fix(ui): remember command palette mode and restore start shortcut

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): Cmd+K loses its mode on reload and ignores Cmd+Enter in Search

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4418532c-a257-43a8-af6a-8967338cb24d

* fix(ui): explain blocked palette submissions in Search

* fix(ui): derive current palette submission feedback

---------

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

2 participants