Editor's handleSendToWorkspace (per #207) also hardcodes hoopSize: '4x4', fabricType: 'medium', etc. — same bug as #238/#239 in a separate code path, the user's settings are not preserved when sending the design to the Workspace #252
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#252
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
src/pages/Editor.tsx'shandleSendToWorkspace(per #207) at line 1148 also hardcodesdesignSettings:This is the same code smell as #238 and #239 but in a different code path. The "Open in Workspace" button (per #207) sends the editor's current paths to the workspace for re-digitization, with these hardcoded design settings.
A user who:
hoopSize: '4x4'Where
handleSendToWorkspace:src/pages/Editor.tsx:1148'4x4'as #238 and #239useDesignSettingshook yet (per #238's suggested fix)Suggested fix shape
Same as #238/#239: read the design settings from a shared source (a
useDesignSettingshook, or a context, or local state in the editor'suseState).The hook is the right answer because BOTH
handleSaveANDhandleSendToWorkspaceneed the same values. One source, two consumers.The right panel or Settings modal exposes the form to set
designSettings. The hook persists to localStorage so the values survive a refresh.Severity
Medium. Same as #238/#239. The user can re-set the values in the workspace after they land there.
Discovered by
Code review (2026-10-02) of
handleSendToWorkspace.Related
Fixed by the sibling-hook reads that landed in commit
ab05462(fix #239). At HEAD,handleSendToWorkspace(src/pages/Editor.tsx, around line 1441) reads fromdesignHoopSize/designFabricType/designStabilizer/designMachineProfile— the four editor picker hooks #238/#239 introduced — and threads them into thetc_load_design_snapshotenvelope.The issue body quotes an old line number (1148) where the function used to live when the literals were hardcoded; the file has shifted since #239, but the hook reads have been in place for the full #252 reporting window.
To pin this so a future refactor cannot silently revert to hardcoded literals, I added issue-252.test.tsx (commit
26fbe03) which exerciseshandleSendToWorkspacethrough the same picker-mocking harness issue-239 uses. Seven tests, all passing locally:navigate('/workspace')still fires after the bridge writeNo production code change needed — closing.