resolveThreads is wrapped, typed, tested, and never called — wire it into the Bottom Thread Bar and Right Panel for per-color match accuracy (ΔE) and alternative suggestions #128
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#128
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
POST /v1/threads/resolvetakes a list of source hex colors and returns for each one: the best catalog match (with Delta-E) plus 2-3 alternative matches (with their own Delta-E). The client has the function (resolveThreads()atsrc/lib/easystitch-client.ts:707-711), the types, and 17+ test cases. Zero production callers.This is the surface that lets a user see "this color match is loose (ΔE 12.4) — here are two closer options." Right now the user has no way to know if a match is tight or loose, and no way to pick a different thread.
Where
POST /v1/threads/resolve(verified working at runtime)src/lib/easystitch-client.ts:707(resolveThreads(colors: string[]): Promise<{ matches: ThreadMatch[] }>)src/lib/easystitch-client.test.ts:339-400+(function is well-tested)src/lib/easystitch-client.ts:84-102(ThreadMatch,ThreadAlternative)Suggested fix shape
Two surfaces to wire
resolveThreadsinto:Bottom Thread Bar entry tooltip — when the user hovers a thread stop, show the source hex, the catalog match, and the ΔE. If ΔE > 3, render a small warning chip ("loose match") and a "Pick closer match" link that opens a popover with the alternatives from
ThreadMatch.alternatives.Right Panel "Stitch Object" detail — when a path is selected, show the thread color assignment with the match confidence (ΔE) and a "Try alternatives" expander that lists the alternatives with their ΔE values. Clicking an alternative calls
dispatch({ type: 'UPDATE_OBJECT', ..., colorId: alt.best.code })to swap the assignment.The data flow:
DigitizeResponse) does not currently include per-region ΔE. Either:(a) extend the service to return ΔE per region, or
(b) have the client call
resolveThreadsafter digitize for the source colors, indexed by regionOption (b) is the smaller change — no service work needed. The client batches the source colors from
response.regions.map(r => r.color)and callsresolveThreadsonce.Discovered by
Gap analysis (2026-10-02) of unreached service endpoints.
Related
src/pages/Help.tsx:138claims "color matching ... 2-3 Delta-E" — accurate server-side; this issue is what makes the claim visible to the user.Wired
resolveThreadsinto both surfaces per the issue spec:Pick closer matchpopover listing theThreadMatch.alternatives.Try alternativesexpander; clicking an alternative dispatchesUPDATE_OBJECTwithcolorId: alt.best.code.Data flow uses option (b): client batches
response.regions.map(r => r.color)and callsresolveThreadsonce after digitize — no service changes needed.Closes #128.
reorderColorsonly exists for the library catalog, not stops #165