Repository navigation
feat(threads): bound and animate linked pull request lists - #752
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 14, 2026 20:12
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Linked pull requests could report `stale: false` while still showing the remembered summary during a background refresh. A refresh claim inserts a cache row without a payload, with `expires_at = now()`. #752 made freshness depend only on that timestamp. A reader whose transaction timestamp precedes or equals the claim can therefore classify the empty row as fresh and return the old summary. Require both a cache payload and an unexpired deadline in the same list query. The existing lease-fenced cache update already commits the new payload and deadline atomically; neither the refresh claim nor its attempt timestamp makes a link fresh. This affects the single-PR path as well as batches. The fixture and the original restart assertion remain unchanged. The regression test holds an older READ COMMITTED reader while another connection commits the real refresh claim, checks that the remembered title remains stale, then commits a new cache summary and checks that the new title and fresh status appear together. It fails against the previous product code. Validation: - Before: the unchanged restart test failed once in 50 runs with the reported old-title/fresh-status mismatch; the deterministic regression also failed. - After: all five last-known-summary tests passed 50 times (250 passes), including the original restart test. - All GitHub integration files: 178 passed, 2 opt-in live tests skipped, 0 failed across 37 files, using `check:tmp` (clean temp-directory result). - Passed: `bun install`, `gen:check`, typecheck, lint, `format:check`, and the web production build. Checks ran with `nice` and temporary files under `/var/tmp`. Copy audit (docs/copy.md §8): no UI text changed; not applicable. Fixes: #752
This was referenced Nov 16, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 26, 2026
## Changes - Run twelve duration-balanced Linux shards in full PR and Push CI. Verify that all twelve reports cover every discovered test file exactly once. Refresh weights from two complete #1296 runs. - Skip dependency lifecycle scripts for Windows native test installation. The optional SSH CPU feature build took 104–106 seconds in two baseline jobs. The Electron test still downloads its pinned binary and the same native checks run. - Subscribe to the real linked-update overview stream in the integration fixture. Batch rejected diagnostic writes while checking the same limits and recovery. - Prevent a GitHub batch response obtained before permission invalidation from repopulating individual pull request summaries. Persist the last-known summary only while its matching cache row still exists. Serialize cache fills with account- and repository-level invalidation. - Make the proxy usage test share the initial refresh and open later read leases with the existing per-gateway clock. The test still requires exactly one vendor request for the initial read and cache hit. ## Verification - The first twelve-shard run finished in 5m22s and exposed the GitHub race. Windows dependency installation took 41 seconds, down from 168 seconds in the baseline. Full PR and Push CI timings will be measured on green runs. The additional four Linux runners repeat setup and PostgreSQL startup. - The existing integration test now pauses the cached response, triggers permission denial over gRPC, resumes the batch and checks that neither the batch nor a delayed last-known write can restore the old titles. The original code reproduced the stale titles at that barrier. - Twenty-five linked-update and diagnostics cases passed on Bun 1.4.5 and isolated PostgreSQL 18. The shard verifier accepted the complete twelve-report set and rejected eight reports. - The final GitHub change passed 51 integration cases. The proxy change passed all 16 cases in its two adjacent suites. Fixes: #752 Fixes: #749 Related: #1296
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Show four linked pull requests by default, with a total count and a motion-token disclosure. Larger lists use pages of at most 20 rows and a bounded scroll area, keeping 500 links cheap to render and animate without changing the summary card's height rules.
The gateway caps every list response at 20 summaries, orders open/draft PRs first and then by update time, and returns list-wide branch presence. Background refresh only considers the requested page, combines four PRs per GraphQL request, shares the existing durable budget/backoff, and skips terminal PRs. Thread sync continues to carry only the count, revision and one summary.
Validation:
bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check, and the web build pass. The final mobile-only adjustment also passes its typecheck.TMPDIR=/var/tmp nice -n 10 bun run check:tmpwith the eight affected GitHub integration files: 34 pass, no temp leftovers. After adding the rate-limit scenario, all three large-list tests pass, also with no leftovers. These cover 500-link ordering/paging, owner isolation, restart behavior, linked gateways, detection, watch polling, bounded batching and backoff. No UI tests added.Copy audit (§8): “Pull requests” → the same heading with a numeric total, making the full list size visible. “Show N more” / “Show less” remain unchanged; the threshold moves from one to four. New “Previous” / “Next” actions navigate bounded pages, with “1–20 of 500” identifying the range. These use sentence case, short verb-led labels, existing terminology and no new errors or confirmations. Short, typical and long titles retain truncation and full title text on desktop and phone widths. No text depends on color alone.
No migration is needed. The card's layout and max-height rules are untouched. Closed/merged PRs refresh only on explicit refresh or opening their full details; list-wide branch presence prevents paging from offering a duplicate create action.
Related: #749