From eb7031c32ee80a40aee8588d4c6e2c712f0f48c1 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 3 Nov 2026 15:05:57 +0100 Subject: [PATCH] Add Ignore and Details actions for unresolved rows --- crates/rundown-converter/src/gui/review.rs | 69 ++++++++++++++++------ docs/rundown-converter.md | 7 ++- 2 files changed, 56 insertions(+), 20 deletions(-) diff --git a/crates/rundown-converter/src/gui/review.rs b/crates/rundown-converter/src/gui/review.rs index 0add8fa..d703bf1 100644 --- a/crates/rundown-converter/src/gui/review.rs +++ b/crates/rundown-converter/src/gui/review.rs @@ -896,24 +896,18 @@ impl App { .iter() .find(|i| !needs_information(&a.diagnostics[**i])) .unwrap_or(&row.issues[0]); - if ui - .small_button( - RichText::new(if error { - "Error" - } else { - "Unresolved" - }) - .color(color), - ) - .on_hover_text(&explanation) - .clicked() - { - if row.row > 0 { - details = Some(row.row); - } else { - resolve = Some(*index); + ui.horizontal_wrapped(|ui| { + if !error && row.row > 0 && ui.small_button("Ignore") + .on_hover_text("Ignore this source row. Apply & recheck to update the schedule; restore it under All rows.") + .clicked() { + profile.row_kinds.insert(row.row, "ignore".into()); } - } + if ui.small_button(RichText::new(if error { "Error" } else { "Details" }).color(color)) + .on_hover_text(&explanation).clicked() { + if row.row > 0 { details = Some(row.row); } + else { resolve = Some(*index); } + } + }); } }); let controls = ui.vertical(|ui| { @@ -1212,6 +1206,45 @@ mod tests { assert_eq!(app.selected_row, Some(3)); } + #[test] + fn ignore_shortcut_sets_resolution_and_retains_source_for_recovery() { + let mut app = sample(); + app.row_filter = RowFilter::Attention; + let ctx = egui::Context::default(); + configure_style(&ctx); + let size = [560.0, 400.0]; + render(&mut app, &ctx, size, vec![]); + let labels = render(&mut app, &ctx, size, vec![]); + let ignore = labels + .iter() + .find(|(s, _)| s == "Ignore") + .unwrap() + .1 + .center(); + click_size(&mut app, &ctx, ignore, size); + let profile: Profile = serde_json::from_str(&app.profile).unwrap(); + assert_eq!(profile.row_kinds[&3], "ignore"); + assert!(app.dirty); + assert!(!app.row_details); + let a = pipeline::analyze(&app.tables[0], &profile, &AtomicBool::new(false), |_, _| {}); + assert!(!a.diagnostics.iter().any(|d| diagnostic_row(d) == Some(3))); + let rows = preview_rows(&a, Some(&app.tables[0])); + let ignored = rows.iter().find(|r| r.row == 3).unwrap(); + assert!(show_row( + ignored, + RowFilter::All, + Some(&app.tables[0]), + &profile + )); + assert!(!show_row( + ignored, + RowFilter::Included, + Some(&app.tables[0]), + &profile + )); + assert_eq!(app.tables[0].rows[2][2].text, "Stage direction 0"); + } + #[test] fn whole_row_selection_and_editor_duration_changes() { let mut app = sample(); @@ -1482,7 +1515,7 @@ mod tests { assert!(labels.iter().any(|(s, _)| s == "Auto (Event)")); let resolve = labels .iter() - .filter(|(s, _)| s == "Unresolved") + .filter(|(s, _)| s == "Details") .nth(1) .unwrap() .1 diff --git a/docs/rundown-converter.md b/docs/rundown-converter.md index 4fc9186..9462e2d 100644 --- a/docs/rundown-converter.md +++ b/docs/rundown-converter.md @@ -56,8 +56,11 @@ click **Analyze rundown**. Review has two views: keyed by exact gap boundaries. If other corrections change those boundaries, remove the stale choice in Setup or reset decisions and recheck. Unknown values show `?`. - Hover over a title or issue button for row status and full diagnostic explanations. - Double-click anywhere on a source row, or click its **Unresolved** / **Error** button, + Unresolved source rows offer **Ignore** to set the ignore resolution and + **Details** to open the row editor. Ignoring requires recheck and can be undone + under All rows. + Hover over a title or details button for row status and full diagnostic explanations. + Double-click anywhere on a source row, or click its **Details** / **Error** button, to open the same editor (inline dropdowns keep their normal interaction). It shows timing, editable row type and duration, full diagnostics, timing decisions and a formatted table of original cells (including empty values and