Skip to content

improve(workspace): shorten the account menu with a Gateway switcher and Help & about - #2066

Merged
bkudiess merged 16 commits into
openclaw:mainfrom
bkudiess:bkudiess-shorter-account-menu
Nov 10, 2026
Merged

bkudiess merged 16 commits into
openclaw:mainfrom
bkudiess:bkudiess-shorter-account-menu

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The Workspace account menu had grown into a long flat list (Settings, Usage, Pair device, Connection status, Get apps, Connection timeline, Help, About), which made it hard to scan, and gave no way to see or switch Gateways from it.

User Impact

User impact: clicking your name now opens a short menu: your profile, a Gateway ▸ submenu (with Retry now while offline), Settings (with an Update badge and a new Ctrl+, shortcut), Pair a device, and Help & about ▸.

  • Profile header: photo, name and email from the Gateway profile. The shared owner never shows an email. Clicking it opens your profile in the Dashboard. It is disabled until the operator connection is live.
  • Gateway ▸: the row shows a status dot, the Gateway name and "Connected · v". The submenu lists saved gateways: the current one has its live status dot and "Connected", and the others show their address. Picking one switches to it the same way the Connection page's Connect button does. It also has Add gateway…, Reconnect, Connection status (the existing status card), Connection settings and Gateway settings in Dashboard.
  • Retry now: shown only when a Gateway is set up but not connected or connecting. The click re-checks the live state, so a stale open menu cannot drop a connection that has already come back.
  • Settings: when a Companion update is available, the row shows an Update badge and opens About, where updates are installed. The footer avatar also gets an accent dot. Ctrl+, always opens Settings, so its hint is hidden while the row goes to About.
  • Pair a device: now opens the Dashboard Devices page (/nodes) instead of Channels.
  • Help & about ▸: Documentation, Get support, Community, Release notes, GitHub, Get apps, Connection event timeline, and About OpenClaw with the version.
  • Moved off the top level: Usage (still in Settings navigation and search), About, Get apps, Connection timeline and the top-level Connection status row.

Why This Change Was Made

This follows the approved v5 design, which matches the upstream web identity menu. A new pure projection, WorkspaceAccountMenu, decides the contents, and it is unit-tested. WorkspaceWindow stays the single place that applies the menu and runs its commands, as the architecture ledger requires. The native MenuFlyout is rebuilt each time it opens, so the profile, saved Gateways, status and update badge are always current. Two-line rows, the badge and the profile picture come from small retemplated menu-item styles; native keyboard, focus and accessibility behavior is unchanged.

Design notes
  • Gateway switching calls GatewayConnectionManager.SwitchGatewayAsync, the same path as the Connection page's saved-gateway Connect. No parallel clients.
  • Saved gateways are plain menu items, not radio items. A radio check column on top of the icon column left a wide empty gap before every submenu row.
  • The profile header and Gateway version follow the operator channel (OperatorState), not the aggregate connection state.
  • "Add gateway…" reuses an open Connection page. It keeps an Add or Edit form already in progress, because re-navigating rebuilds the page.
  • The /profile, /nodes and /config Dashboard aliases exist in ui/src/app-route-paths.ts for every released Gateway from v2026.8.35 through v2026.11.1, so they are not version-gated.
  • UpdateCommandCenterInfo.IsUpdateAvailable ignores releases the user chose to skip.
  • New strings are in all six locales. Help items keep their existing labels so the support label still matches the About page (OfficialSupportSourceTests).
  • docs/ARCHITECTURE.md, docs/CONNECTION_ARCHITECTURE.md and docs/GATEWAY_FIXTURE_TESTING.md are updated.

Evidence

  • Unit tests for the menu projection cover the operator-channel gating, Retry visibility and its click re-check, the update badge and its Settings → About routing, Gateway ordering and naming, the duplicate-email case, and the Dashboard aliases.
  • The native Workspace UI tests were updated for the new structure: the Gateway submenu holds the Connection status row, Help & about holds About and the timeline, and Usage is gone from the menu. All 8 pass in Light and Dark.
  • The fixture Gateway UI test proves Pair a device opens the Dashboard at /nodes, including the browser-failure Retry path.
  • I checked the running app with a connected fixture Gateway through its accessibility tree, plus a live check that Add gateway… keeps a partly typed form.
  • Review: one rubber-duck review, then a dual-model Hanselman review (Claude Opus 5.5 and GPT-6 Astra). Neither found a critical or high-severity issue. All 5 lower-severity findings are fixed and verified (see Validation).

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: the Workspace account menu, footer avatar and High Contrast menu states changed and need current-head visual and accessibility proof.

Validation

Run locally on Windows ARM64. PR head is 6a62dfe9, which adds the Gateway submenu spacing fix on top of e5e4f57a.

Run on the 6a62dfe9 source (just before it was committed):

  • ./build.ps1: all 5 projects built, and documentation validation passed (72 Markdown files).
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4868 passed, 0 failed, 25 skipped (opt-in MXC native SDK cases).
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 5281 passed, 0 failed.
  • git diff --check: clean.

Run on e5e4f57a and not rerun after the spacing fix. That fix only changes how saved-gateway rows are built, and these tests open the Gateway submenu without selecting a saved Gateway.

  • .\scripts\run-proof-tests.ps1 -Project 'tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj' -Filter 'FullyQualifiedName~AgentSelector_UsesConfiguredIdentityPictureNameAndId|FullyQualifiedName~SettingsChrome_SearchAndBidirectionalHistory|FullyQualifiedName~SidebarSessions_SelectOriginalKeys_AndKeepCompanionDraft|FullyQualifiedName~NativePagesAndOwnerLinks_StayInOneWorkspaceWindow' -ResultName 'account-menu-ui-fixall' -RuntimeIdentifier win-arm64: discovered 8, executed 8, passed 8.
  • Gateway fixture UI test ChannelsNavigation_OpensTheGatewayDashboardAndOffersRetryWhenTheBrowserFails (with OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1 and the built app): 1 passed.

Earlier on this branch, one Dark-theme run of AgentSelector_UsesConfiguredIdentityPictureNameAndId failed at line 119 ("Missing native control 'WorkspaceNavHome'"). That is before the account-menu steps; it passed on rerun and in every later run.

Real Behavior Proof

  • Environment tested: Windows 11 ARM64. Isolated app profile against the synthetic Gateway fixture (scripts/run-gateway-fixture.ps1), connected as "Fixture Owner".
  • PR head or commit tested: e5e4f57a for the steps below (a Debug build of the same source, made just before the commit). The submenu spacing in 6a62dfe9 was checked separately in the isolated fixture app on that source.
  • Exact steps or command run: opened the account menu from the Chat footer and the Settings footer; expanded Gateway ▸ and Help & about ▸; chose Add gateway…; typed a name; chose Add gateway… again. For 6a62dfe9: opened Gateway ▸ again and compared each row's icon and text positions with the main menu.
  • Evidence after fix (accessibility tree read with computer use; copied output, not a screenshot):
    • Menu: Fixture Owner (help text [email protected]); Fixture Gateway (…) (help text Connected · vfixture-1, AXExpand); Settings (accelerator Ctrl+,); Pair a device; Help & about (AXExpand).
    • Gateway ▸: Fixture Gateway (…) (Connected), Add gateway…, Reconnect, Connection Status: Connected, Connection settings, Gateway settings in Dashboard.
    • Help & about ▸: Documentation, Get support, Community, Release notes, GitHub, Get apps, Connection event timeline, About OpenClaw (version shown).
  • Observed result:
    • Add gateway… opened Connection settings with the Add a gateway form.
    • With "Keep me" typed in Name, choosing Add gateway… again kept the value.
    • Pair a device opened /nodes in the fixture test.
    • With 6a62dfe9, every Gateway ▸ row puts its icon about 19 px and its text 68 px from the row's left edge, the same as the main menu (20 px and 68 px). Before the fix the text sat about 104 px in, behind an empty check column.
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A. Popup menus are separate windows and were not captured as images; the evidence is accessibility-tree output.
  • Not verified or blocked:
    • Screenshots of the menu, which windows-winui-interactive should capture.
    • The Update badge and avatar dot on screen: Debug/dev builds skip update checks, so this is unit-tested only.
    • High Contrast hover and pressed colors for the second line and badge.
    • Switching between several saved Gateways on screen: the fixture has one Gateway, so this is unit-tested only.

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. The menu uses the existing Dashboard launcher, reconnect command and SwitchGatewayAsync. The email comes from the existing users.self response.
  • Command or tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No. The profile email was already read from users.self; it is now shown in the account menu, never for the shared owner.
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes
  • Config or environment changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, list the exact upgrade steps: N/A

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.

…and Help & about

The account menu is now: profile header, Gateway submenu (saved gateways,
Add gateway, Reconnect, Connection status, Connection settings, Gateway
settings in Dashboard) with Retry now while offline, Settings with an Update
badge and Ctrl+,, Pair a device (Dashboard Devices), and Help & about.

- Add WorkspaceAccountMenu, a pure, unit-tested projection of the menu.
- Rebuild the native MenuFlyout on each open; switch gateways through
  GatewayConnectionManager.SwitchGatewayAsync like the Connection page.
- Show the profile email, the Gateway version and an avatar update dot.
- Keep an in-progress Add or Edit form when Add gateway is used again.
- Localize new strings in all six locales; update docs and UI tests.

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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 groups account actions into Gateway and Help & about submenus, adds Gateway switching, and shows available updates.

Example: A user has saved Home Gateway and office.example.com.

  • Before: The account menu cannot select another saved Gateway.
  • After: The Gateway submenu lists both Gateways and switches through the existing connection manager.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is coherent and source-reviewed, with useful partial runtime evidence and explicit visual acceptance gaps.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: The long account menu is hard to scan and requires opening Connection settings to switch saved Gateways.
Reason: The collaborator-authored direction offers direct navigation value while preserving the established service boundaries.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a useful, collaborator-approved menu improvement absent from current main, and inspection found no definite introduced production bug.

Priority: P3
Reviewed head: e5e4f57a686abd7f8e0ab912562b1145faa9c4d6

Before merge

None.

Findings

None.

Tests

  • Low-value test tests/OpenClaw.Tray.Tests/Presentation/WorkspaceAccountMenuTests.cs: Remove the duplicate RetryClick_RechecksTheLiveState helper-only cases: projection tests already cover these states, and this test never invokes an open menu after recovery.
  • Missing end-to-end proof: The supplied evidence does not show current-head visual badge and High Contrast states or actual switching between multiple saved Gateways.
Agent review details

How this fits together

WorkspaceWindow projects saved Gateway, operator identity, connection, and update state into native account menus whose commands use existing connection, Settings, and Dashboard owners.

flowchart TD
  A[Gateway registry and app state] --> B[WorkspaceAccountMenu projection]
  B --> C[WorkspaceWindow native menu]
  C --> D[GatewayConnectionManager]
  C --> E[Connection and Settings pages]
  C --> F[Dashboard launcher]
Loading

Technical review

Best possible solution:

Retain the focused menu redesign, with WorkspaceWindow applying presentation and existing services owning connection and Dashboard effects.

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

This is an enhancement; current-main source confirms the flat menu and missing account-menu Gateway switcher.

Is this the best way to solve the issue?

The smallest complete approach is the supplied pure projection and native presentation using existing command owners, preserving credential handling, saved preferences, and connection lifecycle.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 3f6765e adds src/OpenClaw.Tray.WinUI/Windows/WorkspaceWindow.xaml.cs:1294 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3f6765ea02f4; files: src/OpenClaw.Tray.WinUI/Windows/WorkspaceWindow.xaml.cs)
  • Karen: Raw commit 3a58bf3 adds src/OpenClaw.Tray.WinUI/Windows/WorkspaceWindow.xaml.cs:582 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/Windows/WorkspaceWindow.xaml.cs)
  • AlexAlves87: Raw commit d5543b9 adds src/OpenClaw.Tray.WinUI/Services/UpdateCoordinator.cs:136 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d5543b904507; files: src/OpenClaw.Tray.WinUI/Services/UpdateCoordinator.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
Introduced scope Production +890/-72; tests +272/-30; docs +22/-13 The 336 added XAML template lines support native profile, secondary-line, and badge presentation within the approved scope.

Labels

Label changes:

  • add P3: This improves account-menu navigation and discoverability without establishing an urgent broken workflow.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 improves account-menu navigation and discoverability without establishing an urgent broken workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the declared visual proof for the changed menu states and saved-Gateway switching.

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, 1:23 AM ET / 06:23 UTC.

bkudiess and others added 15 commits November 8, 2026 10:18
… submenu

Saved gateways were radio items, so the submenu reserved a check column in
addition to the icon column and pushed every row right. Use plain items; the
current Gateway shows its live status dot instead of a radio check.

Co-authored-by: Copilot App <[email protected]>
…l-preview

# Conflicts:
#	docs/ARCHITECTURE.md
Preserve notification navigation-admission ownership and account Gateway submenu status routing in the architecture ledger.

Co-authored-by: Copilot App <[email protected]>
Temporarily instrument the unchanged Tray UI selection to identify the repeated native crash. Keep dumps and raw debugger logs in runner temporary storage; export only bounded exception and function-stack metadata.

Co-authored-by: Copilot App <[email protected]>
Match the original coverage-off test process when running the temporary native diagnostic through workflow_dispatch.

Co-authored-by: Copilot App <[email protected]>
Keep host, version, and status metadata out of the native shortcut slot. Expose the current Gateway through localized accessible state without restoring the extra check column.

Co-authored-by: Copilot App <[email protected]>
Preserve the existing PR diagnostics and CodeQL updates alongside the validated accessibility fixes.

Co-authored-by: Copilot App <[email protected]>

# Conflicts:
#	docs/ARCHITECTURE.md
Keep the diagnostic evidence in its dedicated run; restore the normal CI runner and coverage behavior. No product fix or original-crash attribution is implied.

Co-authored-by: Copilot App <[email protected]>
Retain the account update indicator alongside the shared Inbox badge. Preserve the authoritative Inbox ownership and account Gateway submenu status routing.

Co-authored-by: Copilot App <[email protected]>
Preserve the localized current-Gateway state and metadata/shortcut separation alongside latest main Inbox ownership. Keep all temporary crash diagnostics removed.

Co-authored-by: Copilot App <[email protected]>
Wait for the actual visible Back control after opening Settings from the account menu. An existing Settings page marker does not establish that the shell chrome is available to UI Automation.

Co-authored-by: Copilot App <[email protected]>
Avoid a second tree traversal after readiness: the provider can temporarily omit a still-live Settings Back peer. Invoke the captured pattern once, outside polling, with existing deadlines and assertions preserved.

Co-authored-by: Copilot App <[email protected]>
Preserve account-menu resources and ownership alongside Systems and current CI lanes.

Co-authored-by: Copilot App <[email protected]>
Treat an absent, writer-locked, or incomplete DevToolsActivePort as pending within the existing startup deadline. Preserve cancellation, browser-exit and invalid-endpoint failures. Cover the CI sharing violation with real temporary-file regressions.

Co-authored-by: Copilot App <[email protected]>
Use a live-extent scroll only for a settled, completed initial bring that left the same tail target offscreen. Preserve the existing retry/frame budget, generation and input cancellation, and track the corrective scroll's own completion. Keep ordinary initial, follow and reflow requests indexed.

Co-authored-by: Copilot App <[email protected]>
@bkudiess
bkudiess merged commit 6842791 into openclaw:main Nov 10, 2026
29 checks passed
shanselman added a commit to karkarl/openclaw-windows-node that referenced this pull request Nov 11, 2026
Keep main's WaitForEndpointAsync (tolerates a partial or locked DevToolsActivePort, openclaw#2066) together with this branch's direct about:blank page connection and bounded startup diagnostics. The browser-level session id is no longer needed because the socket attaches to the page itself.

Co-authored-by: Copilot App <[email protected]>
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

1 participant