Repository navigation
Conversation
…ad read instead of hiding its threads When GitHub refused only the review-thread read with a rate limit or a held pause, the activity read swallowed the error and returned zero threads marked truncated. Clients showed "partially loaded" and the result was cached as a success. The thread read now lets rate-limit errors through, as getViewerPermissions does, so the activity read fails as rate-limited, the same as when the remarks read is limited. Other thread-read failures still degrade to the truncated fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Rate-limited review-thread reads now report an existing rate-limit error instead of appearing as empty threads. The change is confined to read-error handling, with other fallback behavior unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentpartial verification of head live github activity loaded on both revisions: two comments, one review approval, and commit activity. on the pr, expanding/collapsing comments, reversing timeline order, and opening the two-file code tab worked. a real codex turn read and returned the exact pr head. the four existing main, normal activity path: pr head, same normal activity data: pr head, timeline interactions: real provider turn on the pr checkout: runtime transcript: https://uploads-production-47e4.up.railway.app/files/3da693d1-5b5e-42ba-9017-975a9ebc4726/32620-runtime.txt Not verifiedthe changed rate-limit failure path is unverified. github accepted both reads on main and the pr, so the original bug did not reproduce. no review-thread-only rate limit or host pause occurred. without simulated responses, this run cannot prove the rate-limited activity error, retry/reset recovery, success-cache behavior after that failure, or the non-rate-limit thread-read fallback in the running app. the focused tests cover the error mapping, but do not replace this missing integration proof. native mobile and electron clients were not exercised. this is not a claim that the fix has been verified end to end. |
|
Note 🤖 Opus 5.5 replying on behalf of Victor. Thank you, Maria, for running Noted on what stays open: GitHub accepted every review-thread read in your run, so the rate-limited path itself didn't reproduce live, and the desktop and mobile clients weren't exercised. The PR's own verification covers that path with a stub GitHub Enterprise host that refuses only the review-thread query, on web and on the Android app, plus the tests for a rate limit, a rate-limit pause and a non-rate-limit failure that still falls back to the truncated result. We're glad to follow up if anyone sees it behave differently on a real limit. |




Problem
The GitHub activity read fetches the PR's comments and its review threads at the same time. If GitHub rate-limits only the review-thread read,
getChangeRequestActivityswallows that error (Effect.orElseSucceed) and returns success with zero review threads marked truncated. The PR panel then shows the comments with "This conversation is only partially loaded", the review threads disappear with no reason given, and the service caches that result as a success (60 s on an open PR, 10 min on a merged one). The review guide and fix prompt also get no threads.Expected: the same rate-limited state the panel already shows when the comments read is limited. GitLab (#18817) and Bitbucket (#12486) already pass rate limits through from their optional activity reads. GitHub is the one provider left.
This is most likely when the thread read is the only request refused: it makes more requests than the comments read (thread pages plus dismissal pages), so it can hit primary quota exhaustion partway through, a secondary limit (403 +
Retry-After) on one page, or a host pause recorded between the two reads.Change
In
GitHubPullRequestProvider.ts, the thread read now usesEffect.catchIfand letsGitHubApiRateLimitErrorandSourceControlRateLimitPausedErrorthrough, asgetViewerPermissionsandreadChecksin the same file already do. The activity read then fails with reasonrate-limited, which the existing mapping and UI already handle. Any other thread-read failure still falls back to the truncated result, as before.The thread read moved into a local
constbecause, written inline inside theEffect.alltuple, thecatchIfpredicate's error was typedany.Not changed: an authentication error on the thread read alone still falls back to the truncated result. The comments read runs with the same credential and already surfaces auth failures, so that is left out of this PR.
Scope and approval
A small, focused fix for an obvious bug, so it qualifies without a prior issue: a rate limit is reported as missing data. It changes one fallback in one provider, matches the GitLab and Bitbucket fixes above, and adds no new behavior or setting. Related but separate: #27579 and #27595 (reads during a pause) do not touch this fallback.
Verification
getChangeRequestActivitydescribe inGitHubPullRequestProvider.test.ts: a rate limit and a rate-limit pause on the thread read now failrate-limitedwith theretryAt; a 500 on the thread read still returns activity with truncated threads.vp test run src/server/GitHubPullRequestProvider.test.ts -t getChangeRequestActivity→ 2 failed (activity succeeded withreviewThreads: [],reviewThreadsTruncated: true), 2 passed.vp run check:changed <base>: format, lint, knip, graphql, typecheck (11 packages) and tests (3 files) pass.vp run devserver, with isolated state, talking to a stub GitHub Enterprise host with a fake token. The stub serves one PR, answers the comments read, and returns a secondary rate limit (403,retry-after: 120) for every review-thread query. Same steps on base and on this branch, in the web client and in the Android app on an emulator. The emulator renders in software, so the Android captures show behavior, not rendering.Web, base: the comments load, the review threads are missing, and the panel says the conversation is only partially loaded.
Web, this branch: the activity section shows the rate-limit error with Retry.
Android (emulator), base: the Activity tab shows the comments and "More activity is available on the provider."
Android (emulator), this branch: the Activity tab shows the rate-limit error instead of the timeline.
Not checked: a live github.com rate limit, and iOS (same shared mobile screen as Android). The rate-limited state shows GitHub's message; this PR does not add a reset time to the UI.
Generated with Claude Opus 5.5, GPT-6.1 Terra and GPT-6.1 Sol in T3 Code Nightly