xonecas.io
8447
Co

conveyor / commit caf16fc

Frame: count only what the latest run flagged

After a rerun, the earlier run's block still showed as one to read.

Co-Authored-By: Claude Opus 5.5

sacenox2026-11-09 caf16fc48b072a4ef4b898de7f76935ca5b780ad parent 12a1c6c

1 file changed

templates/library/frame.rs+3−2
@@ -52,8 +52,9 @@ fn color(kind: &str) -> rune::Color {
5252 /// While a ticket runs, or when its run needs a look, a pill says so without hovering.
5353 fn badge(f: &Frame) -> Option<El> {
5454 let t = tok::theme(true);
55- let latest = f.thread.last().map_or(0, |e| e.ticket);
56- let flagged = f.thread.iter().filter(|e| e.ticket == latest && matches!(e.kind.as_str(), "deviate" | "block" | "error")).count();
55+ // Only what the latest run said: after the last prompt, or conveyor's note that it reran.
56+ let since = f.thread.iter().rposition(|e| matches!(e.kind.as_str(), "prompt" | "conveyor")).unwrap_or(0);
57+ let flagged = f.thread[since..].iter().filter(|e| matches!(e.kind.as_str(), "deviate" | "block" | "error")).count();
5758 let label = match f.state {
5859 "done" if flagged > 0 && !f.notes => format!("{flagged} to read"),
5960 "done" => return None,