Repository navigation
feat: search commands and settings from the main Companion screen - #1916
Conversation
…dExecutor Adds the sidebar search button and native flyout in WorkspaceWindow, backed by the same HubCommandCatalog as Settings. A shared HubCommandExecutor runs Navigate, OpenDashboard and ToggleSetting for both surfaces and reports SettingsSaved only after a successful toggle persist. Ctrl+E/Ctrl+K open the visible surface's search without changing page or draft. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
… shortcuts Co-authored-by: Copilot App <[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. |
…ettings routing Co-authored-by: Copilot App <[email protected]>
|
Codex review: needs maintainer review before merge. What this changesAdds main-screen command search and shares command execution with Settings search. Example: Press Ctrl+K in Chat with the draft “Keep this draft through main search”.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds useful main-screen search that current main does not provide, and no concrete introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe native Companion shell turns sidebar and keyboard input into catalog searches, then routes selected commands through existing navigation, dashboard, and settings owners. flowchart TD
A[Sidebar or keyboard] --> B[Visible search flyout]
B --> C[HubCommandCatalog]
C --> D[HubCommandExecutor]
D --> E[Workspace navigation]
D --> F[Dashboard command]
D --> G[Existing settings store]
Technical reviewBest possible solution: Land the shared-catalog main search while preserving existing navigation, permission writers, and retained Chat state. Do we have a high-confidence way to reproduce the issue? This is a feature request; current-main source confirms that opening search from Chat first navigates to Settings. Is this the best way to solve the issue? The change uses the existing catalog, removes duplicate execution logic, and keeps flyout mechanics in the native views, making it a focused implementation of the authorized feature. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1912df7e2f97. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 HistoryReview history (1 earlier review cycle)
Reviewed October 29, 2026, 4:42 PM ET / 20:42 UTC (Revision 2). |
Co-authored-by: Copilot App <[email protected]>
Defer OpenCommandCenter until loaded and skip while a modal is open, contain SettingsSaved callback failures in HubCommandExecutor, and make native search proof guard foreground ownership and use ordered probe keys instead of fixed delays. Co-authored-by: Copilot App <[email protected]>
Coalesce pending OpenCommandCenter requests, retain a request made while a dialog is open until it closes, log the full SettingsSaved failure, add Windows keys to the native input guard, and assert composer focus after Back. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Hanselman dual-model review (Claude Opus 5.5 + GPT-6 Astra, long context, high effort)
Open, not fixed: Opus low items (Settings Loaded handler reads Not proven: whether Back restores composer focus is disputed between the models. The new Back-focus assertion has not been run natively. Native Validation on head |
|
@clawsweeper re-review Current head |
|
🦞👀 Re-review progress:
|
…enclaw#1916) * feat(workspace): add main-screen command search with shared HubCommandExecutor Adds the sidebar search button and native flyout in WorkspaceWindow, backed by the same HubCommandCatalog as Settings. A shared HubCommandExecutor runs Navigate, OpenDashboard and ToggleSetting for both surfaces and reports SettingsSaved only after a successful toggle persist. Ctrl+E/Ctrl+K open the visible surface's search without changing page or draft. Co-authored-by: Copilot App <[email protected]> * fix(tests): restore line layout of HubCommandExecutor compile include Co-authored-by: Copilot App <[email protected]> * fix(workspace): keep main search aliases aligned with merged Settings shortcuts Co-authored-by: Copilot App <[email protected]> * test(ui): prove main search shortcuts, focus, collapsed sidebar and Settings routing Co-authored-by: Copilot App <[email protected]> * test(ui): prove Settings Ctrl+F/K and unmatched main search natively Co-authored-by: Copilot App <[email protected]> * fix(search): harden main search review findings Defer OpenCommandCenter until loaded and skip while a modal is open, contain SettingsSaved callback failures in HubCommandExecutor, and make native search proof guard foreground ownership and use ordered probe keys instead of fixed delays. Co-authored-by: Copilot App <[email protected]> * fix(search): resolve second review findings Coalesce pending OpenCommandCenter requests, retain a request made while a dialog is open until it closes, log the full SettingsSaved failure, add Windows keys to the native input guard, and assert composer focus after Back. Co-authored-by: Copilot App <[email protected]> * fix(search): order deferred search after navigation drain Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes: the main Companion screen has no search for commands and settings, so users must open Settings first to reach them.
User Impact
User impact: users can open a search flyout from the main sidebar (button, Ctrl+E or Ctrl+K) and run the same commands Settings search offers, without leaving the current page, conversation or draft. Ctrl+E and Ctrl+K now work on every page; Ctrl+F stays a Settings-only alias and is not taken from Chat content.
Why This Change Was Made
Main and Settings search now share one
HubCommandExecutorover the existingHubCommandCatalog. Toggle commands raiseSettingsSavedonly after the setting persists, so a failed write no longer looks like a save. The flyout opens in place and does not navigate. Ownership is recorded indocs/ARCHITECTURE.md.Layer 4 of the split Native application shell work; rebased onto main after #1911 (feat: keep Settings and Chat in one Companion window) merged.
Evidence
WorkspaceNavigationTests, one inPermissionSettingsWriterRoutingTests) were updated to the merged contract: Ctrl+E is global, Ctrl+F remains Settings-only.origin/main..HEAD: no findings. Refreshed dual-model review (Claude Opus 5.5 and GPT-6 Astra, high effort) of the L4 delta at8820608e: both reported no findings. Codex login was not used.6c2124e6(Claude Opus 5.5 and GPT-6 Astra long context, high effort): no critical or high findings. Both flagged the native test's unguardedSendKeysand missing focus assertions; Opus alone flagged fixed-delay negative checks,OpenCommandCenterno longer waiting for load/modal, and an uncaughtSettingsSavedcallback exception. All were fixed ind8faefbe: foreground-process and modifier guard before every key send, composer-focus assertion after Escape, ordered probe keys instead of delays, load/modal guard inOpenCommandCenter, and callback exception containment with a unit test. Rounds 2 and 3 (same models, same effort; deltas6c2124e6..d8faefbeandd8faefbe..ab24fceb) found no critical or high issues. They led toab24fceb(one pending-request flag for search raised before load or while a dialog is open, full exception logged forSettingsSaved, Windows-key guard, Back-focus assertion in the native routing test) andc3bf1087(both models flagged that a search deferred behind a dialog could run before the deferred navigation and be lost; the retry now waits two dispatcher hops and Settings search waits for Settings to load). Round 4 onab24fceb..c3bf1087: Astra found nothing; Opus found only low items, not fixed: reading the_settingsfield instead of a captured view in the Loaded handler, a narrow gap before the navigation drain, and unverified flyout placement after a layout change. Not fixed and not proven: whether Back restores composer focus (disputed between models). The Back-focus assertion later ran natively onc3bf1087and passed, which resolves that dispute for the tested path. Search deferral and ordering are covered by source guards and static review only.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: search button, shortcuts, Escape/focus return and collapsed-sidebar behavior need current-head visual proof in the isolated WinUI app. Native fixture-backed proof below was run locally; the pool's No inventory-bound evidence summary exists or is applicable: the inventory's only proof-test recipe for this pool isrun-accessibility-scan(Category=Accessibility,winui-accessibility), which this change did not run, andexercise-changed-uiis a manual command. TheMainSearch_filter is an unbound ad hoc run, whichdocs/PROOF_POOLS.mdstates receives test-result validation but no evidence summary, sovalidate-proof-evidence.ps1has nothing to validate and none was fabricated.validate-proof-pools.ps1passed via./build.ps1.Validation
Run on head
8820608e(isolated tray profile dirs, E2E opt-ins unset):./build.ps1: all 5 projects built; docs validation passed (68 files).dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj: 4803 passed, 25 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj: 4763 passed, 0 failed (includesPermissionSettingsWriterRoutingTestsandWorkspaceNavigationTests).dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj --filter MainSearch_(isolated fixture app, own temp profile, synthetic data): 4 passed, 0 failed (see Real Behavior Proof).c3bf1087(treefcd2a056fca89aa18b82e311bb8ef609c662a3f7):./build.ps1passed, Shared 4803 passed (25 skipped), Tray 4763 passed and the UI test project builds, all run on the working tree committed as that head. The 4 nativeMainSearch_tests were then run on that same head (see PR head or commit tested).c3bf1087; they were not re-invoked from a separate clean checkout. Earlier8820608eandd8faefberuns are superseded.Real Behavior Proof
MainSearch_native tests ran on headc3bf1087(treefcd2a056fca89aa18b82e311bb8ef609c662a3f7, clean worktree) and passed (4 passed, 38 s), including the Back-focus assertion (composer focus restored by Back with noSetFocus). An earlier attempt on the same head failed once onMainSearch_UnmatchedQuery...because stray keystrokes reached the composer and search box while Windows declined foreground activation (see itsfailure.png); the immediate rerun passed 4 of 4. App under test: DebugOpenClaw.Tray.WinUI.exebuilt from these sources, SHA256671265758D041F4748A213637070E39DF14D5F699454892DB272C9F8B8F00464, own isolated fixture profile and synthetic Gateway only. The screenshots below were regenerated by this run and inspected.Yes(uploaded to this PR; rendered links checked after upload).Security Impact
NoNoNoNoNoYes, explain the risk and mitigation: N/A. Setting toggles reuse the existing permission writers.Compatibility and Migration
YesNoNoReview Conversations