From 4be141b0382c1b00db4d9dc56a20bddc3b2426d1 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Thu, 19 Nov 2026 19:31:07 -0500 Subject: [PATCH] feat(release): pick a top layout while Make Nests nests Each released nest's progress window offers the top-layout cards and Use This Layout, as Auto Nest does: using one stops that nest's search and goes on with it. A search that finishes with several layouts counts down 5 seconds before going on with the engine's result; picking a card stops the countdown and waits for Use This Layout or Discard. Co-Authored-By: Claude Opus 5.5 --- .../Forms/NestProgressFormLayoutsTests.cs | 65 +++++++++++++++++++ OpenNest/Forms/Commands/AutoNestCommand.cs | 10 ++- OpenNest/Forms/MainForm.Release.cs | 14 ++-- OpenNest/Forms/NestProgressForm.cs | 64 +++++++++++++++++- docs/automatic-nesting.md | 2 +- docs/nest-storage.md | 6 +- 6 files changed, 151 insertions(+), 10 deletions(-) diff --git a/OpenNest.WinForms.Tests/Forms/NestProgressFormLayoutsTests.cs b/OpenNest.WinForms.Tests/Forms/NestProgressFormLayoutsTests.cs index 3d4ff05c..a00072be 100644 --- a/OpenNest.WinForms.Tests/Forms/NestProgressFormLayoutsTests.cs +++ b/OpenNest.WinForms.Tests/Forms/NestProgressFormLayoutsTests.cs @@ -142,6 +142,71 @@ public class NestProgressFormLayoutsTests Assert.False(cts.IsCancellationRequested); }); + // Runs the form's timers until the task completes or the wait gives up. + private static void PumpUntil(Task task, TimeSpan max) + { + var waited = System.Diagnostics.Stopwatch.StartNew(); + while (!task.IsCompleted && waited.Elapsed < max) + { + Application.DoEvents(); + Thread.Sleep(5); + } + } + + private static Label Status(Form form) => + Assert.IsType