GeezerVison is showing github.com — Improve pull request read performance by ronak-guliani · Pull Request #481 · ronak-guliani/t3code
Conversation
Problem
- Pull request list and detail reads repeat work during revalidation, lose recent detail reads across server restarts, fetch optional data before the primary content is ready, and can retain oversized diff slices in both normal and stale caches.
What Changed
- Retain previous list and stats data while TanStack Query revalidates.
- Persist compact pull request detail reads in the server cache with expiry, validation, bounded concurrency, and mutation invalidation.
- Reuse detail-derived diff stats for later list-stats requests and defer optional monitor/stats reads.
- Seed the detail panel from existing list data while the full detail request loads.
- Skip retaining diff patches larger than 512 KiB of estimated UTF-16 storage, while returning the complete response and protecting replacement entries during invalidation.
Why
- This ports the behavior from upstream pull request improvements pingdotgg/t3code#9467, pingdotgg/t3code#11007, pingdotgg/t3code#9835, and pingdotgg/t3code#12523 while preserving this fork's existing PR panel and incremental-loading architecture.
- Oversized diff responses are still delivered, but are not retained in either cache; smaller responses continue to be reused. No schema or migration changes are required.
- Validation completed:
pnpm fmt:check, pnpm lint, pnpm typecheck, pnpm test, focused server cache/service tests, and focused web query tests. After this update, the full suite passed with 309 test files and 2,688 tests passing, plus 2 skipped files and 9 skipped tests; the server serial suite passed with 106 tests.
UI Changes
- Tested revision before this server-only follow-up:
0b4356afd8ff976da77d46c3537868382bec1bea.
- Authenticated isolated-client validation opened the pull request list, confirmed Improve pull request read performance #481 with its diff counts, then opened its detail panel and confirmed the title, branches, status, summary, and description rendered in-panel.
- Feature captures are published below. The oversized-diff cache fix is server-only and does not change the captured UI.
- Diagnostics: no feature-specific console errors or failed application requests. The isolated environment showed the pre-existing Codex provider probe warning and an optional observability trace POST failure; neither blocked the PR list/detail flow.
Checklist
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes
Feature captures
PR head at upload: 0b4356afd8ff976da77d46c3537868382bec1bea. See the testing notes for exercised behavior and limitations; uploading media is not a test result.


Sorry, something went wrong.
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.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|