Harden dashboard async lifecycle paths - #232
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 1 minute and 1 second. 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 refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit 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 (2)
📝 WalkthroughWalkthroughLifecycle token capture is added to ChangesDashboard lifecycle gating and API routing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.test.ts`:
- Around line 396-410: The test assertion on `postToProjectService` does not
uniquely verify that the adapter routing through `mutateDashboardApi` is being
used, as both the old and new code paths could satisfy this expectation. Add a
spy or mock for the `mutateDashboardApi` function in the test setup for the host
object, and then add a separate expectation to verify that `mutateDashboardApi`
was actually called during the `handleDashboardKey` invocation to ensure the
adapter routing is properly tested.
In `@src/multiplexer/dashboard-model.test.ts`:
- Around line 1067-1075: The assertions for host.renderDashboard at lines 1075
and 1107 are being checked outside the vi.waitFor block, which creates a race
condition where the render check may execute before the refresh promise chain
completes, causing flaky tests. Move both renderDashboard assertions inside
their respective vi.waitFor blocks so they are evaluated together with the
refreshDashboardModelFromService assertion, ensuring the test waits for the
complete reconciliation flow to settle before verifying render state.
🪄 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: 42110a66-d81a-462e-8e14-5aba67247410
📒 Files selected for processing (5)
src/multiplexer/dashboard-interaction.test.tssrc/multiplexer/dashboard-interaction.tssrc/multiplexer/dashboard-model.test.tssrc/multiplexer/dashboard-model.tssrc/multiplexer/dashboard-view-methods.ts
Summary
Verification
Summary by CodeRabbit
Bug Fixes
Tests