fix(desktop): poll PR status for all open workspaces#793
fix(desktop): poll PR status for all open workspaces#793
Conversation
Previously, GitHub PR status was only fetched when hovering over a workspace or for the active workspace. This adds background polling for all open worktree workspaces so PR badges update automatically. The polling is designed to be completely non-blocking with silent failures and deferred initial fetches.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR introduces a new Changes
Sequence DiagramsequenceDiagram
actor User
participant WS as WorkspaceSidebar
participant Hook as usePRStatusPolling
participant QC as Query Client
participant WQ as getAllGrouped<br/>(Workspace Query)
participant GH as GitHub PR<br/>Status Queries
User->>WS: Mount Component
WS->>Hook: Call usePRStatusPolling()
Hook->>QC: Initialize hook
Hook->>WQ: Fetch all grouped workspaces
WQ-->>Hook: Return worktree workspaces
loop Every 30 seconds
Hook->>GH: Query PR status (per workspace)
GH-->>Hook: Status data (or reuse placeholder)
Hook->>QC: Update query cache silently
end
Note over Hook: Refetch disabled on window focus,<br/>mount, and reconnect
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
Test plan
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.