Auto Nest leaves out ledger item codes already on other open server nests,
and save and post re-check a nest's codes before going on.
- Server: GET /api/nests/stock-item-codes?exclude= lists the codes on
non-deleted Draft, Quote and To Be Cut nests. Codes are stored in
nest_stock_codes (schema v14) at every archive write; the upgrade reads
each current archive once.
- Data: INestRepository.GetStockCodesInUseAsync, LedgerCodesInUse (5 s,
failures become an unknown answer), the pure LedgerCodeFilter for ledger
rows (reusable by release-time nesting) and LedgerCodeCheck for the
re-check.
- Desktop: the Auto Nest ledger summary counts "(N on other nests)" or says
other nests were not checked. Save, Save As and post open Ledger Stock
Changed when codes are taken: proceed after a per-attempt
acknowledgement, remove the codes (undoable), or cancel. A ledger that
cannot be read skips the check with a status note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
File > New restarted its counter every day while names only carry the
year, so the first nest of each day was always N26-223, and each PC kept
its own counter. In Database mode the nest server now hands out the
year's next number (POST /api/nest-names/next, nest_sequences table,
schema v6), staying above every stored generated name so offline or
pre-existing names are never reissued. The per-PC counter remains the
fallback when the server is unreachable or older, resets per year, and
is raised past each server allocation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /api/nests/query filters name, customer, material, made by, comments
and status (stored and display names) with an escaped LIKE parameter,
orders newest saved first with an id tie-break, and returns one page of
at most 500 records plus the total match count, read in one database
hold. Unknown, repeated or out-of-range parameters return 400.
RemoteNestRepository.QueryAsync validates the same bounds before
sending, rejects oversized pages, and reports a 404 from an older server
as a server that needs updating. GET /api/nests stays the full
enumeration used by backup, restore checks and the container smoke.
NestStorageSettings persists the file/database toggle and server URL at
%APPDATA%\OpenNest\storage.json following the EngineSelectionSettings
never-throwing pattern; missing config means File mode. NestRecord carries
the shareable job metadata, INestRepository defines the backend contract,
and RemoteNestRepository implements it against the nest server with
multipart uploads (metadata JSON part + .nest file part).