Repository navigation
Conversation
Match the macOS Settings sidebar: a "Back to app" row with an Esc key hint, then a Settings title, replacing the rail's Chat item. Back to app and Escape return to the chat, Notifications or pinned page Settings was opened from, as one history entry that reuses the retained chat and its draft. Escape leaves only full Settings and only when no popup, dialog or text editor owns it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces Settings’ Chat row with a localized Back to app header and Escape shortcut that restore the previous app destination. Example: Open Connection settings from Notifications, then press Escape.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds a useful, owner-approved navigation improvement absent from current main, with visible native proof and no blocking introduced defect found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSettingsShellView supplies the native sidebar; WorkspaceNavigationHistory selects the return destination, and WorkspaceWindow applies navigation, dialog deferral, and focus restoration. flowchart LR
A[Back to app button] --> C[WorkspaceWindow]
B[Escape key] --> D[Escape policy]
D --> C
C --> E[Existing navigation history]
E --> F[Retained Chat or previous app page]
Technical reviewBest possible solution: Keep the localized exit affordance in the existing Settings and Workspace owners while preserving the retained composer, ordinary history, and control-owned Escape handling. Do we have a high-confidence way to reproduce the issue? This is an intentional feature addition: current-main source confirms the existing Chat row and absence of the new Settings exit handler. Is this the best way to solve the issue? The implementation is appropriately scoped: it replaces the old row, retains one history owner, and reuses existing dialog, page-lifetime, and chat-preservation paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b6f158ab257a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource 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
LabelsLabel changes:
Label justifications:
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 Reviewed November 7, 2026, 12:45 AM ET / 05:45 UTC. |
What Problem This Solves
On Windows, Settings has no clear way back to the app. macOS Settings starts with a "Back to app" row (with an Esc hint) and a Settings title.
User Impact
User impact: the Settings sidebar now starts with Back to app (with an Esc key hint) and a Settings title, replacing the old Chat item at the top of the list. Back to app or Escape returns to where Settings was opened from: the same chat with its unsent draft, Notifications, or a pinned page. Escape is ignored while a menu, flyout, dialog, text box or dropdown needs it. Pinned pages shown beside the main sidebar are unchanged.
Why This Change Was Made
This follows upstream
exitSettings(), which returns to the last non-Settings location, andshouldIgnoreSettingsEscape, which leaves Escape to overlays and editors. The return target comes from the window's existing Back/Forward history (WorkspaceNavigationHistory.AppDestination), so it adds one ordinary history entry and reuses the retained chat. It goes through the existing dialog deferral and focus restoration. Like Back and Forward, it never returns to a pinned Gateway page that is no longer available. The header is native WinUI (NavigationView.PaneCustomContent) using theme resources. Its strings are translated in all six locales. When the sidebar is collapsed to icons, only the arrow remains, with a tooltip.Evidence
Native UI test
SettingsBackToApp_ReturnsToAppDestinationInSameWindowpassed 3/3 (mouse, Enter, Escape) on the PR head source, in an isolated app profile. It checks that the same composer and draft come back after leaving Settings, that leaving from Notifications returns to Notifications with focus on that page, and that the compact sidebar keeps the arrow.Settings sidebar, expanded:
Compact sidebar keeps only the arrow:
After pressing Escape, the same chat returns with its draft:
The user also tried an earlier build of this change (before the review fixes) on their real profile with the Store Gateway.
Dual-model review (Claude Opus 5.5 and GPT-6 Astra, high effort) found three medium issues that both models flagged: a stale pinned Gateway page as the return target, an exit deferred behind a dialog, and focus fallback. All three are fixed and covered by tests. An earlier independent rubber-duck review found no blockers.
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: new Settings header, keyboard (Escape) and focus behavior in the WinUI app.Validation
Run on the final source (identical to
13b2a4e):./build.ps1: passed (Shared, Cli, WinNodeCli, SetupEngine, WinUI; documentation validation passed).dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4875 passed, 25 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 5305 passed, 0 failed.OPENCLAW_TRAY_DATA_DIR,OPENCLAW_TRAY_APPDATA_DIR,OPENCLAW_TRAY_LOCALAPPDATA_DIR,OPENCLAW_TRAY_LOCAL_DATA_DIRandOPENCLAW_STATE_DIRall unset, so they were not isolated from the real user profile. The native UI run below set all fourOPENCLAW_TRAY_*roots to fixture temp folders.dotnet build tests/OpenClaw.Tray.UITests -c Debug -r win-x64 --no-restorethendotnet test tests/OpenClaw.Tray.UITests --no-build -c Debug -r win-x64 --filter "FullyQualifiedName~SettingsBackToApp_ReturnsToAppDestinationInSameWindow": 3 passed.git diff --check: clean.New unit tests in
WorkspaceNavigationTests:BackToApp_*covers the retained chat, a conversation created while Settings is open, Notifications, pinned pages and pruned pinned Gateway pages.SettingsEscape_*covers when Escape leaves Settings.Real Behavior Proof
OPENCLAW_TRAY_*data roots; no Gateway connection in the fixture.13b2a4e(no source change after the run).dotnet test tests/OpenClaw.Tray.UITests --no-build -c Debug -r win-x64 --filter "FullyQualifiedName~SettingsBackToApp_ReturnsToAppDestinationInSameWindow". Each case opens Chat, types a draft, opens Settings > Connection, collapses and expands the sidebar, then leaves Settings by mouse, Enter or Escape. It repeats from Notifications.Yes/No/N/A) YesSecurity Impact
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain the risk and mitigation: N/ACompatibility and Migration
Yes/No) Yes. Thechatroute and search command still work; only the Settings sidebar Chat item (SettingsNavChat) is replaced bySettingsBackToApp.Yes/No) NoYes/No) NoReview Conversations