Make the new tray panel the default layout - #712
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (36)
💤 Files with no reviewable changes (16)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe tray-panel flyout is now the only dashboard layout. Native startup, relaunch, proof-mode, and tray paths open or focus the flyout. The frontend removes the separate PopOut dashboard, its controls and styling, and the window-scale setting. ChangesDashboard routing and surface cleanup
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Startup as open_primary_window
participant Flyout as open_flyout_window
participant Window as TrayPanel flyout
Startup->>Flyout: open or focus after startup delay
Flyout->>Window: show or focus
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The dashboard consolidates on the existing tray-panel flyout. No actionable merge-blocking issue is established; native ad-hoc shortcut behavior has not been independently confirmed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Dashboard access consolidates on an existing local window, while retired requests are explicitly rejected. No new privileged access was identified in the inspected paths, but concurrent startup and legacy shortcut behavior remain incompletely verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.87% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 46 functions across 17 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Adversarial validation (Claude Opus 5.5) passed at 5b73340 The worker's explanation holds. The old layout in image 1 is the legacy PopOut dashboard (PopOutPanel + PopOutTitleBar) on the hidden Checks (fresh worktree at the PR head, isolated profile, no real settings read):
Runtime proof (fresh debug build of this head, browser-use over WebView2 CDP, dummy data only):
Screenshots (local):
Notes (not blocking):
|
Summary
The new tray panel (the
flyoutwindow that rendersTrayPanel) is now the only dashboard layout. The old full-window "PopOut" layout (PopOutPanelwith its own "CodexBar" title bar, labelled provider tabs and a Settings/About/Quit footer) could no longer be reached from normal use except through four leftover entry points. This PR reroutes those entry points to the tray panel and retires the old components.Screenshot 3 from the report is not the old layout. It shows the new tray panel: Zoom/Refresh/Settings.../About/Quit footer and icon-only provider switcher. It was a proof build with one seeded Codex card. Its "Included API" label comes from the Mistral detail-line work (
rust/src/providers/mistral/mod.rs:397), not from the product.Why the old layout was still reachable
When the flyout was added (c39232a, 2026-07-04), the PopOut mode from #108 (cd42ece) was kept. Comments described the two layouts as coexisting, and these callers still targeted PopOut (line numbers are from
mainat b585d48):apps/desktop-tauri/src-tauri/src/main.rs:49-55:primary_window_request()returnedSurfaceMode::PopOut/Dashboard. It was used for a normal visible launch (main.rs:308, viashell::reopen_to_target) and for a second launch through single-instance (main.rs:153).apps/desktop-tauri/src-tauri/src/tray_bridge.rs:153-172: the tray menu item "Show Window" (show_panel, added intray_menu.rs:126-129) mapped to PopOut Dashboard. Theprovider:route also mapped to PopOut, but nothing sent it.apps/desktop-tauri/src/App.tsx:107-108: the frontendglobal-shortcut-triggeredlistener calledsetSurfaceMode("popOut"). The native global-shortcut handler already toggles the flyout for every shortcut, so a keyboard shortcut could open both the tray panel and the old window.apps/desktop-tauri/src/hooks/useTrayPanelController.ts:286: anopenPopOutheader action. It was never rendered, so it was dead code.No setting selects the layout, so there are no settings to migrate. The only setting that belonged to the old window is
windowScalePercent(the Display-tab "window scale" slider). Its UI is removed. The field stays insettings.jsonand the bridge so existing files still load.Changes
shell::flyout_window::open_or_focus). The "Show Window" tray item is removed; "Pop Out Dashboard" already opened the tray panel.set_surface_mode("popOut", ...)is rejected with "the popOut surface is retired; use open_flyout_window".CODEXBAR_PROOF_MODE=popOutnow opens the flyout, andpopOut:<provider>payloads are rejected.keep_open_on_blur()soCODEXBAR_START_VISIBLE/ proof launches do not close on blur.PopOutPanel,PopOutTitleBar(and their tests), theMenuSurfacepopout variant/title-bar props, about 300 lines of popout CSS, the Display-tab window-scale slider, and the now-unusedresolve_menu_target,reopen_to_targetandis_supported_provider_id.rust/src/locale.rs,apps/desktop-tauri/src/i18n/keys.tsand all 8.ftlfiles:TooltipBackToTray,TooltipSettings,WindowMaximize,TooltipPopOut,WindowScaleLabel,WindowScaleHelper,WindowScaleAriaLabel,TrayShowWindow.SurfaceMode::PopOutenum value and bridge"popOut"type as data keys (geometry and serialized state), so nothing downstream breaks.App.test.tsx: a stalepopOutmode still renders the tray panel; the shortcut event opens nothing extra.TrayPanel.test.tsx: the default layout has.menu-surface--tray, no popout chrome, and a Zoom/Refresh/Settings.../About/Quit footer.DisplayTab.test.tsx: no window-scale slider.tray_menu.rs: only the tray-panel window entry.tray_bridge.rs: legacyshow_panelandprovider:ids route nowhere.commands/tests.rs:popOutis rejected.proof_harness.rs:popOut:<provider>proof targets are rejected.AGENTS.md: the Surfaces line now says TrayPanel is the only dashboard layout.Validation
cargo +1.98.0 fmt --all --check: passcargo +1.98.0 clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings: passcargo +1.98.0 clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings: passcargo +1.98.0 test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml: 459 of 460 pass on the workstation.bootstrap_payload_exposes_every_provider_variant, which reads the machine's realsettings.json(79 vs 78 because a deprecated provider is enabled there).CODEXBAR_PROOF_HOME), that test passes. This PR does not touch it.cargo +1.98.0 test --manifest-path rust/Cargo.toml --lib locale: 16 passnode apps/desktop-tauri/scripts/check-locale-drift.mjs: OK, 871 keyspnpm --dir apps/desktop-tauri test: 65 files, 393 tests passpnpm --dir apps/desktop-tauri lint: exit 0 (11 warnings, all pre-existing and in untouched files;mainhas 15)pnpm --dir apps/desktop-tauri build: passUI proof
At the maintainer's direction, the proof used browser-use over the WebView2 CDP port (not CUA).
pnpm run tauri:build:debugof this commit, running with an isolated profile and synthetic data only. The Codex seed was 0% session and 7% weekly, and no real accounts were used.Page.captureScreenshotand saved inC:\Users\FSOS\AppData\Local\Win-CodexBar\port-audit\proof\ui-default\shots\:01-traypanel-all.png:trayPanelproof mode, All tab (Codex and Claude show "not signed in" errors because the profile is empty).02-traypanel-codex.png:trayPanelmode, Codex tab.03-popout-mode-opens-flyout-codex.png:CODEXBAR_PROOF_MODE=popOutnow opens theindex.html?window=flyouttray panel. The hiddenmainwebview renders no surface, and the DOM has 0[class*=popout]nodes.04-flyout-codex-tab.png: the flyout's single-provider Codex tab with seeded usage bars, usage dashboard and status links.tray_menu.rsunit test), a second launch through single-instance, and the native global-shortcut path. All three go throughshell::flyout_window::open_or_focus.Affected areas
main.rs,tray_menu.rs,tray_bridge.rs,commands/surface.rs,proof_harness.rs,surface_target.rs,shell/flyout_window.rs,shell/transition.rs,shell/mod.rsApp.tsx,MenuSurface.tsx,TrayPanel.tsx,useTrayPanelController.ts,useSettings.ts,DisplayTab.tsx,styles.css,menu-surface-layout.css;PopOutPanelandPopOutTitleBarare removedrust/src/locale.rs, 8.ftlfiles,i18n/keys.tsAGENTS.mdSummary by CodeRabbit