Skip to content

Improve pull request read performance - #481

Merged
ronak-guliani merged 3 commits into
mainfrom
perf/pr-panel-read-caching
Sep 22, 2026
Merged

ronak-guliani merged 3 commits into
mainfrom
perf/pr-panel-read-caching

Conversation

@ronak-guliani

@ronak-guliani ronak-guliani commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

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.

pr481-list.png

pr481-detail.png

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 22, 2026
ronak-guliani and others added 2 commits September 22, 2026 14:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ronak-guliani
ronak-guliani merged commit 4da6aaf into main Sep 22, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant