No "Open in Workspace" / load-back action on Gallery designs #74
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#74
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/components/gallery/DesignCard.tsx,src/components/gallery/RightClickMenu.tsx.Bug:
'empty'and only accepts a fresh file upload (useWorkspace.ts:325-371). NoLOAD_DESIGNaction.Designtype (src/components/gallery/types.ts) currently stores counts andthumbnailColorsonly — no geometry, so even if a "Load" button existed, there'd be nothing to load.Fix consistent with existing patterns:
Mirror
saveCurrentDesign(useWorkspace.ts:501-548) in reverse.Extend the persistence shape. In
saveCurrentDesign(useWorkspace.ts:511-543), include the geometry:Add
snapshot?: { stitchObjects: StitchObject[]; threadStops: ThreadStop[]; designSettings: DesignSettings }to theDesigntype.Add
LOAD_DESIGNaction touseWorkspace.ts'sActionunion and reducer:Wire UI. Add
onLoadtoDesignCardandRightClickMenuprops. On click: dispatchLOAD_DESIGNthennavigate('/workspace'). Add an "Open in Workspace" entry toRightClickMenuand a play-icon button onDesignCardnext to the existing favorite star.Acceptance: opening a saved design loads its geometry into the Workspace canvas in
digitizedstate with history snapshot taken so the user can undo the load.Reopening: the kilo-gsd run for #74 closed this issue but the user-visible bug is not fully fixed.
What landed (partial):
useWorkspace.tsgot aLOAD_DESIGNreducer case (~L369) that consumes{stitchObjects, threadStops, designSettings}and transitions to'digitized'.saveCurrentDesign(~L653) now persistssnapshot: {stitchObjects, threadStops, designSettings}into the savedDesign.Designtype gainedsnapshot?: DesignSnapshot.Both changes are bundled in commit
0399d0a(which the runner credited to a different issue). No commit references #74.What's still missing (the actual user-facing bug):
src/components/gallery/DesignCard.tsxis unchanged since the project import (git log -- src/components/gallery/DesignCard.tsxshows only1c11999 init: project bootstrap from archive).<DropdownMenuItem>"Open in Workspace" and "Open in Editor" items still haveonClick={() => {}}(empty no-op).onClickentirely — clicking does nothing.The
LOAD_DESIGNreducer exists but nothing dispatches it. Closing this issue was premature.Fix landed on origin/main via two commits:
48cb353— feat(gallery): add Open in Workspace to load saved designs (#74) — wires DesignCard dropdown / hero / play-icon / RightClickMenu onLoad entries; adds LOAD_DESIGN reducer + sessionStorage bridge + issue-74.test.tsx (197 lines).e5ead50— fix(#74): snapshot pre-load state so UNDO after LOAD_DESIGN reverts to empty workspace — additional 429 lines of reducer + integration tests (issue-74-reducer.test.ts, pages/issue-74.test.tsx).Monitor log confirms: all 8 Verify commands passed (vitest + lint + tsc), pushed to main, Forgejo close fired. Subsequent launcher runs blocked on prior in-progress card state — archive path.
appState='digitizing'#102pathsback tosessionStorage.tc_workspace_snapshotor to the Workspace state #110() => {}or missing (DesignCard.tsx:226, :363) #111