Repository navigation
Wave 3: Command Center landing + in-app tmux management (Frontend Command Center UX program) - #88
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… launched Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…face, launch rail, legacy surfaces deleted (FW3-SHELL 5bba177) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…p terminals, mobile quick-switch, scrollback pager, desktop key bar (FW3-TMUX-UI 6526629) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ettingsButton (wave-3 review W3/N5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sion gating (FW3-TMUX-UI-R2 c2bcfbe) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe dashboard is reorganized around a root Command Center with unified navigation, attention, and launch surfaces. TMUX gains canonical routing, topology-backed workspace controls, quick switching, pane actions, and paged scrollback history, with expanded unit, contract, and smoke coverage. ChangesCommand Center shell and attention
TMUX workspace and terminal controls
Validation and supporting records
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (6)
apps/dashboard/src/components/orchestrator/OrchestratorSurface.tsx (1)
81-83: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winGuard
refreshAll/refreshagainst rejected promises.
refreshAll(lines 81-83) has no.catch, and it's invoked as a fire-and-forgetvoid refreshAll()at Line 117 and Line 245;void refresh()at Line 186/216 has the same shape. Ifrefresh()orfleet.refresh()ever rejects, this surfaces as an unhandled promise rejection instead of being reflected inallErrors/UI state.♻️ Suggested guard
const refreshAll = async () => { - await Promise.all([refresh(), fleet.refresh()]); + await Promise.all([refresh(), fleet.refresh()]).catch((error) => { + console.error('Failed to refresh attention/fleet data', error); + }); };Also applies to: 117-117, 186-186, 216-216, 245-245
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/dashboard/src/components/orchestrator/OrchestratorSurface.tsx` around lines 81 - 83, Guard the asynchronous refresh flows in OrchestratorSurface: update refreshAll to catch rejections from refresh or fleet.refresh, and add equivalent rejection handling to the fire-and-forget refreshAll and refresh invocations. Route caught errors through the existing allErrors/UI error-state mechanism so no rejected refresh promise becomes unhandled.apps/dashboard/src/components/tmux/TmuxTerminalWorkspace.tsx (1)
64-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared breakpoint constant instead of a literal.
useIsMobile(1024)duplicatesCOMMAND_CENTER_SHELL_BREAKPOINT(now exported fromuseIsMobile.tsand already adopted inTmuxPageClient.tsx). Keeping a raw literal here risks silent drift if the breakpoint is tuned later.♻️ Proposed fix
-import { useHydrated } from '`@/hooks/useHydrated`'; -import { useIsMobile } from '`@/hooks/useIsMobile`'; +import { useHydrated } from '`@/hooks/useHydrated`'; +import { COMMAND_CENTER_SHELL_BREAKPOINT, useIsMobile } from '`@/hooks/useIsMobile`'; ... - const belowDesktop = useIsMobile(1024); + const belowDesktop = useIsMobile(COMMAND_CENTER_SHELL_BREAKPOINT);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/dashboard/src/components/tmux/TmuxTerminalWorkspace.tsx` at line 64, Update the belowDesktop initialization in TmuxTerminalWorkspace to pass the shared COMMAND_CENTER_SHELL_BREAKPOINT constant to useIsMobile instead of the literal 1024, reusing the exported breakpoint already used by TmuxPageClient.apps/dashboard/src/components/tmux/TmuxWindowStrip.tsx (1)
187-277: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLoop/IIFE variable
windowshadows the globalwindowobject.Currently handled safely (line 242 explicitly uses
globalThis.window.setTimeoutto dodge the shadow), but the shadowing itself is a footgun for future edits inside these blocks — any added barewindow.confirm/window.opencall would silently resolve to the tmux window object instead of the global.♻️ Proposed rename
- {windows.map((window) => { - const editing = editingWindowIndex === window.windowIndex; + {windows.map((tmuxWindow) => { + const editing = editingWindowIndex === tmuxWindow.windowIndex; ... - const window = windows.find((candidate) => candidate.windowIndex === contextWindowIndex); - if (!window) return null; + const activeWindow = windows.find((candidate) => candidate.windowIndex === contextWindowIndex); + if (!activeWindow) return null;(rename all references inside the callback bodies accordingly)
Also applies to: 291-297
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/dashboard/src/components/tmux/TmuxWindowStrip.tsx` around lines 187 - 277, Rename the `windows.map` callback variable `window` to a non-conflicting name such as `tmuxWindow`, and update all references within the mapped JSX and event handlers, including the related block around the additional usage at lines 291-297. Preserve the existing behavior and keying while eliminating shadowing of the global `window` object.apps/dashboard/src/components/tmux/TmuxPaneControls.tsx (1)
200-242: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDirectional pane buttons collapse into two actions. Up/Left both target
previousPaneand Down/Right both targetnextPane, and each pair enables/disables together — so the four arrows only ever perform two navigations over a flat pane list. This can mislead users expecting spatial (2D) pane movement. If tmux directional selection is available, consider dispatching direction-basedselect_pane(e.g.-L/-R/-U/-D) instead of index±1; otherwise reducing to two buttons (prev/next) would make the behavior clearer.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/dashboard/src/components/tmux/TmuxPaneControls.tsx` around lines 200 - 242, The directional controls currently map Up/Left to previousPane and Down/Right to nextPane, exposing four misleading buttons for two actions. Update the sheet controls in TmuxPaneControls to dispatch true direction-based tmux pane selection for left, right, up, and down when supported; otherwise replace the four arrows with clearly labeled previous/next controls and preserve the existing pendingAction and availability handling.apps/dashboard/src/components/orchestrator/OrchestratorButton.tsx (1)
33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated attention-status list across two files. Both files independently define the identical
'RUNNING,STARTING,WAITING_FOR_INPUT,WAITING_FOR_APPROVAL,ERROR,IDLE'status string with no shared source of truth, risking future drift between the badge-count logic and the settings-stats logic.
apps/dashboard/src/components/orchestrator/OrchestratorButton.tsx#L33-L33: extract this into a shared constant (e.g. instores/orchestrator.tsor a shared constants module) and import it here.apps/dashboard/src/app/(dashboard)/settings/UsageOverview.tsx#L11-L11: import the same shared constant instead of redefiningWORKFLOW_STATUSES.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/dashboard/src/components/orchestrator/OrchestratorButton.tsx` at line 33, Extract the duplicated attention-status string into one shared exported constant, preferably near the orchestrator store or shared constants. Update apps/dashboard/src/components/orchestrator/OrchestratorButton.tsx lines 33-33 to import and use it, and update apps/dashboard/src/app/(dashboard)/settings/UsageOverview.tsx lines 11-11 to import the same constant instead of redefining WORKFLOW_STATUSES.apps/dashboard/src/components/launch/definitions.ts (1)
20-23: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winTwo independent copies of the mobile-provider set can drift from the
MobileLaunchProviderschema union. Both sites hand-track which providers are mobile-capable rather than deriving from a single source of truth, so a change to theMobileLaunchProviderunion would silently break mobile launch/restore with no compile-time signal.
apps/dashboard/src/components/launch/definitions.ts#L20-L23: replace the.mobile-flag filter +id is MobileLaunchProvidercast with a filter keyed off the actualMobileLaunchProviderunion (e.g. aSetof union members) so the type predicate is sound and the set stays complete.apps/dashboard/src/components/launch/recentLaunchStore.ts#L22-L28: replace the literal'codex'/'claude_code'check with validation against the same shared union (e.g. reuseMOBILE_LAUNCH_PROVIDERS/schema parse) so persisted launches for future providers aren't discarded.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/dashboard/src/components/launch/definitions.ts` around lines 20 - 23, The mobile-provider lists are independently hand-maintained and can diverge from the MobileLaunchProvider union. In apps/dashboard/src/components/launch/definitions.ts#L20-L23, replace the mobile flag filter and cast with membership validation derived from the actual MobileLaunchProvider union, using a shared set or equivalent sound type guard; in apps/dashboard/src/components/launch/recentLaunchStore.ts#L22-L28, reuse that shared provider validation or schema instead of checking only 'codex' and 'claude_code', so future union members are preserved.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/dashboard/src/app/`(dashboard)/settings/UsageOverview.tsx:
- Around line 53-58: Update the session bucket calculations in the UsageOverview
memo so active sessions exclude any session marked idle via idled_at, reusing
the existing isIdle predicate if available. Keep attention unchanged and ensure
each session is counted in only one bucket.
In `@apps/dashboard/src/components/layout/SidebarNav.tsx`:
- Around line 82-88: Update the isActive helper to avoid partial route matches
by returning true only when pathname exactly equals path or begins with path
followed by a slash. Preserve the special root-path handling and query-string
stripping, matching the route behavior used by MobileBottomNav.
In `@apps/dashboard/src/components/tmux/TmuxTerminalWorkspace.tsx`:
- Around line 144-150: Update the secondary terminal rendering in
TmuxTerminalWorkspace to use PersistentTerminalSlot instead of mounting
TerminalView directly, passing the secondary session and pane identifiers plus
its controller and attachment state. Preserve the existing split behavior while
ensuring the secondary terminal remains on the persistent host across closing
and switching.
In `@apps/dashboard/src/components/tmux/windowActions.ts`:
- Around line 40-58: Update the close confirmation logic in runTmuxWindowAction
so topology-sourced windows always require confirmation: retain the
session-ending warning when windowCount is 1, and use the standard “Close this
window?” confirmation when windowCount is greater than 1, matching the roster
path.
In `@apps/dashboard/src/stores/tmuxTopology.ts`:
- Around line 198-254: Update the live topology handling around setRoster and
liveSnapshotIsFresh so expired live snapshots are removed automatically rather
than only during roster updates. Add a timer-based expiration path for each host
that clears liveByHost and rebuilds the host from its roster when the snapshot
becomes stale, while preserving fresh live views and avoiding timers for absent
or already-expired snapshots.
---
Nitpick comments:
In `@apps/dashboard/src/components/launch/definitions.ts`:
- Around line 20-23: The mobile-provider lists are independently hand-maintained
and can diverge from the MobileLaunchProvider union. In
apps/dashboard/src/components/launch/definitions.ts#L20-L23, replace the mobile
flag filter and cast with membership validation derived from the actual
MobileLaunchProvider union, using a shared set or equivalent sound type guard;
in apps/dashboard/src/components/launch/recentLaunchStore.ts#L22-L28, reuse that
shared provider validation or schema instead of checking only 'codex' and
'claude_code', so future union members are preserved.
In `@apps/dashboard/src/components/orchestrator/OrchestratorButton.tsx`:
- Line 33: Extract the duplicated attention-status string into one shared
exported constant, preferably near the orchestrator store or shared constants.
Update apps/dashboard/src/components/orchestrator/OrchestratorButton.tsx lines
33-33 to import and use it, and update
apps/dashboard/src/app/(dashboard)/settings/UsageOverview.tsx lines 11-11 to
import the same constant instead of redefining WORKFLOW_STATUSES.
In `@apps/dashboard/src/components/orchestrator/OrchestratorSurface.tsx`:
- Around line 81-83: Guard the asynchronous refresh flows in
OrchestratorSurface: update refreshAll to catch rejections from refresh or
fleet.refresh, and add equivalent rejection handling to the fire-and-forget
refreshAll and refresh invocations. Route caught errors through the existing
allErrors/UI error-state mechanism so no rejected refresh promise becomes
unhandled.
In `@apps/dashboard/src/components/tmux/TmuxPaneControls.tsx`:
- Around line 200-242: The directional controls currently map Up/Left to
previousPane and Down/Right to nextPane, exposing four misleading buttons for
two actions. Update the sheet controls in TmuxPaneControls to dispatch true
direction-based tmux pane selection for left, right, up, and down when
supported; otherwise replace the four arrows with clearly labeled previous/next
controls and preserve the existing pendingAction and availability handling.
In `@apps/dashboard/src/components/tmux/TmuxTerminalWorkspace.tsx`:
- Line 64: Update the belowDesktop initialization in TmuxTerminalWorkspace to
pass the shared COMMAND_CENTER_SHELL_BREAKPOINT constant to useIsMobile instead
of the literal 1024, reusing the exported breakpoint already used by
TmuxPageClient.
In `@apps/dashboard/src/components/tmux/TmuxWindowStrip.tsx`:
- Around line 187-277: Rename the `windows.map` callback variable `window` to a
non-conflicting name such as `tmuxWindow`, and update all references within the
mapped JSX and event handlers, including the related block around the additional
usage at lines 291-297. Preserve the existing behavior and keying while
eliminating shadowing of the global `window` object.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1a7ac852-b042-4211-aede-fda569b22729
📒 Files selected for processing (77)
apps/dashboard/public/manifest.jsonapps/dashboard/src/app/(dashboard)/layout.tsxapps/dashboard/src/app/(dashboard)/orchestrator/OrchestratorPageClient.tsxapps/dashboard/src/app/(dashboard)/orchestrator/page.tsxapps/dashboard/src/app/(dashboard)/page.tsxapps/dashboard/src/app/(dashboard)/sessions/SessionsPageClient.tsxapps/dashboard/src/app/(dashboard)/settings/UsageOverview.tsxapps/dashboard/src/app/(dashboard)/settings/page.tsxapps/dashboard/src/app/(dashboard)/tmux/TmuxPageClient.tsxapps/dashboard/src/app/(dashboard)/tmux/page.tsxapps/dashboard/src/components/SpawnSessionDialog.tsxapps/dashboard/src/components/automation/AutomationAgentCard.tsxapps/dashboard/src/components/launch/LaunchRail.tsxapps/dashboard/src/components/launch/MobileLaunchSheet.tsxapps/dashboard/src/components/launch/definitions.test.tsapps/dashboard/src/components/launch/definitions.tsapps/dashboard/src/components/launch/recentLaunchStore.tsapps/dashboard/src/components/layout/AttentionSettings.tsxapps/dashboard/src/components/layout/AttentionSummary.tsxapps/dashboard/src/components/layout/GlobalSidebar.tsxapps/dashboard/src/components/layout/HeaderConnectionStatus.tsxapps/dashboard/src/components/layout/MobileBottomNav.tsxapps/dashboard/src/components/layout/MobileHeader.tsxapps/dashboard/src/components/layout/QuickSpawn.tsxapps/dashboard/src/components/layout/RecentSessions.tsxapps/dashboard/src/components/layout/SidebarNav.tsxapps/dashboard/src/components/layout/index.tsapps/dashboard/src/components/layout/shellContracts.test.tsapps/dashboard/src/components/orchestrator/OrchestratorButton.tsxapps/dashboard/src/components/orchestrator/OrchestratorFleetCard.tsxapps/dashboard/src/components/orchestrator/OrchestratorItem.tsxapps/dashboard/src/components/orchestrator/OrchestratorModal.tsxapps/dashboard/src/components/orchestrator/OrchestratorSurface.tsxapps/dashboard/src/components/orchestrator/index.tsapps/dashboard/src/components/session-generator/RepoPicker.tsxapps/dashboard/src/components/session-generator/SessionConfigStep.tsxapps/dashboard/src/components/session-generator/index.tsapps/dashboard/src/components/session/SessionWorkbench.tsxapps/dashboard/src/components/settings/SettingsButton.tsxapps/dashboard/src/components/settings/index.tsapps/dashboard/src/components/terminal/ScrollbackPager.tsxapps/dashboard/src/components/terminal/TerminalSurface.tsxapps/dashboard/src/components/terminal/scrollbackPaging.test.tsapps/dashboard/src/components/terminal/scrollbackPaging.tsapps/dashboard/src/components/tmux/TmuxActionSheet.tsxapps/dashboard/src/components/tmux/TmuxKeyBar.tsxapps/dashboard/src/components/tmux/TmuxMobileShell.tsxapps/dashboard/src/components/tmux/TmuxPaneControls.tsxapps/dashboard/src/components/tmux/TmuxQuickSwitchStrip.tsxapps/dashboard/src/components/tmux/TmuxTerminalWorkspace.tsxapps/dashboard/src/components/tmux/TmuxWindowStrip.tsxapps/dashboard/src/components/tmux/paneActions.test.tsapps/dashboard/src/components/tmux/paneActions.tsapps/dashboard/src/components/tmux/quickSwitch.test.tsapps/dashboard/src/components/tmux/quickSwitch.tsapps/dashboard/src/components/tmux/windowActions.test.tsapps/dashboard/src/components/tmux/windowActions.tsapps/dashboard/src/hooks/useIsMobile.tsapps/dashboard/src/hooks/useTmuxRosterData.test.tsapps/dashboard/src/hooks/useTmuxRosterData.tsapps/dashboard/src/hooks/useTmuxTopology.tsapps/dashboard/src/lib/api.tsapps/dashboard/src/stores/settings.tsapps/dashboard/src/stores/tmuxTopology.test.tsapps/dashboard/src/stores/tmuxTopology.tsapps/dashboard/src/stores/ui.tstasks/2026-07-20-fw3-shell-brief.mdtasks/2026-07-20-fw3-tmux-ui-brief.mdtasks/2026-07-20-fw3-tmux-ui-corrections-brief.mdtasks/2026-07-20-fw4-fleet-brief.mdtasks/2026-07-20-fw4-surfaces-brief.mdtasks/frontend-ux-handoffs/fw3-shell.mdtasks/frontend-ux-handoffs/fw3-tmux-ui.mdtasks/frontend-ux-log.mdtasks/frontend-ux-metrics.jsonltasks/lessons.mdtests/smoke/dashboard.spec.ts
💤 Files with no reviewable changes (7)
- apps/dashboard/src/components/SpawnSessionDialog.tsx
- apps/dashboard/src/app/(dashboard)/orchestrator/OrchestratorPageClient.tsx
- apps/dashboard/src/components/settings/SettingsButton.tsx
- apps/dashboard/src/components/layout/MobileHeader.tsx
- apps/dashboard/src/components/orchestrator/OrchestratorModal.tsx
- apps/dashboard/src/components/settings/index.ts
- apps/dashboard/src/stores/ui.ts
… nav matching, confirm on every topology window close Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review threads: (1) idle/active buckets now mutually exclusive (2d64726); (2) nav active-state uses exact/boundary matching (2d64726); (3) secondary terminal is intentionally ephemeral — the persistent-host budget is 1 background terminal by locked design; both visible terminals are foreground and the ephemeral slot cleans up its WS on unmount (verified in adversarial review); (4) every topology-mode window close now confirms, matching native tmux confirm-before (2d64726); (5) stale live-topology snapshots clear on the roster feed cadence today; a timer-based fallback is scoped into the Wave-4 fleet data-flow rework (brief updated). |
Third wave — the visible one. Per-wave deploy cadence.
FW3-SHELL (5bba177)
/tmuxis a query-preserving redirect; signin callback + PWA start_url target/.OrchestratorModalduplication deleted;/orchestratordeep links preserved.MobileLaunchSheetis the single launch surface; legacySpawnSessionDialogdeleted; provider/template definitions centralized.FW3-TMUX-UI (6526629 + R2 c2bcfbe)
tmux.topologywith per-host roster fallback + 30s staleness TTL.Verification chain
Deploy notes
.nextdev-cache note: after this route restructure, local dev environments should clearapps/dashboard/.nextonce.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests