Export only the selected Production batch without completed-unit blockers - #102
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_c0e6d4f2-5fe2-4f39-a0a6-8d5133fbaec8) |
|
Independent pre-merge verification: PASS+NOTES for An independent Codex agent that did not author GRE-286 reviewed all nine changed files and ran 161 focused tests: 92 web and 69 server. The checks cover selected-batch readiness, exact exported 3MF unit selection, replacing old plates while preserving immutable history, replay and stale-state rejection. No merge blocker was found. Notes: preparing a replacement batch intentionally resets its manual layout. The earlier real-browser export and full 3,720-test quality run provide additional evidence. Cursor cloud verification was unavailable, and CodeRabbit did not provide a substantive review; this is a Codex verdict, not human approval. Native slicer operation, physical printing and production deployment remain outside this proof. |
A completed part outside the selected Production batch blocked Export for slicing. For example, selecting the one remaining unit in a seven-unit Build created a valid one-unit Plate, but the UI still demanded printers for the six completed units and displayed no actionable assignment rows.
This scopes readiness checks to the selected batch. Preparing Plates publishes exactly that batch as a successor revision. The assignment form submits every selected unit, including units already on a Plate, so extending a batch preserves selected copies. Existing Plates outside a changed selection require preparation again instead of silently entering the export.
Stacked on #101. Fixes https://linear.app/greetz/issue/GRE-286/completed-units-outside-the-selected-batch-block-plate-export.
Validation: 92 focused web tests and 69 server tests passed, including routed 3MF download/object checks for disjoint and extended batches and immutable revision history. Web/server typechecks and changed-file lint passed. The real local browser reproduction now reaches Ready to slice; its downloaded 3MF contains exactly the one selected object and excludes all six completed units. CSV and XLSX downloads also passed structural checks. The complete combined quality gate passed on this head with
VITEST_MAX_WORKERS=2 TMPDIR=/private/tmp TZ=UTC npm run quality: 3,720 unit/integration tests, lint, dead-code checks, TypeScript, production builds, runtime/bundle checks and all seven browser scripts.The export test fixture also stops watching a real
/profiles/orcadirectory. Its global logger assertion remains unchanged; the fixture now avoids unrelated filesystem-watcher errors. No physical printing, deployment, or remote merge is claimed.Note
Medium Risk
Changes accepted-plate revision publishing semantics and production gating logic; incorrect readiness could block export or publish wrong unit sets, but behavior is covered by new server and web tests.
Overview
Production export now follows the selected unit batch, so completed or plate-assigned copies outside that selection no longer block slicing or demand printer assignment.
On the server,
initializeAcceptedPlatesstops merging newly packed plates with an existing revision (mergeExistingPlatesremoved); each prepare publishes only the tokens in the current assignments as a successor revision. A routed integration test asserts exported 3MF objects match the chosen batch after a prior partial plate.On the web,
productionPlateReadinessscopes unassigned/unplaced counts and detects plate units outside the selection (hasUnselectedPlateUnits). Work package status, task hints, Export printer status, andAcceptedPlateSectionuse this so export stays gated until the user Prepare Plates again when the selection shrinks; assignment submit includes all selected tokens (including ones already on a plate). Tests cover the assignment form, Export page messaging, and server export object lists.Reviewed by Cursor Bugbot for commit 94e42d0. Bugbot is set up for automated code reviews on this repo. Configure here.