Skip to content

Export only the selected Production batch without completed-unit blockers - #102

Merged
poitee merged 1 commit into
mainfrom
codex/production-batch-export
Sep 28, 2026
Merged

poitee merged 1 commit into
mainfrom
codex/production-batch-export

Conversation

@poitee

@poitee poitee commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

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/orca directory. 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, initializeAcceptedPlates stops merging newly packed plates with an existing revision (mergeExistingPlates removed); 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, productionPlateReadiness scopes unassigned/unplaced counts and detects plate units outside the selection (hasUnselectedPlateUnits). Work package status, task hints, Export printer status, and AcceptedPlateSection use 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.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 8eb34acf-3603-44b2-9747-131068ecf656

📥 Commits

Reviewing files that changed from the base of the PR and between 707c2ef and 94e42d0.

📒 Files selected for processing (9)
  • web/apps/server/src/routes/accepted-plate-export-delivery-routes.test.ts
  • web/apps/server/src/services/accepted-plate-workspace.ts
  • web/apps/web/src/components/export/accepted-plates/AcceptedPlateSection.test.tsx
  • web/apps/web/src/components/export/accepted-plates/AcceptedPlateSection.tsx
  • web/apps/web/src/lib/productionSelection.ts
  • web/apps/web/src/lib/workPackageProjection.ts
  • web/apps/web/src/lib/workPackageTasks.ts
  • web/apps/web/src/pages/ExportPage.test.tsx
  • web/apps/web/src/pages/ExportPage.tsx
 ____________________________________________________________________________________________________________________________________________
< Organize teams around functionality. Don't separate designers from coders, testers from data modelers. Build teams the way you build code. >
 --------------------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@poitee
poitee marked this pull request as ready for review September 28, 2026 03:34
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

@poitee

poitee commented Sep 28, 2026

Copy link
Copy Markdown
Owner Author

Independent pre-merge verification: PASS+NOTES for 94e42d00bae9e3765c14bf10f3914e12193ecede against e3d5bd6c071ed769277aac5e93f4f8ad1458109d.

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.

@poitee
poitee changed the base branch from codex/full-function-audit to main September 28, 2026 04:29
@poitee
poitee merged commit 1013747 into main Sep 28, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant