[PATCH b4 0/2] review-tui: mark and bulk-set state in the Patchwork browser

Christian Brauner <[email protected]> Tue, 23 Jun 2026 11:27:04 +0200
Newsgroups org.kernel.linux.tools
Message-ID <20260623-20260623-review-tui-pw-multiselect-v1-0-2470add1453c@kernel.org>
The Patchwork browser in the review TUI (b4 review -> p) could only set
the state on the single highlighted series: 's' opened the state picker
for whatever row the cursor was on. Triaging a batch -- say, marking a
dozen applied series as Accepted -- meant repeating the same pick once
per row.

Add a selection layer to the listing so one state change can cover many
series at once. Space marks or unmarks the highlighted series and steps
to the next row, 'a' marks or clears every row currently shown, and Esc
drops all marks; marked rows carry a leading '*' and the title shows an
"N selected" count. 's' then applies the chosen state to every marked
series in a single pass, and falls back to the highlighted row when
nothing is marked, so the existing single-series workflow is unchanged.

Marks are resolved against the full listing rather than the visible rows,
so they survive the limit and show-hidden toggles and still apply to
series scrolled out of the current filter; they are pruned to the series
that still exist after a refresh. The REST state changes already iterated
a flat list of patch ids, so the apply modal simply receives the union of
patch ids across the marked series plus a summary label -- no new network
machinery.

Signed-off-by: Christian Brauner (Amutable) <[email protected]>
---
Christian Brauner (2):
      review-tui: set patchwork state on multiple series at once
      review-tui: test patchwork multi-select and bulk state changes

 src/b4/review_tui/_modals.py |   7 +-
 src/b4/review_tui/_pw_app.py | 201 +++++++++++++++++++++++++++++------
 src/tests/test_tui_pw.py     | 245 ++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 417 insertions(+), 36 deletions(-)
---
base-commit: e7e48f19f7a553e80dea9c8dd267887cb3a3cf09
change-id: 20260623-20260623-review-tui-pw-multiselect-c625e9588b27