Editor is initialized with DEMO_PATHS instead of workspace state — no Workspace → Editor bridge #69
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#69
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?
Where:
src/pages/Editor.tsx:13(useState<StitchPath[]>(DEMO_PATHS)).Bug:
Editoris reached viaConfirm & Editin Workspace (Workspace.tsx:63-66), which callsconfirmDigitize()thennavigate('/editor').Editorstate is local:useState<StitchPath[]>(DEMO_PATHS)fromsrc/components/editor/constants.ts.Editor.tsxnever readsuseWorkspace(), never acceptsstitchObjectsas a prop, never pulls from sessionStorage.EditorHeader.tsx:18defaultsfilenameto'flower_design.pes'because the prop is never passed (Editor.tsx:309is a literal).flower_designdemo paths, not the design just digitized.Fix consistent with existing patterns:
Mirror the
gallery/data.tssession-persistence approach. Steps:useWorkspace.ts'scommitDigitizedResult(line 383) — afterSET_STITCH_OBJECTS— also write the design tosessionStorage.setItem('tc_workspace_snapshot', JSON.stringify({ stitchObjects, threadStops, designSettings })).Editor.tsx:13, replaceuseState<StitchPath[]>(DEMO_PATHS)with a lazy initializer that readssessionStorage.getItem('tc_workspace_snapshot')and parses it; fall back toDEMO_PATHSif absent.state.designSettings.fileNameintoEditorHeader'sfilenameprop (drop theflower_design.pesdefault).Acceptance: after auto-digitize, Confirm & Edit opens the Editor with the just-digitized paths and the actual filename.
pathsback tosessionStorage.tc_workspace_snapshotor to the Workspace state #110() => {}or missing (DesignCard.tsx:226, :363) #111