From c009c5cb3829072eebd5ddb16dddf122466a7631 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 3 Nov 2026 17:00:49 +0100 Subject: [PATCH] Clarify rows without timing wording --- crates/rundown-converter/src/gui.rs | 7 ++++-- crates/rundown-converter/src/gui/review.rs | 26 ++++++++++++++-------- crates/rundown-converter/src/main.rs | 7 +++++- crates/rundown-converter/src/pipeline.rs | 4 ++-- docs/rundown-converter.md | 6 ++--- docs/rundown-corpus.md | 2 +- 6 files changed, 34 insertions(+), 18 deletions(-) diff --git a/crates/rundown-converter/src/gui.rs b/crates/rundown-converter/src/gui.rs index d389f3f..4c366bb 100644 --- a/crates/rundown-converter/src/gui.rs +++ b/crates/rundown-converter/src/gui.rs @@ -311,8 +311,11 @@ impl App { ui.strong("General options"); ui.checkbox(&mut profile.ignore_warnings, "Ignore all warnings") .on_hover_text("Try ignoring rows with missing timing, missing titles or unresolved notes/breaks, then rebuild and validate. Column ambiguity and inconsistent timings still block export. Existing manual corrections are preserved."); - ui.checkbox(&mut profile.untimed_as_notes, "Treat untimed rows as notes") - .on_hover_text("Attach untimed rows to the preceding event. Applied before automatic warning exclusions, so notes are retained where possible."); + ui.checkbox( + &mut profile.untimed_as_notes, + "Treat rows without a timing as notes", + ) + .on_hover_text("Attach rows without a timing to the preceding event. Applied before automatic warning exclusions, so notes are retained where possible."); ui.small("Applied on analysis / recheck. Export requires a consistent schedule."); if before != serde_json::to_string(&profile).unwrap() { self.profile = serde_json::to_string_pretty(&profile).unwrap(); diff --git a/crates/rundown-converter/src/gui/review.rs b/crates/rundown-converter/src/gui/review.rs index 02e88bf..b2bf1bf 100644 --- a/crates/rundown-converter/src/gui/review.rs +++ b/crates/rundown-converter/src/gui/review.rs @@ -41,6 +41,14 @@ fn short(text: &str, count: usize) -> String { result } +fn diagnostic_name(code: &str) -> String { + if code == "UNTIMED_ROW" { + "ROW WITHOUT A TIMING".into() + } else { + code.replace('_', " ") + } +} + /// Presentation only: retain source values and avoid treating plain numbers as times. fn cell_text(cell: &crate::model::Cell) -> String { if cell.time_style { @@ -183,7 +191,7 @@ fn row_hover_text(row: &PreviewRow, analysis: &Analysis, status: &str) -> String }; explanation.push_str(&format!( "{severity} · {relationship}{}\n{}\n{}\n\nHow to resolve: {}", - diagnostic.code.replace('_', " "), + diagnostic_name(&diagnostic.code), if row.related_issues.contains(index) { format!("Related issue at {}", diagnostic.location) } else { @@ -715,7 +723,7 @@ impl App { "{} · {} · {}", i + 1, d.location, - short(&d.code.replace('_', " ").to_lowercase(), 40) + short(&diagnostic_name(&d.code).to_lowercase(), 40) ), ); } @@ -729,7 +737,7 @@ impl App { egui::Frame::new().fill(Color32::from_rgb(47, 40, 31)).inner_margin(8.0).corner_radius(5.0).show(ui, |ui| { ui.set_width(ui.available_width()); ui.horizontal_wrapped(|ui| { - ui.strong(d.code.replace('_', " ").to_lowercase()); + ui.strong(diagnostic_name(&d.code).to_lowercase()); if let Some(row) = diagnostic_row(&d) { if ui.small_button(format!("Show row {row}")).clicked() { self.selected_row = Some(row); @@ -1000,7 +1008,7 @@ impl App { egui::Frame::group(ui.style()).show(ui, |ui| { ui.colored_label(color, if preview.related_issues.contains(index) { "RELATED OVERLAP".into() - } else { d.code.replace('_', " ") }); + } else { diagnostic_name(&d.code) }); ui.add(egui::Label::new(row_diagnostic_message(preview, *index, d)).wrap()); }); } @@ -1128,7 +1136,7 @@ impl App { PREVIEW_RED }; egui::Frame::group(ui.style()).show(ui, |ui| { - ui.colored_label(color, d.code.replace('_', " ")); + ui.colored_label(color, diagnostic_name(&d.code)); ui.add( egui::Label::new( d.message @@ -2086,7 +2094,7 @@ mod tests { assert!( labels .iter() - .any(|(s, _)| s.contains("WARNING · UNTIMED ROW") + .any(|(s, _)| s.contains("WARNING · ROW WITHOUT A TIMING") && s.contains("Show!row 3") && s.contains("This row has content but no timing") && s.contains("How to resolve:") @@ -2247,7 +2255,7 @@ mod tests { assert!( labels .iter() - .any(|(s, _)| s == "Treat untimed rows as notes") + .any(|(s, _)| s == "Treat rows without a timing as notes") ); let button = labels .iter() @@ -2282,7 +2290,7 @@ mod tests { let labels = render(&mut app, &ctx, size, vec![]); let notes = labels .iter() - .find(|(s, _)| s == "Treat untimed rows as notes") + .find(|(s, _)| s == "Treat rows without a timing as notes") .unwrap() .1 .center(); @@ -3004,7 +3012,7 @@ mod tests { render(&mut app, &ctx, [860.0, 900.0], vec![]); let labels = render(&mut app, &ctx, [860.0, 900.0], vec![]); assert!(labels.iter().any(|(s, _)| s == "Original cells")); - assert!(labels.iter().any(|(s, _)| s == "UNTIMED ROW")); + assert!(labels.iter().any(|(s, _)| s == "ROW WITHOUT A TIMING")); assert!(labels.iter().any(|(s, _)| s == "Empty")); } diff --git a/crates/rundown-converter/src/main.rs b/crates/rundown-converter/src/main.rs index b5442ab..7075f7b 100644 --- a/crates/rundown-converter/src/main.rs +++ b/crates/rundown-converter/src/main.rs @@ -87,7 +87,12 @@ fn run(args: Args) -> Result { } } for d in &analysis.diagnostics { - eprintln!("{} — {}: {}", d.code, d.location, d.message); + let name = if d.code == "UNTIMED_ROW" { + "ROW WITHOUT A TIMING".into() + } else { + d.code.clone() + }; + eprintln!("{name} — {}: {}", d.location, d.message); } if let Some(r) = &analysis.rundown { println!("{} entries, {} untimed gaps", r.entries.len(), r.gaps.len()); diff --git a/crates/rundown-converter/src/pipeline.rs b/crates/rundown-converter/src/pipeline.rs index 27fff00..7297cbc 100644 --- a/crates/rundown-converter/src/pipeline.rs +++ b/crates/rundown-converter/src/pipeline.rs @@ -331,7 +331,7 @@ pub fn construct( if let Some(prev) = result.entries.last_mut() { prev.source_rows.push(source_row(table, r)); prev.decisions.push(format!( - "Untimed row {} retained as notes{}", + "Row {} without a timing retained as notes{}", r + 1, if group.is_some() { " inside merged block" @@ -348,7 +348,7 @@ pub fn construct( "UNTIMED_ROW", at(table, r), format!( - "This row has content but no timing. Clarify whether it is a note, marker, untimed break or event; use row_kinds or untimed_as_notes in a profile.\nRow preview:\n{}", + "This row has content but no timing. Clarify whether it is a note, marker, gap or event; use row_kinds or untimed_as_notes in a profile.\nRow preview:\n{}", row_preview(table, r, map.header_row - 1) ), )); diff --git a/docs/rundown-converter.md b/docs/rundown-converter.md index f7ec9f5..f2b3efb 100644 --- a/docs/rundown-converter.md +++ b/docs/rundown-converter.md @@ -42,7 +42,7 @@ resolution profiles and usable from the CLI: inconsistencies still block export. Manual row and duration decisions are kept. Automatically excluded rows are counted in the summary and remain visible in **All rows**. Disable the option and recheck to restore them. -- **Treat untimed rows as notes** (`untimed_as_notes`): attach untimed rows to the +- **Treat rows without a timing as notes** (`untimed_as_notes`): attach rows without a timing to the preceding event. When both options are enabled, this runs before warning exclusions so notes are kept wherever possible. @@ -134,10 +134,10 @@ and previous preview so you can resolve several rows without losing your place; export and remembering a resolution remain blocked until validation succeeds. Blank title and timing corrections restore source or calculated values. Start and end accept clock times such as `09:30` or `09:30:00`; duration accepts explicit values such as -`2 min` or `00:02:00`. Missing timings, overlaps and untimed row decisions can be +`2 min` or `00:02:00`. Missing timings, overlaps and decisions for rows without a timing can be resolved here. Unsupported interpretations and unresolved conflicts retain explicit errors; correct the source when available controls cannot express the intended fix. -CLI untimed-row errors also include a labeled source preview. +CLI errors for rows without a timing also include a labeled source preview. **Save resolutions…** opens the save/load/remember controls without taking space away from the correction table. **Results** offers Open, Open output folder and Copy diff --git a/docs/rundown-corpus.md b/docs/rundown-corpus.md index 7fdd9e0..92fbd49 100644 --- a/docs/rundown-corpus.md +++ b/docs/rundown-corpus.md @@ -93,7 +93,7 @@ predecessor pairs and three gap-overlap diagnostics. This subset also omits the those conflicts were removed. **No partial Ontime project was published.** The remaining obstacles are semantic: selecting simultaneous tracks, deciding -whether untimed rows are instructions or events, distinguishing arrivals and +whether rows without a timing are instructions or events, distinguishing arrivals and cutoff markers from timers, and interpreting uncertain overnight deadlines. Neither a following start nor a missing table border supplies that information. Per the requested stop condition, no experimental reader or new runtime dependency