Service caps stitch objects at 50,000 (and the design's maxStitchCount is 200,000) but the export dialog has no client-side guard — large designs fail at export with a 422 instead of pre-flight warning #169
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
The service's
StitchObjectschema declaresmaxItems: 50000for thestitchObjectsarray (POST /v1/export). The machine profile'slimits.maxStitchCountis 200,000 (persrc/lib/easystitch-client.ts:36-78, all 6 machines cap at 200k).The Export dialog (
src/components/workspace/ExportDialog.tsx) does not pre-check the design's stitch count or object count before callingexportPES. A user with a dense design that exceeds the limit:maxItemsviolationuseAsyncStatecatches the error, dispatches an error toast with the service messageThe user should see a pre-flight warning: "This design has 78,000 stitches, which exceeds the 50,000 limit. Consider reducing density or splitting the design." before they click Export.
Where
POST /v1/exportrequest body,stitchObjectsfield (verified at runtime via/openapi.json)src/lib/easystitch-client.ts:36-78(200,000 across all 6 machines)src/components/workspace/ExportDialog.tsx:exportRequest(line 64-75) — no pre-flight checkextra_forbidden/maxItemsviolationSuggested fix shape
Add a pre-flight check to
exportRequestinExportDialog.tsx:Compute stitch count from
stitchObjects:Check against limits:
Surface in the UI: in the dialog's body, near the format buttons, render:
If the design is over the limit, render an inline warning (similar to the
inlineErrorat line 295) and disable the Export button.Show the count from the design — the workspace already tracks
stitchCountper object; the total is a sum.Severity
Medium. Users with realistic designs hit this and get a confusing error. Pre-flight checking makes the limit visible before the user clicks Export.
Discovered by
Gap analysis (2026-10-02) of export affordances.
Related
limitsfield is now defined; this issue consumes it.Fixed via
61239e2on main. Pre-flight size guard added to ExportDialog:export-size-summary); goes red when over the stitch cap.24/24 ExportDialog tests, 711/711 repo tests, clean tsc + eslint.