[PATCH RFC v2 00/25] review: track and browse every version of a tracked series

Christian Brauner <[email protected]>
Newsgroups org.kernel.linux.tools
Message-ID <[email protected]>
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.

Signed-off-by: Christian Brauner (Amutable) <[email protected]>
---
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.