Thread color library is a hardcoded const — no UI to manage custom colors #120
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#120
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 Brother PR-10 thread color library is a hardcoded
constarray. There is no UI to view, add, edit, rename, reorder, or remove library entries. There is no persistence — the library is whatever the constant declares at module load.Where
src/components/workspace/types.ts:233-254— theBROTHER_PR10_COLORSarray of 20 hardcoded thread colors.The same
BROTHER_PR10_COLORSis referenced by:src/lib/stitch-adapters.ts:2—toServiceStitchObjectsfalls back to library index for palette lookupsrc/components/workspace/BottomThreadBar.tsx:7— bottom thread bar uses it to render swatchessrc/components/workspace/ExportDialog.tsx:9— export dialog uses it for PR-10 swatch validationWhy now
The Help page FAQ (item "Can I use my own thread colors?") tells users to manage custom colors via Settings → Thread Palettes. The Settings modal exists but is a placeholder (see related issue). The library is the data behind a feature the UI already promises.
Prior closed #94 ("EditorThreadBar.tsx renders a static 10-color picker with random lengths disconnected from the Workspace's actual threadStops") fixed the Editor's thread bar to consume the real
threadStops— but the underlying library is still a const.Suggested fix shape
Convert
BROTHER_PR10_COLORSfrom aconstto alocalStorage-backed runtime list:tc_thread_library_v1(existingSTORAGE_KEYSpattern insrc/components/gallery/data.tsis a good model).useThreadLibrary()) that reads from localStorage, merges with the in-code defaults, and returns a stable list.addColor,updateColor,removeColor,reorderColors— all write to localStorage.loadDesignsinsrc/components/gallery/data.ts.Severity
Low (no current user-facing bug — the app works fine with the hardcoded library). Becomes Medium once Settings page is built and exposes the CRUD UI, because the data layer needs to be in place first.
Discovered by
User-story walkthrough (round 4) — Help page still tells users they can manage custom colors, but the data model + UI don't exist.
Related