[PATCH b4 0/2] review-tui: handle null Patchwork series names
Christian Brauner <[email protected]> Tue, 30 Jun 2026 15:41:31 +0200
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <20260630-review-tui-null-series-name-v1-0-67d7c9334454@kernel.org> |
Patchwork returns "name": null for a series posted without a cover
letter. The review TUI's Patchwork app read that field with
series.get('name', '(no subject)') in several places, but the dict
default only applies when the key is absent. A present-but-None
value passes straight through unchanged.
On the bulk set-state path that None reached a Textual Label, which
cannot render it, so opening the apply-state dialog for such a series
crashed the whole TUI during layout:
VisualError: unable to display 'NoneType' type; must be a str,
Rich renderable, or Textual Visual object
The track/hide/unhide notification paths shared the same latent bug,
displaying a literal "None" in place of the placeholder.
Switch these spots to the series.get('name') or '(no subject)' idiom
already used by the list-row renderer, so a null name consistently
becomes the placeholder, and add a regression test that drives
set-state on a null-named series and asserts the modal renders.
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
---
Christian Brauner (2):
review-tui: fall back to '(no subject)' for null Patchwork series names
review-tui: test null Patchwork series name in bulk set-state
src/b4/review_tui/_pw_app.py | 8 ++++----
src/tests/test_tui_pw.py | 44 +++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 5 deletions(-)
---
base-commit: 4217c3e5d3e1eb259626142fd71b91ec6d5e3d1e
change-id: 20260630-review-tui-null-series-name-1b734358d843