Uh oh!
There was an error while loading. Please reload this page.
fix(pull-requests): reuse github api reads - #9176
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a substantial cross-cutting change that alters pull-request freshness, caching, fallback behavior, process scheduling, and linked-thread polling defaults. It also adds an authenticated RPC and modifies authorization code, so the runtime and access-surface changes require human review. You can add or adjust custom eligibility rules. Learn more. |
50f36df to
f183b57Comparef183b57 to
b2b3378CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fc66aab. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Renumbers the v2 migrations 044-052 to 045-053 behind main's 044_ClearAutomaticProjectModelDefaults, and adopts main's sticky new-thread selection (#9164), local-only worktree bases in the v2 launch path (#8751), the PR summary read for settlement (#9176), Claude per-cwd skills (#9210), the provider editor redesign with the branch's dedicated environment fields re-grafted (#8508), and the client half of continue-threads-across-restart (#9167). The server-side continuation markers stay unported: they live in the v1 session directory, and v2 recovery terminalizes running runs on restart, so the capability is withheld until the v2 runtime carries them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…continuation, provider editor redesign, context meter opt-in, linked-PR summaries) Brings the fork up to origin/main e0da6c6..b57726c. Highlights: continue active threads across server self-updates (pingdotgg#9167), provider editor and models list redesign (pingdotgg#8508), opt-in context window meter (pingdotgg#9190), linked-PR summary RPC with last-good caching (pingdotgg#9176), relay credential refresh before expiry (pingdotgg#9178), composer draft preserved through worktree setup (pingdotgg#9197), project skill discovery for Claude (pingdotgg#9210), copy-path on diff headers (pingdotgg#2403), mobile long-press file references (pingdotgg#9258). Conflict resolutions (14 files), keep-both unless noted: - RpcAuthorization / contracts rpc / ws.ts: fork's PR rank, cherry-pick and upstream-release RPCs sit beside upstream's new pullRequestsSummary. - ws.ts route layer: fork's computer task/view brokers plus upstream's serverSelfUpdate wrapped in withRunningThreadContinuation. - PullRequestService: fork's upstream-project reads and scoped diff epochs kept; upstream's summary read, refCacheKey and viewer-flight invalidation added. invalidate() now scopes diff-only invalidation AND clears viewer flights on a whole-workspace refresh. Test file keeps both new suites. - client-runtime pullRequests: fork's PR stack atoms kept, TTL constant takes upstream's new name. - ChatMarkdown: upstream's one-character gutter rule replaces the fork's equivalent digitWidth fix. - ChatComposer: fork's voice-session button kept; context meter now honours settings.contextWindowMeterEnabled. - ConnectionsSettings: fork's EnvironmentLabelControl kept with upstream's min-w-0 truncate. - mobile ThreadFeed: upstream's markdownLinkHandlers plus the fork's onCancelQueuedMessage. - ClaudeDriver imports: fork's superset. build-desktop-artifact: distro and arch both threaded through. Integration: upstream's restart continuation and the fork's resume-on-restart both ran at boot on the same orphans. The continuation-marker helpers move to provider/serverUpdateContinuation.ts and SessionStartupReconciler now defers any binding carrying the marker to upstream's pass (logged as deferred), so a thread is never continued twice. Test added. Dependencies reinstalled for the expo-sharing pin; the stale pnpm copy of @t3tools/mobile-markdown-text was what broke the mobile typecheck. Typecheck clean: contracts, shared, client-runtime, server, web, mobile (desktop exits 1 on a pre-existing warning-level diagnostic). Startup and self-update suites 36 passing; web sidebar/composer/settings suites 419 passing; fork guard script OK. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Linked pull request polling and default pull request pages fan out into full-detail reads, repeated viewer lookups, empty-search fallbacks, and unbounded gh subprocess bursts; production trace sampling tied most observed failures to host rate pauses and gh spawn EAGAIN. This adds a cached summary RPC, single-flight viewer and search reuse, bounded stale-on-transient reads, repository-access caching, deferred diffs, and global gh and VCS concurrency caps. Synthetic normal-workflow measurements now take 5 host reads instead of 11 for a cold default page, 1 instead of 4 for linked PR status, 0 repeat reads inside cache windows, and cap a 32-request gh burst at 4 concurrent processes; 225 focused tests and all five affected package typechecks pass. Implemented with gpt-5.6-sol through the T3 Code Codex harness.
Note
Medium Risk
Changes pull-request read paths, cache/invalidation semantics, and global
ghconcurrency, which can alter freshness and latency under load or host errors.Overview
Introduces a
PullRequestSummaryshape andpullRequests.summaryRPC so linked threads and settlement logic can refresh PR state without full detail reads. Mobile, web, and client-runtime linked-PR atoms now call summary on a 60s refresh cadence instead of detail.On the server,
PullRequestService.summarycaches successful reads, optionally serves last-good data for up to 10 minutes after transient provider failures (unlessrecoverTransientFailure: false), and GitHub uses a narrowgetPullRequestSummarypath viagh pr view. Listing work is cheaper through single-flight viewer lookups, a search-visibility map that skips redundant per-repo fallbacks, and cached repository access on detail.VcsProcesscaps concurrent VCS/ghsubprocesses and the shared limiter is wired at the app layer.The PR list UI waits for the main list before firing authored/reviewing partition reads, and the detail panel drops automatic diff warm-up on open.
Reviewed by Cursor Bugbot for commit 7dc9917. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
PullRequestSummarycontract and reuse GitHub API reads through caching and narrow lookupsPullRequestSummaryschema and a narrowgetChangeRequestSummaryprovider operation so linked PR reads fetch fewer fields than full detailThreadSettlementReactorlinked-PR lookups fromPullRequestService.detailto.summarywith transient-failure recovery disabledgh) permits perVcsProcessinstance; moves the shared VCS process layer to the server application boundarypullRequestsSummaryRPC with a 60-second stale/refresh interval (previously 15s/30s)PullRequestSummaryomits fields present in the detail shape; any consumer expecting full detail from the summary RPC must fall back to the detail RPC.VcsProcess.runnow capsghcommands at 4 concurrent, which may queue bursts that previously ran unboundedMacroscope summarized 7dc9917.