Editor stitch type "Cross Stitch" dropdown (value "cross") silently maps to Satin on export — lookup table uses "cross-stitch" with hyphen, find() returns undefined #139
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#139
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 Editor's Stitch Type dropdown offers 5 values:
satin,fill,running,cross,zigzag. The Editor's path-to-stitch-object mapper atsrc/pages/Editor.tsx:113-114looks for matches in the list['satin', 'fill', 'running', 'cross-stitch', 'motif', 'zigzag'].The dropdown value
crossdoes not match the lookup valuecross-stitch(with a hyphen). When a user picks "Cross Stitch" in the editor and exports, the find() returnsundefinedand the type silently falls back tosatin.zigzagworks because the lookup table includes it.crossdoes not.Where
src/components/editor/EditorRightPanel.tsx:294-298(<option value="cross">Cross Stitch</option>)src/pages/Editor.tsx:113-114(['satin', 'fill', 'running', 'cross-stitch', 'motif', 'zigzag'])src/components/editor/types.tsSuggested fix shape
Two options:
cross-stitch(and addmotifto the dropdown while at it). This aligns the editor dropdown with the lookup table.crossmatchescross-stitch. Simpler, less code change.Option 1 is the explicit fix; option 2 is the defensive fix that prevents future drift. Either is fine.
Also: the lookup table has
motifbut the editor dropdown doesn't offer it. The Help page (in #109-era text) doesn't mention motif either. Decide whether motif is a real stitch type the user should be able to select, or remove it from the lookup.Severity
Medium. A user picks Cross Stitch expecting a cross-stitch export, gets satin instead. Silent behavior; no error or warning.
Discovered by
Gap analysis (2026-10-02) of editor stitch type handling.
Related
Fixed in commit
377951fon main.Renamed the Editor dropdown option from value="cross" to value="cross-stitch" in src/components/editor/EditorRightPanel.tsx:297. The dropdown now matches the canonical StitchType literal (cross-stitch) used by Editor.tsx:113 lookup table, workspace/types.ts, workspace/RightPanel.tsx, canvasRenderer.ts, and stitch-adapters.ts.
Verification:
originalServiceStitchTypebut it's never set anywhere #157