fix(web): VCS status refresh no longer trips the slow-request toast #22159
main fromrefs/pull/22159/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubThe "Some requests are slow" toast kept showing vcs.refreshStatus. Each window focus and each branch menu open sends this refresh, and it often takes more than 15s.
Server traces show that this is normal work, not a hang. In one 22s refresh, the request first waited 16s for the background poll of the same repo to release its lock. That poll had a fetch timeout (5s), two GitHub PR lookups (about 4s each), and an auto-pull (6s). Then the refresh did its own PR lookup (5s).
This PR moves vcs.refreshStatus to the existing 120s "slow by design" threshold, which provider and server updates already use. A real stall, such as a hung gh, still shows the toast.
We did not make the RPC return early (as #13052 tried). Mobile's explicit refresh shows a spinner until the RPC completes, so it would stop too soon. Also, the lock ordering keeps a refresh from reusing a poll that started before gh pr create.
Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved
Created with Claude Opus 5.5 in T3 Code (Claude Code harness).
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
a848c253-65b7-433d-b1b0-3652d75b8781
📥 Commits
-
Reviewing files that changed from the base of the PR and between 94827737ea018902dd2e932cddb51643365dc446 and 44d1c0c249c8c6a38991013bc605e6617f1acf22.
📒 Files selected for processing: 2
-
apps/web/src/rpc/requestLatencyState.test.tsapps/web/src/rpc/requestLatencyState.ts
Included review availability: This review used your included allowance. 5 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.
-
📝 Walkthrough
-
vcsRefreshStatusnow uses the long-running acknowledgment threshold. A parameterized test checks its warning behavior alongsideserverUpdateProvider.Changes: RPC latency warnings
Layer / File(s) Summary Long-running acknowledgment coverage
apps/web/src/rpc/requestLatencyState.ts,apps/web/src/rpc/requestLatencyState.test.tsThe documentation describes long-running VCS status refresh work. vcsRefreshStatusis included in the long-running method set. The parameterized test checks that both covered methods trigger warnings at the configured threshold.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
maria-rcks
Merge Risk: ⚪ Minimal · up to
44d1c-
No actionable merge-blocking risk was identified; the threshold change is ready to merge.
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly and concisely describes the main fix: preventing normal VCS status refreshes from triggering the slow-request toast. Description check The description clearly explains the problem, root cause, implementation, expected behavior, and scope decisions. It does not provide focused test or manual verification results, but the main required… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Description check
-
Explanation
The description clearly explains the problem, root cause, implementation, expected behavior, and scope decisions. It does not provide focused test or manual verification results, but the main required information is present and the description is mostly complete.
-
✨ Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — This changes the default slow-request toast threshold for all VCS status refreshes from 15 seconds to 120 seconds, while adding focused test coverage. The implementation is small and localized, but the user-visible default behavior change warrants human review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).