Harden TUI API runtime settlement#253
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 29 minutes and 16 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughDashboard keyboard handling now separates plain hjkl navigation from shifted commands, and the footer/help text reflects the new key labels. Project-root-aware tmux lookup now feeds snapshots, runtime reports, stop flows, and restart sequencing. ChangesDashboard navigation and hints
Project-root tmux runtime flow
Sequence Diagram(s)sequenceDiagram
participant restartAimuxControlPlaneUnlocked
participant ensureDaemonRunning
participant stopProjectService
participant ensureService
restartAimuxControlPlaneUnlocked->>ensureDaemonRunning: ensureDaemonRunning()
loop each projectRoot
restartAimuxControlPlaneUnlocked->>stopProjectService: stopProjectService(projectRoot)
restartAimuxControlPlaneUnlocked->>ensureService: ensureService(projectRoot)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/tui/screens/dashboard-renderers.ts (1)
369-377: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winSession-level footer hints still understate the new
hjklbindings.At session level,
j/kmove selection andh/lmap to back/open insrc/multiplexer/dashboard-interaction.ts, but the footer still advertises↑↓,Enter, andEscseparately with only a generichjkl navhint. That makes the new bindings less discoverable than the worktree and flat-list variants. Consider mirroring the combined labels here too (↑↓/jk,Enter/l,Esc/h).🤖 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 `@src/tui/screens/dashboard-renderers.ts` around lines 369 - 377, The session-level footer hints in dashboard rendering still underrepresent the new hjkl bindings, so update the hint list built in dashboard-renderers.ts to mirror the combined labels used elsewhere. In the footer returned for the session view, make the selection, open, and back hints explicitly show the paired shortcuts from dashboard-interaction.ts (j/k with ↑↓, l with Enter, h with Esc) instead of only a generic hjkl nav entry, so the displayed hints match the actual navigation bindings.
🤖 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 `@src/multiplexer/dashboard-interaction.ts`:
- Around line 503-526: Rebuild and commit the generated dist artifacts for this
dashboard runtime change; the behavior update in dashboard-interaction should
not be left only in src. After updating the relevant logic in
dashboard-interaction and any related runtime entrypoints, run yarn build so the
checked-in dist output reflects the new key handling. Verify the build output is
included alongside the src change, since vitest/typecheck coverage alone is not
sufficient for runtime or CLI behavior changes.
- Around line 182-197: The navigation logic in dashboard-interaction.ts is using
Math.max(0, order.indexOf(...)) for the focused worktree, which makes stale
focus skip the first item when moving with j/down and jump to the last item with
k/up. Update the handling in the down/up key cases to detect when
focusedWorktreePath is not found in host.dashboardState.worktreeNavOrder and
reset it to a valid starting position before applying the wraparound step, so
navigation begins from the first worktree instead of an offset index.
In `@src/multiplexer/dashboard-model.ts`:
- Around line 694-695: Thread projectRoot through the remaining project-scoped
reads in computeDashboardSessions and the surrounding dashboard model flow.
Update the loadMetadataState call to use the explicit root instead of implicit
cwd, and pass projectRoot into the findMainRepo path used by worktree resolution
so all metadata and main-checkout lookups stay aligned with the same project.
Keep the existing projectRootFor(host) value as the single source of truth and
propagate it consistently through these reads.
- Around line 59-67: The unhydrated check in hasUnhydratedLiveAgentWindow only
looks for missing session IDs in host.sessions, so it can incorrectly treat
agent windows as hydrated even when sessionWorktreePaths and sessionTmuxTargets
are still empty. Broaden the condition to also detect sessions that exist in
host.sessions but are missing tmux-backed hydration state, and make
buildDesktopStateSnapshot()/restoreTmuxSessionsFromTopology() rely on that
stronger signal so computeDashboardSessions() includes fields like worktreePath
when managedWindows already has them.
In `@src/multiplexer/dashboard-ops.ts`:
- Around line 192-194: The tmux lookup in `hasManagedWindows` is using the
untrimmed `host.projectRoot` even after validating it, so update the
`projectRoot` assignment to preserve the trimmed value before calling
`host.tmuxRuntimeManager.listProjectManagedWindows`. Keep the fix localized
around `host.projectRoot`, `projectRoot`, and the `listProjectManagedWindows`
call so managed-window matching uses the normalized path.
---
Outside diff comments:
In `@src/tui/screens/dashboard-renderers.ts`:
- Around line 369-377: The session-level footer hints in dashboard rendering
still underrepresent the new hjkl bindings, so update the hint list built in
dashboard-renderers.ts to mirror the combined labels used elsewhere. In the
footer returned for the session view, make the selection, open, and back hints
explicitly show the paired shortcuts from dashboard-interaction.ts (j/k with ↑↓,
l with Enter, h with Esc) instead of only a generic hjkl nav entry, so the
displayed hints match the actual navigation bindings.
🪄 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: d56ce170-ea20-4bd4-8067-92e2cad055a1
📒 Files selected for processing (16)
src/multiplexer/dashboard-interaction.test.tssrc/multiplexer/dashboard-interaction.tssrc/multiplexer/dashboard-model.test.tssrc/multiplexer/dashboard-model.tssrc/multiplexer/dashboard-ops.test.tssrc/multiplexer/dashboard-ops.tssrc/multiplexer/runtime-state.test.tssrc/multiplexer/runtime-state.tssrc/multiplexer/session-runtime-core.tssrc/runtime-coherence.test.tssrc/runtime-coherence.tssrc/runtime-restart.test.tssrc/runtime-restart.tssrc/tui/screens/dashboard-renderers.test.tssrc/tui/screens/dashboard-renderers.tssrc/tui/screens/overlay-renderers.ts
|
Independent review findings resolved in db31fab:
|
|
CodeRabbit outside-diff footer hint item handled in 2cce3a6: session-level dashboard hints now advertise ↑↓/jk, Enter/l, and Esc/h explicitly, with renderer test expectations updated. |
Summary
Verification
Summary by CodeRabbit
New Features
hjkldashboard navigation, includingj/kmovement andh/lmode switching.Bug Fixes