From cf483c1a2ecefa27ba08353373a371f08383b2d0 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Wed, 4 Nov 2026 23:03:58 -0500 Subject: [PATCH] fix(ui): say Stopped for server jobs the operator stopped Every server path into NestJobState.Cancelled requires cancelRequested (Cancel Job), and the running state already reads Stopping. --- OpenNest.WinForms.Tests/Forms/ServerJobsFormTests.cs | 4 ++-- OpenNest/Forms/ServerJobsForm.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenNest.WinForms.Tests/Forms/ServerJobsFormTests.cs b/OpenNest.WinForms.Tests/Forms/ServerJobsFormTests.cs index cabdba8b..5e6a01e9 100644 --- a/OpenNest.WinForms.Tests/Forms/ServerJobsFormTests.cs +++ b/OpenNest.WinForms.Tests/Forms/ServerJobsFormTests.cs @@ -192,7 +192,7 @@ public class ServerJobsFormTests form.Select(queued.Id); form.CancelJobButton.PerformClick(); PumpUntil(() => form.Jobs.Any(j => j.Id == queued.Id && j.State == NestJobState.Cancelled), "the cancelled job"); - Assert.Equal("Cancelled", Cell(form, queued.Id, 1)); + Assert.Equal("Stopped", Cell(form, queued.Id, 1)); form.Select(ready.Id); form.OpenButton.PerformClick(); @@ -276,7 +276,7 @@ public class ServerJobsFormTests Assert.Equal("Queued (next)", ServerJobText.State(new NestJobRecord { State = NestJobState.Queued })); Assert.Equal("Stopping", ServerJobText.State(new NestJobRecord { State = NestJobState.Running, CancelRequested = true })); Assert.Equal("Discarded", ServerJobText.State(new NestJobRecord { State = NestJobState.Succeeded, Review = NestJobReview.Discarded })); - Assert.Equal("Cancelled", ServerJobText.State(new NestJobRecord { State = NestJobState.Cancelled })); + Assert.Equal("Stopped", ServerJobText.State(new NestJobRecord { State = NestJobState.Cancelled })); Assert.Equal("out of memory", ServerJobText.Result(new NestJobRecord { State = NestJobState.Failed, Error = "out of memory" })); Assert.Equal("", ServerJobText.Result(new NestJobRecord { State = NestJobState.Succeeded })); Assert.Equal("(unnamed nest)", ServerJobText.Title(new NestJobRecord())); diff --git a/OpenNest/Forms/ServerJobsForm.cs b/OpenNest/Forms/ServerJobsForm.cs index b3075c00..4fed0508 100644 --- a/OpenNest/Forms/ServerJobsForm.cs +++ b/OpenNest/Forms/ServerJobsForm.cs @@ -313,7 +313,7 @@ namespace OpenNest.Forms _ => "Ready to review", }, NestJobState.Failed => "Failed", - _ => "Cancelled", + _ => "Stopped", }; public static string Result(NestJobRecord job)