Move rundown status and intermediate representation to Details tab
This commit is contained in:
parent
1499e45add
commit
86e55b01a3
|
|
@ -28,6 +28,7 @@ enum Tab {
|
|||
Setup,
|
||||
Review,
|
||||
Results,
|
||||
Details,
|
||||
}
|
||||
struct App {
|
||||
input: String,
|
||||
|
|
@ -694,14 +695,35 @@ impl App {
|
|||
g.title
|
||||
));
|
||||
}
|
||||
ui.collapsing("Original rows and full intermediate representation", |ui| {
|
||||
ui.monospace(serde_json::to_string_pretty(r).unwrap_or_default());
|
||||
});
|
||||
}
|
||||
} else {
|
||||
ui.label("Apply & recheck to update the schedule. Export is blocked until these decisions pass validation.");
|
||||
}
|
||||
}
|
||||
Tab::Details => {
|
||||
ui.heading("Analysis status");
|
||||
ui.label(&self.status);
|
||||
if let Some(a) = &self.analysis {
|
||||
ui.label(format!(
|
||||
"{} · {} of 4 analysis stages completed · {} unresolved issues",
|
||||
a.sheet,
|
||||
a.completed_stage,
|
||||
a.diagnostics.len()
|
||||
));
|
||||
ui.separator();
|
||||
ui.heading("Intermediate representation");
|
||||
if let Some(r) = &a.rundown {
|
||||
if !a.diagnostics.is_empty() {
|
||||
ui.label("Draft only: resolve the issues in Review before exporting.");
|
||||
}
|
||||
ui.monospace(serde_json::to_string_pretty(r).unwrap_or_default());
|
||||
} else {
|
||||
ui.label("No intermediate representation is available yet. Resolve the issues in Review and recheck.");
|
||||
}
|
||||
} else {
|
||||
ui.label("Analyze a sheet to inspect its intermediate representation and original rows.");
|
||||
}
|
||||
}
|
||||
Tab::Results => {
|
||||
if let Some(p) = &self.completed {
|
||||
ui.heading("Export ready");
|
||||
|
|
@ -759,6 +781,7 @@ impl App {
|
|||
ui.selectable_value(&mut self.tab, Tab::Setup, "Setup");
|
||||
ui.selectable_value(&mut self.tab, Tab::Review, "Review");
|
||||
ui.selectable_value(&mut self.tab, Tab::Results, "Results");
|
||||
ui.selectable_value(&mut self.tab, Tab::Details, "Details");
|
||||
});
|
||||
});
|
||||
egui::TopBottomPanel::bottom("action").show(ctx, |ui| {
|
||||
|
|
@ -798,7 +821,6 @@ impl App {
|
|||
self.export();
|
||||
}
|
||||
}
|
||||
ui.label(&self.status);
|
||||
});
|
||||
});
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
|
|
@ -891,6 +913,8 @@ mod tests {
|
|||
wait(&mut app);
|
||||
assert!(app.analysis.as_ref().unwrap().diagnostics.is_empty());
|
||||
frame(&mut app, 860.0, 620.0);
|
||||
app.tab = Tab::Details;
|
||||
frame(&mut app, 560.0, 400.0);
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
app.output = dir.path().join("show.json").to_string_lossy().into();
|
||||
app.export();
|
||||
|
|
@ -950,7 +974,10 @@ mod tests {
|
|||
frame(&mut app, 560.0, 400.0);
|
||||
app.tab = Tab::Results;
|
||||
frame(&mut app, 560.0, 400.0);
|
||||
app.tab = Tab::Details;
|
||||
frame(&mut app, 560.0, 400.0);
|
||||
app.analysis = None;
|
||||
frame(&mut app, 560.0, 400.0);
|
||||
app.tab = Tab::Review;
|
||||
frame(&mut app, 560.0, 400.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,10 @@ cells, labeled with their column letters and headers (long values are shortened)
|
|||
conflicting timings and unresolved overlaps still produce explicit errors;
|
||||
correct the source when the available controls cannot express the intended fix.
|
||||
The schedule preview below the source table shows the resulting timers and gaps.
|
||||
**Results** offers Open, Open output folder and Copy path. Cancel is
|
||||
**Results** offers Open, Open output folder and Copy path. **Details** contains
|
||||
the current status, completed analysis stage count and full intermediate
|
||||
representation, including original rows. Incomplete representations are labeled
|
||||
as drafts; actionable errors stay in Review. Cancel is
|
||||
observed between analysis stages and before publishing an export; reading a
|
||||
workbook or an active stage finishes before it takes effect.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue