Skip to content

feat: add Back to app and Esc to the Settings sidebar - #2065

Merged
roboclaw-bot merged 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-settings-back-to-app-header
Nov 9, 2026
Merged

roboclaw-bot merged 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-settings-back-to-app-header

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

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, and shouldIgnoreSettingsEscape, 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

Commit b1d5e0b77684ab603281882a7e0b9d10877f30cd has tree fb147c549f19e8e0d8f3c7ed31876f10191088b4. All 2,172 intended source files were checked byte-for-byte against the retained native validation manifest and the committed Git blobs. Tests ran on the source-identical uncommitted candidate based on 13b2a4e62955b0b26476a67f4e79d9627ef5f701; committing did not constitute another test run. Source-manifest SHA256: ac600a89b0f359e4505e92cd85456f50e5bc0b8265cb4eb299325729dccdd686.

Current source-equal proof: full build/unit suites passed; real accessibility 34/34; Settings Back mouse/Enter/Escape 3/3 in Debug and 3/3 in non-dev Release, including populated and empty Notifications; full hosted selection 664 passed / 1 compositor opt-in skip, with all four startup cases executed.

The follow-up repair gives empty Notifications a named Pane peer and an empty-only tab stop, so the existing Workspace focus handoff has a valid target. The test uses real MCP system.notify discovery/invocation for deterministic populated input and exact owned-window/control identity for focus. Two shared test prerequisites preserve native Clipboard traversal/collapse behavior and observe elapsed rendering instead of sleeping.

Independent source and rubber-duck implementation/proof-plan reviews by GPT-6 Astra found no P0-P3 blocking findings in the frozen candidate. The actual role was a native OpenClaw subagent; context tier and reasoning effort were not independently attested. The requested Opus 5.5 pass was unavailable in this environment, so no renewed dual-model Hanselman consensus is claimed.

Before pressing Escape (current source-equal build):

Current source-equal Settings header with Back to app and Escape

After pressing Escape, the same composer retains its draft:

Same chat and unsent draft retained after Escape

Returning to empty Notifications:

Empty Notifications after return from Settings

Empty-page keyboard focus is established by native UI Automation assertions, not inferred from these pixels. The retained pre-fix empty-state negative control failed all three variants; the named-peer/conditional-tab-stop repair passes all three.

Earlier author evidence and reviews, kept historical

The original author reported a dual-model Opus/Astra review and an earlier rubber-duck review, plus a real-profile trial. Those reports are not a renewed review of this update. Original-head CI failed the Notifications focus assertion, which incorrectly excluded the entire NavigationView subtree. Later native testing separately established the empty-state production focus gap. The original author’s unit runs had isolation limitations; the new runs below used explicit isolated roots.

Earlier author screenshots, not the current repair proof above:

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: new Settings header, keyboard (Escape) and focus behavior in the WinUI app.

Validation

Current source-equal runs used Windows 11 Pro 25H2 x64, .NET SDK 10.0.403, source Windows App SDK pin 2.6.4 with serviced runtime 2.6.5.0, and explicit isolated app/test roots. All four OPENCLAW_TRAY_* roots were set; OPENCLAW_STATE_DIR was unset only for unit processes and restored to private state for UI runs.

Command / selection Actual result
./build.ps1 and explicit Shared/Tray project builds Passed
dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore 4,875 passed, 0 failed, 25 ordinary skips
dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore 5,305 passed, 0 failed/skipped
Fresh UI build -c Debug -r win-x64 Passed
FullyQualifiedName~SettingsBackToApp_ReturnsToAppDestinationInSameWindow Debug 3/3; Release 3/3; no skips
FullyQualifiedName~ClipboardExpander_SupportsKeyboardSelectionAndCollapse Debug 1/1; Release 1/1
FullyQualifiedName~ActiveRun_AfterAssistantPreamble_KeepsClawAndElapsedTimeVisible Debug 2/2; Release 2/2
Real Category=Accessibility 34/34 passed, no skips
Full hosted filter Category!=Accessibility&Category!=NativeOnboardingProof&Category!=GatewayFixture 664 passed, 0 failed, 1 existing compositor opt-in skip; startup 4/4 passed
Native editable-TextBox Escape observation Passed; Settings/editor retained
git diff --check Passed

Focused commands used dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c <Debug-or-Release> -r win-x64 --no-build --no-restore --filter <selection> with fresh TRX directories and explicit matching app binaries. All actual UI diagnostic processes set OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1 and OPENCLAW_RUN_KEYBOARD_PROOF=1; compositor opt-in stayed off.

pwsh -NoProfile -File ./scripts/run-proof-tests.ps1 -Project tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -Filter Category=Accessibility -ResultName winui-accessibility -RuntimeIdentifier win-x64 -ResultsDirectory ./TestResults/ProofPools/pr2065-current-accessibility
# Intentional unsigned local non-dev Release fixture:
$env:RequireSignedCleanupHost = "false"
./build.ps1 -Project WinUI -Configuration Release
dotnet build ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Release -r win-x64 -p:DevBuild=false -p:RequireSignedCleanupHost=false

The Release flag was process-scoped and restored. This is documented local fixture testing, not signed-distribution proof. Hosted diagnostics used --diag, --blame and a 300-second non-memory hang watchdog. A held native handle confirmed testhost PID10600 exited 0; the retained VSTest teardown/disposed-process warning is not erased or used to infer the result.

Initial Axe had two foreground-activation failures against Explorer. No shell kill, focus-policy change, source edit, assertion relaxation or timeout increase was used. Under a native-click-qualified launcher, those two cases passed, then the full 34-case invocation passed. Initial failures remain retained; duplicate archive paths for that failed TRX are one invocation, not two.

Real Behavior Proof

  • Environment tested: authorized isolated Azure Windows 11 client, 1600x1200 work area, actual console-session native input, source-bound Debug and non-dev Release binaries.
  • PR head or commit tested: source-identical candidate now committed as b1d5e0b77684ab603281882a7e0b9d10877f30cd; all 2,172 source blobs match the retained manifest.
  • Exact steps: type a draft in the synthetic chat; open Settings; exercise compact/expanded sidebar; leave by mouse, Enter and Escape; verify retained composer/draft and same HWND; seed Notifications through the shipped authenticated MCP producer; repeat return/focus with populated then cleared inbox.
  • Evidence after fix: the current screenshots above, exact current control-identity focus assertions, 3/3 focused cases in each configuration and all 34 native accessibility cases.
  • Observed result: source and loaded app/test binaries remained unchanged through the runs. Native editable-field Escape did not leave Settings. No real Gateway connection or provider behavior is inferred from the isolated fixture.
  • Screenshot or artifact links verified? Current images were inspected for readable, unclipped synthetic content; uploaded links are verified after publication. Raw proof archive is retained in the linked team session.
  • Not verified or blocked: new-commit CI; requested Opus review; open-popup Escape (harness failed before popup input because the owned process did not own the selected MCP listener within the original startup budget); native deferred exit/pinned return/auto-repeat beyond existing unit/source coverage; dark/High Contrast/non-English captures; live Gateway; compositor pointer opt-in. No whole-pool or merge-readiness claim.

Crabbox receipts (team access may be required):

Archive SHA256: b85733ddf2ccc61464532d283b6c25dd38c2f6cc70eb350bbc33671ffd9d52db (227 verified files). Accessibility summary: poolId=windows-winui-interactive, commandId=run-accessibility-scan, 34 discovered/executed/passed, zero failed/skipped, scope=selected-test-execution-only, poolComplete=false. Independent native source/binary bindings supplement, not replace, that limited summary.

Security Impact

  • New permissions or capabilities? (Yes/No) No
  • Secrets or tokens handling changed? (Yes/No) No
  • New or changed network calls? (Yes/No) No
  • Command or tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? (Yes/No) Yes. The chat route and search command still work; only the Settings sidebar Chat item (SettingsNavChat) is replaced by SettingsBackToApp.
  • Config or environment changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, list the exact upgrade steps: N/A

Contributor credit

Original PR by @bkudiess. Follow-up fixes and native validation were prepared with Barbara Kudiess; the follow-up commit retains her co-author credit.

Work sessions

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

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Live inline-review-thread lookup before this update returned no threads for this PR. The original checklist remains unclaimed rather than inventing resolved conversations.

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 <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 7, 2026
@clawsweeper

clawsweeper Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

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

  • Before: There is no Settings exit shortcut, and the Chat row returns specifically to Chat.
  • After: Escape returns to Notifications and moves focus onto that page.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused change with directly inspected native evidence and no blocking defect; some added source assertions are implementation-coupled.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected current-source native screenshots showing the Settings header, compact arrow, and restored draft, supported by the reported Windows 11 mouse, Enter, and Escape runs through the real app. Editor/overlay Escape, dialog deferral, and pinned-page returns have source or unit coverage rather than native captures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Settings’ Chat row does not clearly communicate leaving Settings or return users to Notifications or a pinned page.
Reason: The collaborator-authored direction supplies the owner decision, and the change makes the exit explicit without adding configuration or replacing navigation ownership.

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
Reviewed head: 13b2a4e62955b0b26476a67f4e79d9627ef5f701

Before merge

None.

Findings

None.

Tests

  • Low-value test tests/OpenClaw.Tray.Tests/Presentation/WorkspaceNavigationTests.cs: Remove the newly added assertions pinning handler names and exact source fragments where they duplicate native behavior coverage; retain the concrete single-owner and no-second-chat guards.
Agent review details

How this fits together

SettingsShellView 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]
Loading

Technical review

Best 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

  • Settings Chat row and invocation handling changes intended behavior with a stated reason (f4122a8: The earlier Chat action reopened or foregrounded Workspace without discarding its composer; its deferred invocation avoided NavigationView focus handling.)
  • Single-window history and retained chat keeps the original intent (4e31031: Settings and Chat share one window and history while retaining the composer and draft; existing modal admission protects destination changes.)
  • Embedded pinned-page navigation keeps the original intent (7967d50: Pinned Gateway pages reuse the native page host and history beside the main sidebar, with unavailable destinations excluded from navigation.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 7967d50 adds src/OpenClaw.Tray.WinUI/Windows/WorkspaceWindow.xaml.cs:470 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7967d509886f; files: src/OpenClaw.Tray.WinUI/Windows/WorkspaceWindow.xaml.cs)
  • Karen: Raw commit 3a58bf3 adds src/OpenClaw.Tray.WinUI/Presentation/WorkspaceNavigation.cs:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a58bf34902f; files: src/OpenClaw.Tray.WinUI/Presentation/WorkspaceNavigation.cs)

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
Scope Production +154/-22; resources +57/-0; tests +174/-28; docs +6/-4 Growth stays within existing owners and covers distinct return-destination, keyboard, rendering, and draft-retention behavior.

Labels

Label changes:

  • add P3: This is a low-risk navigation and keyboard ergonomics improvement; existing Chat and history navigation already provide an in-product return path.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a low-risk navigation and keyboard ergonomics improvement; existing Chat and history navigation already provide an in-product return path.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 7, 2026, 12:45 AM ET / 05:45 UTC.

@bkudiess bkudiess changed the title feat: add Back to app and Esc to the Settings sidebar, like macOS feat: add Back to app and Esc to the Settings sidebar Nov 8, 2026
Give empty Notifications a named focusable destination and prove populated and empty returns using a real MCP-produced notification. Retain independent native keyboard and rendered-state test contracts.

Co-authored-by: bkudiess <[email protected]>
@roboclaw-bot roboclaw-bot added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Nov 9, 2026
@roboclaw-bot
roboclaw-bot merged commit a39bd70 into openclaw:main Nov 9, 2026
27 checks passed
@roboclaw-bot roboclaw-bot removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants