Editor has no hoop-size mismatch warning — user designing a path that extends beyond the 4x4 hoop (or whatever's set) gets no warning until they try to export and the service rejects it #260
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#260
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
grep -rn 'hoopSize.*warn\|warn.*hoop' src/returns 0 hits. The editor renders paths on a virtual hoop (perMM_TO_PXetc.), but if a path's bounding box exceeds the hoop's dimensions, there's no visible warning.src/components/editor/canvasRenderer.tslikely renders the hoop rectangle (per theMM_TO_PXconstant and the rendering logic), but doesn't check if paths are inside.A user who:
The polish move is to show a visual warning (a red dashed line outside the hoop, or a yellow border on the offending path) when paths exceed the hoop.
Where
src/components/editor/EditorCanvas.tsx(no hoop-bounds check)grep -rn 'hoop.*exceeds' src/returns 0src/lib/easystitch-client.ts:exportPES(might validate, let me check)Suggested fix shape
Per-path indicator: render paths that exceed the hoop with a red dashed outline.
Export guard: the export service already validates (per #103); the in-editor warning surfaces the issue earlier.
Severity
Medium. The user finds out at export time, not design time. Power users notice.
Discovered by
Gap analysis (2026-10-02) of editor validation.
Related
{machineDef.maxHoopMm.w}×{machineDef.maxHoopMm.h}mm— the editor's warning mirrors that.Shipped fix at
a91226f(push324eb2f..a91226f).Two pieces:
Hoop outline —
pages/Editor.tsxnow plumbs the user-selected hoop (designHoopSize) intoEditorCanvasas a new optionalhoopSizeprop. When present, the canvas renders a labeled dashed rectangle showing where the selected hoop (4x4 / 5x7 / 6x10 / 8x12) sits inside the larger 400x400mm design canvas. Without this the user had no visual reference for "this is the area that will fit in my machine" until they hit export (#103).Extends-beyond-hoop warning — the canvas computes per-path bbox vs. hoop bounds in path-units every frame. When one or more visible paths overflow the hoop, it:
The badge uses
AlertTrianglefrom lucide-react (the same icon the ServiceHealthBanner uses for visual consistency) and mirrors the dimensions label format used by the EditorHeader hoop selector + the right panel MACHINE PROFILE hint, so the user gets the same value everywhere. Legacy callers that don't wirehoopSizerender unchanged (the canvas toleratesundefined).Three new helpers in
canvasRenderer.ts:drawSelectedHoop— outline + dimension label for the selected hoop.drawHoopOverflowIndicator— red dashed rect around an overflowing path's anchor bbox in screen coords.computePathsBoundingBoxshape is mirrored inline for the per-frame overflow check; the React-sideuseMemoon(paths, hoopSize)drives the badge.Tests: 11 new cases — 4 in
canvasRenderer.test.ts(rect math + scale + empty-path no-op) and 7 inEditorCanvas.test.tsx(legacy no-op, hoop outline drawn, no badge when paths fit, badge + outline when a path overflows, pluralization for 2+ paths, sibling paths that fit don't get outlined, invisible overflowing paths don't contribute). Full vitest suite: 1383 passing.