[PATCH b4 1/4] review: keep refreshing message counts after a series is applied
Christian Brauner <[email protected]> Tue, 21 Jul 2026 22:21:01 +0200
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <20260721-work-b4-accepted-unread-badge-v1-1-28581acc4988@kernel.org> |
Pressing 'u' fetches the full thread for every tracked series regardless of status, but the message-count update at the end of update_series_tracking() was skipped for accepted, thanked and snoozed series. Once a series was applied, message_count stayed frozen at its reviewing-days value, so the unread badge in the tracking TUI never appeared again even though the new follow-up mail had just been downloaded. The skip list is a fossil from the old two-stage update flow, where the separate update_message_counts() batch helper paid extra lore round-trips per series and skipping inactive series was a real saving. Now that counts are updated from the already-fetched thread messages, the skip saves nothing. It only hides new mail. It was also inconsistent: 'partial' (partially applied) series kept their badge while fully applied ones lost it. Drop the status filter. update_message_count_from_msgs() only bumps message_count and leaves seen_message_count alone, so the badge appears exactly when new mail arrives and still clears when the thread is read. Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- src/b4/review/_review.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/b4/review/_review.py b/src/b4/review/_review.py index 8c025ea..85aa815 100644 --- a/src/b4/review/_review.py +++ b/src/b4/review/_review.py @@ -2424,10 +2424,11 @@ def update_series_tracking( return result # Update message count and thread blob from the already-fetched - # thread messages. This replaces the old separate Stage 2 call to - # update_message_counts(), avoiding duplicate lore lookups entirely. - skip_counts = frozenset(('archived', 'accepted', 'thanked', 'snoozed')) - if status not in skip_counts and thread_msgs and change_id: + # thread messages. No status filtering here: the thread is already + # in hand, and the unread badge must keep working after a series + # moves past reviewing (accepted/thanked), or the maintainer never + # sees follow-up discussion on applied series. + if thread_msgs and change_id: try: conn = b4.review.tracking.get_db(identifier) b4.review.tracking.update_message_count_from_msgs( -- 2.53.0