RFC review: track and browse every version of a tracked series
Get series with b4
b4 am [email protected] change-id 20260718-work-b4-multiver-rows-6032fb71e951Versions newest first
- v2 RFC Latest25 patches 0 repliesNew
- v1 RFC11 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Redesign the whole approach.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/25 | review-tui: fix rethreaded series thread viewingsrc/ src/ | +2 | 0 replies | |
| 2/25 | review: do not clear fields a re-adding caller does not knowsrc/ | +11 | 0 replies | |
| 3/25 | review-tui: keep the rethread flag on an upgraded series rowsrc/ src/ | +23 | 0 replies | |
| 4/25 | review: guard the tracking-commit amend on the worktree, not the checkoutsrc/ src/ src/ | +87 | 0 replies | |
| 5/25 | review-tui: recompute an evicted A·R·T cache entrysrc/ | +31 | 0 replies | |
| 6/25 | review: test the prerequisite fixessrc/ src/ src/ +1 more | +492 | 0 replies | |
| 7/25 | review: serialize schema migrations against a concurrent openersrc/ | +42 | 0 replies | |
| 8/25 | review: test the migration serializationsrc/ | +113 | 0 replies | |
| 9/25 | review: track message counts for all revisions of a seriessrc/ src/ src/ +2 more | +1326 | 0 replies | |
| 10/25 | review: give per-change_id state its own tablesrc/ src/ | +120 | 0 replies | |
| 11/25 | review: test per-revision message trackingsrc/ | +2901 | 0 replies | |
| 12/25 | review-tui: poll every revision on u/U updatessrc/ src/ src/ +4 more | +331 | 0 replies | |
| 13/25 | review: test the per-revision poll sweepsrc/ src/ src/ | +998 | 0 replies | |
| 14/25 | review-tui: resolve the tracked revision in revision listssrc/ src/ src/ | +139 | 0 replies | |
| 15/25 | review-tui: fall back when a cached thread blob has no seriessrc/ | +136 | 0 replies | |
| 16/25 | review-tui: test revision resolution and the range-diff fallbacksrc/ src/ | +378 | 0 replies | |
| 17/25 | review: skip the catalog mirror when nothing movedsrc/ src/ src/ +1 more | +131 | 0 replies | |
| 18/25 | review: match a stray posting by message-idsrc/ src/ | +102 | 0 replies | |
| 19/25 | review: add backward discovery of older series revisionssrc/ src/ | +293 | 0 replies | |
| 20/25 | review-tui: add a "Find older revisions" actiondocs/ src/ | +105 | 0 replies | |
| 21/25 | review: test the catalog mirror, stray matching and backward discoverysrc/ src/ src/ | +1792 | 0 replies | |
| 22/25 | review-tui: extract the Msgs column renderer from TrackedSeriesItemsrc/ | +66 | 0 replies | |
| 23/25 | review-tui: give the unseen badge a column of its ownsrc/ | +10 | 0 replies | |
| 24/25 | review-tui: expand tracked series into per-version rowsdocs/ src/ src/ +3 more | +707 | 0 replies | |
| 25/25 | review-tui: test per-version tracker rowssrc/ | +1626 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH RFC v2 00/25] review: track and browse every version of a tracked series
The review TUI binds all mail visibility to the revision a series is tracked at. 'e' opens only the tracked thread, unread badges exist only on the series row, and u/U updates poll only the tracked revision. Earlier versions of a series are invisible.
Make every known version of a tracked series a first-class citizen of the mail-tracking machinery.
The revisions catalog becomes the only home for per-revision read state (schema v11).
Per-change_id state moves the other way, onto a new changes table (schema v12). There is one b4/review/<change_id> branch, so its sha should not be stored once per version and read back with an ORDER BY. The catalog-sync and the backward-search live there too.
u/U updates poll every cataloged revision for new mail using the same thread queries used elsewhere. Neither lore nor b4 really support incremental updates though. Lore misses that functionality afaict.
A new "Find older revisions" action runs the b4 am/mbox backward search. It uses the change-id query when the cover carries one and subject+sender otherwise. It records what it finds and polls the new entries immediately. A retitled series without a change-id still needs manual linking. The same limitation b4 am -vN has.
The tracker list gains expandable per-version rows. 'x' unfolds a series into child rows. The tracked revision is starred. 'X' toggles all series at once. Enter or 'e' on a child opens that version's thread with revision-correct. 'd' range-diffs it against the tracked revision directly.
Message-level read state was already keyed by message-id alone. So Seen/Flagged/Answered flags apply across versions unchanged. This series adds the count, badge and navigation layers on top.
---
Changes in v2:
- Redesign the whole approach.
---
Christian Brauner (25):
review-tui: fix rethreaded series thread viewing
review: do not clear fields a re-adding caller does not know
review-tui: keep the rethread flag on an upgraded series row
review: guard the tracking-commit amend on the worktree, not the checkout
review-tui: recompute an evicted A·R·T cache entry
review: test the prerequisite fixes
review: serialize schema migrations against a concurrent opener
review: test the migration serialization
review: track message counts for all revisions of a series
review: give per-change_id state its own table
review: test per-revision message tracking
review-tui: poll every revision on u/U updates
review: test the per-revision poll sweep
review-tui: resolve the tracked revision in revision lists
review-tui: fall back when a cached thread blob has no series
review-tui: test revision resolution and the range-diff fallback
review: skip the catalog mirror when nothing moved
review: match a stray posting by message-id
review: add backward discovery of older series revisions
review-tui: add a "Find older revisions" action
review: test the catalog mirror, stray matching and backward discovery
review-tui: extract the Msgs column renderer from TrackedSeriesItem
review-tui: give the unseen badge a column of its own
review-tui: expand tracked series into per-version rows
review-tui: test per-version tracker rows
docs/maintainer/review.rst | 49 + src/b4/__init__.py | 60 + src/b4/review/_review.py | 284 +- src/b4/review/tracking.py | 2378 ++++++++++++++-- src/b4/review_tui/_common.py | 177 +- src/b4/review_tui/_lite_app.py | 1 + src/b4/review_tui/_modals.py | 15 + src/b4/review_tui/_review_app.py | 2 +- src/b4/review_tui/_tracking_app.py | 1083 ++++++-- src/tests/conftest.py | 23 + src/tests/test___init__.py | 62 + src/tests/test_review.py | 822 ++++++ src/tests/test_review_tracking.py | 5256 +++++++++++++++++++++++++++++++++++- src/tests/test_tui_modals.py | 1 + src/tests/test_tui_review.py | 274 +- src/tests/test_tui_tracking.py | 1983 +++++++++++++- 16 files changed, 11911 insertions(+), 559 deletions(-)
---
base-commit: 362b87aa4d036884c36e4bfb9cdbdee626aba3bf
change-id: 20260718-work-b4-multiver-rows-6032fb71e951