feat(data): store a nest's job number apart from the customer

Job numbers were going into Customer ("GM / 4980-88R"), which breaks
sorting, searching and grouping by customer. A nest now has its own
Job # field: one or several jobs separated by commas, normalized to
"a, b". It is saved in nest.json and the server (schema v21), edited
beside Customer in Edit Nest (WinForms and Avalonia), shown as a
sortable, searchable column in the Open list, and printed on the nest
report and in MCP output.

Deploy the server before the desktop: the open overlay takes the
server's job number, and an older server has none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-12-03 10:21:04 -05:00
1 parent 857b88a2c7
commit bfdfefeb9e
40 files changed
+304 -44

No files matched your search

@@ -23,7 +23,7 @@ public sealed class DrawingLibraryDatabaseTests
using (var database = new NestDatabase(factory.DatabasePath, pooling: false))
Assert.Empty(database.QueryDrawings(new DrawingLibraryQuery { IncludeArchived = true }).Items);
Assert.Equal(before, NestDigest(factory.DatabasePath));
Assert.Equal(20L, Scalar(factory.DatabasePath, "PRAGMA user_version"));
Assert.Equal(21L, Scalar(factory.DatabasePath, "PRAGMA user_version"));
}
using var upgraded = new NestDatabase(factory.DatabasePath, pooling: false);
@@ -44,7 +44,7 @@ public sealed class DrawingLibraryDatabaseTests
using (var database = new NestDatabase(factory.DatabasePath, pooling: false))
{
Assert.Equal(20L, Scalar(factory.DatabasePath, "PRAGMA user_version"));
Assert.Equal(21L, Scalar(factory.DatabasePath, "PRAGMA user_version"));
Assert.Equal(before, NestDigest(factory.DatabasePath));
// Two distinct blobs across four revisions: the bracket's notes edit and the
// plate both reuse the bracket's first package.
@@ -81,7 +81,7 @@ public sealed class DrawingLibraryDatabaseTests
{
using var factory = new ServerFactory();
using (new NestDatabase(factory.DatabasePath, pooling: false)) { }
Execute(factory.DatabasePath, "PRAGMA user_version=21");
Execute(factory.DatabasePath, "PRAGMA user_version=22");
Assert.Throws<InvalidOperationException>(() => new NestDatabase(factory.DatabasePath, pooling: false));
}
@@ -106,7 +106,7 @@ public sealed class DrawingLibraryDatabaseTests
""");
using var upgraded = new NestDatabase(factory.DatabasePath, pooling: false);
Assert.Equal(20L, Scalar(factory.DatabasePath, "PRAGMA user_version"));
Assert.Equal(21L, Scalar(factory.DatabasePath, "PRAGMA user_version"));
Assert.Equal(-3, upgraded.GetDrawing(record.Id)!.Settings.Priority);
Assert.Equal(-3, Assert.Single(upgraded.DrawingHistory(record.Id, 0, 100)!.Items).Settings.Priority);
Assert.Equal(int.MaxValue, upgraded.GetDrawing(other.Id)!.Settings.Priority);