Skip to content

feat(threads): bound and animate linked pull request lists - #752

Merged
nixuuu merged 2 commits into
devfrom
feat/threads-pr-list
Nov 14, 2026
Merged

nixuuu merged 2 commits into
devfrom
feat/threads-pr-list

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

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:tmp with 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.
  • Real browser review on a disposable remote stack: 0, 1, 4, 5, 50 and 500 links, short/typical/long titles, light/dark, desktop and phone widths. The UI fixture substitutes list responses; gateway tests exercise the actual database and gRPC path. At 500 links, the DOM stays at 20 PR rows. Sampled expansion/collapse heights progress smoothly over the motion token's 250 ms. The reduced-motion CSS guard disables the transition; OS preference emulation was not available.
  • Before PNGs preserve the supplied references. After PNGs and a short expand/collapse MP4 are saved outside the repository in the review artifacts directory. The disposable stack, database and tunnel are removed after review.

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

@nixuuu
nixuuu marked this pull request as ready for review November 14, 2026 20:12
@nixuuu
nixuuu merged commit d3b886c into dev Nov 14, 2026
13 checks passed
@nixuuu
nixuuu deleted the feat/threads-pr-list branch November 14, 2026 20:24
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
nixuuu added a commit that referenced this pull request Nov 26, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant