Thread library should source from the service catalog (61 colors) + tier 2 user colors + tier 3 bulk self-source import — drop the 20-color fictional fallback #126
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#126
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 thread library is built on a 20-color fictional fallback (
DEFAULT_THREAD_LIBRARYinsrc/components/workspace/threadLibrary.ts) that the orchestrator inherited from a hardcodedBROTHER_PR10_COLORSconst. The fallback is dead weight:GET /v1/threads/catalogreturns 61 real thread colors. The local 20 doesn't match.The frontend should not carry its own thread data. The service is the source of truth.
Where
GET /v1/threads/catalog(already wired viagetThreadCatalog()insrc/lib/easystitch-client.ts:585-598)src/components/workspace/threadLibrary.ts:18-39(DEFAULT_THREAD_LIBRARY)tc_thread_library_v1(localStorage key inthreadLibrary.ts:16)useThreadLibrary()insrc/components/workspace/threadLibrary.ts:161-223src/components/workspace/SettingsModal.tsxSuggested fix shape
Three tiers of color in the library, merged in
useThreadLibrary():Tier 1: Service threads (read-only, ~61 entries)
getThreadCatalog(). Cached in memory for the session.source: 'service',readOnly: true.Tier 2: User threads (read-write, free-form)
tc_thread_user_v1(version-bump from the oldtc_thread_library_v1).source: 'user',readOnly: false.addColor/removeColor/updateColor/reorderColorsAPI stays; it just writes to the user store now.Tier 3: Self-source import (bulk paste)
name, hexpairs (one per line) to add multiple user colors at once.Madeira Aerofil 1100, #FFFFFForMadeira 1100 #FFFFFF Whiteor just a hex on its own (#FF00FF).Service unreachable
getThreadCatalog()fails, the Settings modal shows: "Cannot reach Brother thread library. Add your own colors below to continue."Data model
The hook returns
LibraryEntry[]. Consumers don't care about the source flag for rendering, only the Settings modal does (for the badge + delete/edit affordances).Migration
tc_thread_library_v1data is the 20-color fictional fallback. Wipe it on first load of the new code; do not import. (Importing would perpetuate the wrong hex values.)tc_thread_user_v1so the old key is cleanly orphaned.Discovered by
Discussion round (2026-10-02) about whether the 20-color client fallback made sense. It doesn't.
Related