← back to pin list

Brick 31: nest-level click-in-order for part lists — the numbered boxes on the part-by-part kind

kerfmaster pin list · The interface — recorded intent (build later)

recordStates what the code does today. Auditable against the code — this is the only type that can go stale.

Content last changed 2026-09-02 — computed from the item itself, not typed.

Built 2026-09-02 (Aristide 'Go'). The standing later-brick of bricks 15/29/30 closed: Jordan's click-in-order model (2026-08-28 walkthrough step 3, pin nest-part-sequence) at part-list scale.

Engine pl_post.sequence_placements(n, clicked) — the ONE merge: clicked placement indices first in click order, unclicked continuing the pack's own fill order after; a double click or off-sheet index refuses in the module's own words (PlPostInvalid). Unlike brick 15's true nest there are NO P9996/P9997 macros to drop — a part-list program is part-by-part BY CONSTRUCTION (def-true-vs-part-by-part-nesting), so the operator's order changes the ORDER, never the program form; outer-last per part and the posted-file audit hold on any order (warn never block).

Server GET/POST /api/jobs/<id>/plseq (the nestseq pattern): GET = the emission order per sheet from the engine merge (one source — the UI never recomputes it) + the clicked list + source; POST validates every [sheet, index] entry (bad sheet / off-sheet placement / double click / malformed entry = plain 400 in honest words, nothing saved) and saves the sequence ON the pack document (partnest.json), so a re-pack clears it naturally — new placements, new numbers. Saving or clearing drops the posted sheet programs via _drop_plpost — a stale program never keeps serving, every sheet keeps its O-number (pl_onums), and a delivered version marks replanned. run_plpost consumes it: placements reordered by the same merge before assemble(), each program recording part_order + part_order_source (operator 'N clicked first, rest pack fill order' vs rule:pack fill order).

UI numbered boxes on every placement of the part-list Nest canvas (numbers restart per sheet — each sheet is its own program), anchored at each part's true arc-sampled bbox centre transformed by its own placement; 'Click parts in order…' mode with real-mouse add/unpick on the placements, live pick accents and renumbering, Apply / Cancel / Back to fill order; drawer states the honest notes (order-not-form, drop-on-save with numbers kept, re-pack clears).

Proven test_pl_seq.py 27 NEW controls (engine merge + full HTTP e2e on a temp jobs dir: refusal ladder verbatim, the order MOVES the posted bytes, no macros on any order, audit clean, numbers kept, re-pack clears) + verify_plseq.js 15 live checks over the public URL (real-mouse pick/unpick, Apply, posted program runs clicked-first, Back to fill order, persistence across a fresh page, refusal verbatim, nav209 untouched); all 20 prior suites green.

Honest limits: the click orders PLACEMENTS on the sheet — per-feature order within a part stays the referenced job's own Manual Sort; 'Shift=Batch' multi-select is MetaCam reference, not built.