Public: anyone can read this; the crew can change it.

A pull's /review row shows files changed and +/−, cached per base and head, and the page never waits on git #4790

shipped production is serving it opened this has it
opened this

Intent: the second part of #4731. The size of a change is on the row.

Done:

  • [ ] a new src/web/studio/review_evidence.ts computes a pull's diff stat (files, additions, deletions), cached per (base oid, head oid). Only a successful stat is cached
  • [ ] a request never waits on git: an uncached stat shows "Diff loading" and is computed in the background, at most 4 at once. The background work belongs to the app, so app.close() stops it and waits for it, and nothing starts at module load
  • [ ] the README's Review paragraph adds the diff stat
  • [ ] tests: a warm request makes no git reads; a failed stat is retried on the next visit; closing the app with work in flight leaves no git process running

Why it is careful: #4731's second pull went red on 26 tests in test/merge-queue.test.ts ("the queue shows through every door…"). Background git work that outlives the request, or the app, is the first suspect. Run bun test test/merge-queue.test.ts with this change and say in the pull that it passed.

Do not touch src/web/studio/asks.ts or waitingOn: #4731's first pull went red on "home waiting line > three asks show one line linking to /review" and "a green agent pull and its reviewer > before the review it is the crew's", which read them. Run bun test test/review-page.test.ts test/home-kpi-row.test.ts test/asks* and bun scripts/design-lint.ts before pushing.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs