From b66af8658b7e6df154977a0cb592388befef4890 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Tue, 13 Oct 2026 13:54:21 -0400 Subject: [PATCH] refactor(ui): make the automatic cutoff dialog scannable at a glance The dialog buried its verdict in a scrollable text box that restated the same numbers per plate behind a paragraph-length warning. Replace it with: - a bold colored status line stating exactly what Apply will do (Ready / Blocked / No new cut-offs / Error with the reason); - the occupied span, used span, separator X and retained tail as compact caption+value cells with tooltips instead of four sentences; - the warning paragraph reduced to one amber line with the full text in its tooltip; - a per-plate table (cut-offs, spans, tail, Ready/Blocked/No change) for the All Plates command, replacing repeated text blocks; - the details box now lists only issues and notices, prefixed by plate number when planning a nest, instead of echoing every measurement. Planning, preview, apply and rollback behavior is unchanged; tests and the cutoffs document follow the new presentation. --- .../Forms/AutomaticCutOffFormTests.cs | 30 ++- .../Forms/AutomaticCutOffForm.Designer.cs | 234 +++++++++++++----- OpenNest/Forms/AutomaticCutOffForm.cs | 140 +++++++---- docs/automatic-scrap-cutoffs.md | 4 +- 4 files changed, 300 insertions(+), 108 deletions(-) diff --git a/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs b/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs index b350eff..194bd76 100644 --- a/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs +++ b/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs @@ -35,11 +35,17 @@ public class AutomaticCutOffFormTests var originalParts = view.Plate.Parts.ToArray(); using (var form = new AutomaticCutOffForm(view, Units.Inches)) { + Assert.False(Control(form, "plateGrid").Visible); Invoke(form, "PreviewButton_Click", null, EventArgs.Empty); Assert.NotEmpty(PreviewParts(view)); Assert.Empty(view.Plate.CutOffs); Assert.Equal(originalParts, view.Plate.Parts.ToArray()); - Assert.Contains("36 in width", Control