Repository navigation
feat(ui): move the Mac app Gateway picker into the sidebar footer - #145341
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 11, 2026, 6:36 PM ET / 22:36 UTC (Revision 2). ClawSweeper reviewWhat this changesMoves the Mac dashboard’s Gateway identity and switching controls from the chat header into the sidebar account card and menu, including single-Gateway setups. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 4 items remain This remains a useful, distinct improvement over current main. Both prior findings remain actionable: the shipped Option-click shortcut is lost, and the dedicated Gateway picker guide still describes the removed control. Priority: P2 Review scores
Verification
How this fits togetherThe Mac app supplies saved Gateway identities and health to the embedded Control UI. The sidebar displays that snapshot and sends selection, window, settings, and promotion requests through the existing native bridge. flowchart LR
A[Saved Mac Gateways] --> B[Native Gateway snapshot]
B --> C[Sidebar account card]
C --> D[Gateway menu]
D --> E{Selected action}
E --> F[Existing native bridge]
F --> G[Switch or open Gateway window]
F --> H[Settings or primary confirmation]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -89, Tests -61, Docs +7. Total -143 across 21 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep one sidebar-owned picker while preserving shipped window-opening gestures and consistent documentation. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the shortcut regression: Option-click bypasses the new modifier guard and reaches ordinary selection. No application code or tests were executed during this read-only review. Is this the best way to solve the issue? The sidebar relocation is a focused reuse of the existing bridge, but it should preserve Option-click and update the dedicated guide before merging. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b6b7ec4b7d3e. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Show native Gateway identity and health below the account name and move switching, primary promotion, and settings into the identity menu. Preserve the 53px footer and one-line web card; remove the chat header picker and its plumbing.
bb17a3d to
434e4d0
Compare
|
Merged via squash.
|
…enclaw#145341) * feat(ui): move the Mac app Gateway picker into the sidebar footer Show native Gateway identity and health below the account name and move switching, primary promotion, and settings into the identity menu. Preserve the 53px footer and one-line web card; remove the chat header picker and its plumbing. * fix(ui): align the Gateway menu actions with their icons
What Problem This Solves
The Mac app's Gateway picker lived in the chat header, tied to the rightmost chat pane and hidden when only one Gateway was saved. Gateway identity and switching belong with the persistent account controls at the bottom-left of the dashboard.
Why This Change Was Made
The footer account card now shows the user name above the current Gateway's health dot, name, and primary tag. Offline state shows Reconnecting…. The footer remains 53px high, with 18px/14px text lines and a 28px avatar; the browser-hosted card remains one line and the existing accessible label is preserved.
The identity menu places a Gateway section after the profile header. It lists every saved Gateway with accessible health labels, primary/current indicators, selection, Command/Control-click to open another window, conditional Set as primary…, and Gateway settings…. Normal actions use the menu's selection event so keyboard activation works; modified context-menu events handle macOS Control-click. The native snapshot and Swift bridge are unchanged. Actions use the existing lazy sidebar-menu boundary, and the display-only footer reads the injected snapshot directly.
The old chat header picker, its property plumbing/subscription, CSS, and tests are removed. English strings moved to
nav.gatewayusing the repository's generated, post-merge locale workflow; no locale adapters, translation memory, or budget baselines were edited. The macOS guide documents the new location.User Impact
Mac users can see and switch Gateways from the sidebar on every route, including when only one Gateway is configured. Opening the current Gateway normally sends no selection command. All native menu actions close the menu after dispatch.
Evidence
Inspected synthetic fixtures only, captured in Chromium with the native bridge injected before load, light appearance, 1280×800 viewport, and device scale factor 2.
Production LOC: +176 / −268 = −92. Tests and test support (including isolated-lane registration): +212 / −273 = −61. Documentation: +7. Production plus documentation remains −85.
The committed JavaScript baseline is 353,694 B. The final build is 331 B above baseline, within the 512 B allowance (growth limit 354,206 B). No budget or baseline file changed.
Validation commands and outcomes:
Both pass with the measurements above.
Final applicable results: 563 targeted tests pass: sidebar 361, responsive browser 126, footer browser 3, header 44, chat page 28, native Gateway menu 1. The initial shared run exposed three test-state contamination failures from resetting the native bridge's modules; the new case now has its own isolated entrypoint with the real bridge and a
vi.fnpostMessage stub. The full sidebar rerun passes. The chat-page test belongs to the isolated lane and was run there explicitly.Before capture: 1 passed. After capture plus existing account-footer E2E: 4 passed. Final interaction verification: 1 passed, proving actual Enter selection, current-Gateway no-op, Command/Control-click window dispatch, menu closure, and settings dispatch. The interaction probe caught and verified the macOS Control-click context-menu fix. The scratch file is parked outside the tree and is not committed.
All pass. The i18n baseline command requires no raw-copy baseline changes; generated translations remain owned by the post-merge refresh. Grepping
ui/src,extensions, andappsfinds no remaining references tochat-pane__gateway,gatewayPicker,showGatewayPicker, orgatewaysSnapshot.Both commands pass (exit 0). The timed run completed with every selected lane marked
ok, including core-test and UI typechecks, all three dead-export scans, core lint, UI style lint, and script lint. The first run caught a test-helper consistent-return error; it is fixed, and focused type-aware lint plus both full reruns pass. This checker suppresses successful tables unless--timedis set; the table below was read and verified. The known nested-worktree declaration-path failure did not occur.Completed changed-check timing table
Independent Codex autoreview of the final staged diff completed scoped-clean, with no accepted/actionable P0–P2 findings. An earlier accessibility concern was checked against the original source: the old chip exposed health labels only in its menu rows, and those labels remain in the new menu. The final review included that comparison evidence.
Scope/proof notes: the native-menu case lives in a dedicated isolated test file instead of the shared identity-menu case file because the real native capability is a singleton. There is no production behavior deviation from the requested design and no STOP condition was hit. Proof uses the mocked Control UI and injected native bridge; the live signed Mac app/WKWebView and the full repository test suite were not run. This PR remains a draft; it is not marked ready or merged.