fix(timeline): use total_notes for discussion summary instead of post-filter count

The discussion summary format string used `note_count` (derived from
`notes.len()` after truncation/filtering) rather than `total_notes`
which captures the full count before any processing. This made the
"Discussion (N notes)" label undercount when notes were filtered.

Removes the now-unused `note_count` binding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
teernisse
2026-03-13 13:18:09 -04:00
parent 09c467a2d8
commit b456a879bb

View File

@@ -468,7 +468,6 @@ fn collect_discussion_threads(
}); });
} }
let note_count = notes.len();
let actor = notes.first().and_then(|n| n.author.clone()); let actor = notes.first().and_then(|n| n.author.clone());
events.push(TimelineEvent { events.push(TimelineEvent {
@@ -481,7 +480,7 @@ fn collect_discussion_threads(
discussion_id: disc.discussion_id, discussion_id: disc.discussion_id,
notes, notes,
}, },
summary: format!("Discussion ({note_count} notes)"), summary: format!("Discussion ({total_notes} notes)"),
actor, actor,
url: None, url: None,
is_seed: true, is_seed: true,