fix: reconcile dashboard lifecycle transitions - #342
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 31 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 (8)
📝 WalkthroughWalkthroughIntroduces a ChangesPending Mutation Result Contract
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant runDashboardSessionMutation
participant scheduleDashboardMutationReconcile
participant Dashboard
Caller->>runDashboardSessionMutation: request mutation
runDashboardSessionMutation->>runDashboardSessionMutation: check settle()
alt settled immediately
runDashboardSessionMutation->>Dashboard: applyDashboardMutationSuccess
runDashboardSessionMutation-->>Caller: "settled"
else not settled
runDashboardSessionMutation->>scheduleDashboardMutationReconcile: schedule reconcile loop
runDashboardSessionMutation-->>Caller: "pending"
scheduleDashboardMutationReconcile->>scheduleDashboardMutationReconcile: poll settle() up to 60s
scheduleDashboardMutationReconcile->>Dashboard: finalize success or clear pending + showDashboardError
end
sequenceDiagram
participant activateDashboardEntry
participant resumeOfflineSessionWithFeedback
participant Dashboard
activateDashboardEntry->>resumeOfflineSessionWithFeedback: resume offline session
resumeOfflineSessionWithFeedback-->>activateDashboardEntry: "pending" | "failed" | "settled"
alt pending
activateDashboardEntry-->>Dashboard: return "pending"
else failed
activateDashboardEntry-->>Dashboard: return "error"
else settled
activateDashboardEntry->>Dashboard: refresh model, render, open live window
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 776-778: The early returns after resumeOfflineServiceWithFeedback
in the dashboard activation flow bypass the stale-activation guard. Update the
pending/failed branches to re-check isCurrentDashboardActivation before
returning, matching the settled-path logic already used elsewhere in the same
activation method. Apply the same freshness check in the other resume outcome
branches referenced by the comment so only the current dashboard activation can
return a result.
In `@src/multiplexer/dashboard-ops.ts`:
- Around line 946-976: The restore flow in dashboard-ops.ts drops teammate
warnings when runDashboardSessionMutation returns "pending" because
restoreWarningLines(resumeResult) is only checked after the main await. Move the
warning handling into the mutation’s onAfterSettle path (near
runDashboardSessionMutation and restoreWarningLines) so both immediate and
delayed settlements can call host.showDashboardError with the warning lines when
the lifecycle is still current.
- Around line 978-979: The non-dashboard resume path in
runResumeOfflineSessionWithFeedback is swallowing failures by always returning
"settled" after the helper call, even when the resume or waitForSessionStart
flow fails. Update runResumeOfflineSessionWithFeedback to return a
success/failure result instead of void, then in the caller branch map a failure
outcome to "failed" rather than unconditionally returning "settled". Use the
existing symbols runResumeOfflineSessionWithFeedback, waitForSessionStart, and
the session resume branch in dashboard-ops to keep the fix localized.
🪄 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: c12f52c1-0d4e-4665-852e-db9f1c907eb1
📒 Files selected for processing (7)
docs/north-star-completion-tracker.mdsrc/multiplexer/dashboard-interaction.test.tssrc/multiplexer/dashboard-interaction.tssrc/multiplexer/dashboard-ops.test.tssrc/multiplexer/dashboard-ops.tssrc/multiplexer/dashboard-tail-methods.tssrc/multiplexer/notifications.test.ts
Summary
Verification
Summary by CodeRabbit
New Features
Bug Fixes