Skip to content

fix(prs): reuse GitHub data and defer optional reads - #9835

Merged
maria-rcks merged 2 commits into
pingdotgg:mainfrom
maria-rcks:t3code/optimize-github-pr-tabs
Sep 5, 2026
Merged

maria-rcks merged 2 commits into
pingdotgg:mainfrom
maria-rcks:t3code/optimize-github-pr-tabs

fix(prs): refresh cached counts and changed patches

e5da724
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Sep 4, 2026 in 4m 31s

All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.

Reviewed in-scope changed files (apps/**/*.ts, packages/**/*.ts, excluding tests): apps/server/src/pullRequest/PullRequestService.ts, apps/server/src/sourceControl/githubGraphQlBudget.ts, apps/web/src/components/pullRequest/pullRequestList.logic.ts, apps/web/src/state/pullRequests.ts, packages/client-runtime/src/state/pullRequests.ts. Effect modules are imported as subpath namespaces, service state stays inside make rather than module globals, time is read via Clock instead of imperative APIs, no runtime-execution APIs were introduced into service constructors, no error classes or lint-suppression directives were changed, and the backend behavior changes (stats reuse, budget cost learning) arrive with focused tests.


🔍 Agent activity — 6 tool calls

1. browse_code — apps/server/src/pullRequest/PullRequestService.ts

2. browse_code — apps/server/src/sourceControl/githubGraphQlBudget.ts

💭 githubGraphQlBudget.ts checks out as conventional. Now I'm reviewing PullRequestService.ts, checking whether Clock and Duration are properly imported as namespaces, then considering whether the web app files fall within scope.

3. browse_code — apps/server/src/pullRequest/PullRequestService.ts

4. browse_code — packages/client-runtime/src/state/pullRequests.ts

💭 The imports seem standard, so now I want to check pullRequests.ts and pullRequestList.logic.ts for named imports from "effect", even though they aren't Effect services themselves. Let me look at pullRequests.ts around lines 120-180.

5. browse_code — apps/web/src/state/pullRequests.ts

💭 The React state and pull request logic changes look fine—no Effect conventions violated. Checking the PullRequestService changes now, I'm looking at the listStats implementation using Effect.fn with a generator, which matches existing patterns, and examining the mutable recentStats Map to confirm it's properly scoped as closure state within make. Tests were added covering these changes, and I don't see any lint-disable directives or error handling changes in the diff. I notice a minor variable shadowing issue in the listStats loop but that's a code-quality concern rather than an Effect convention violation, so it's outside my scope here. Let me also verify there are no bare "effect" imports being used anywhere in the changed files.

6. browse_code — In apps/web/src/components/pullRequest/pullRequestList.logic.ts, list the import statements at the top of the file. Also confirm whether rankPullRequestsByMergeReadiness still has any remaining callers passing a hasMeasuredSize argument and whether hasMeasuredSize is still used/defined in sortPullRequestGroups.

💭 No convention violations found there. Checking test coverage for the backend changes, I see the githubGraphQlBudget and PullRequestService caching changes both have tests, and there's a new test covering the recoverTransientFailure logic change for detecting revision changes during diff reads. I'm also verifying the summary path removal and the Effect.fn typing on listStats look correct, and confirming Clock.currentTimeMillis is used properly instead of Date.now. Nothing here seems to violate the conventions I'm checking, so I'm leaning toward reporting this as clear.


Agent Credits: 137 credits

Token usage: 30 uncached input · 446,682 cache-read input · 130,864 cache-write input · 10,288 output
Agent Credits may also include non-token charges from external tools such as web research.