Auto Thread Match toggle is permanently disabled with a tooltip referencing dead issue numbers #24/#29 — the value is in state but never read, the toggle is a UI lie #145
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#145
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 RightPanel's Auto-Digitize Settings section has an "Auto Thread Match" toggle (
src/components/workspace/RightPanel.tsx:255-261):The toggle is permanently disabled. The tooltip references issues
#24and#29which do not exist in the current Forgejo issue tracker (the earliest issue in the repo is#76; these were old single-digit numbers from a pre-Forgejo tracking system).The
autoThreadMatchvalue is in the state type (src/components/workspace/types.ts:156) and in test fixtures, but it is never read anywhere outside the disabled toggle. The state is settable (theonChangewould dispatch if enabled) but nothing consumes the value downstream — not the digitize-adapters, not the service, not the Bottom Thread Bar.The user sees a labeled toggle that they cannot interact with. The label promises a feature. The tooltip explains it's not yet implemented but points to dead issue numbers.
Where
src/components/workspace/RightPanel.tsx:255-261src/components/workspace/types.ts:156(autoThreadMatch: boolean;)#24and#29toServiceSettingsatsrc/lib/digitize-adapters.ts:38-65does not include it in the service request)Suggested fix shape
Two paths:
Implement it. Wire the toggle through to the service. The
resolveThreadsendpoint (per #128, now active) returns adeltaEfor each source color. WhenautoThreadMatchis enabled, the digitize response's color regions are passed throughresolveThreadsand the workspace'spaletteIndexForColoruses the resolved catalog match instead of the engine-supplied hex. When disabled, the workspace uses the engine's hex as-is. The state field already exists; the wiring is inuseWorkspace.tsaround line 776.Remove the disabled toggle from the UI. The feature isn't shipped, the tooltip is misleading, and the dead reference to #24/#29 makes the codebase look unmaintained. If the feature isn't on the roadmap, drop the toggle, the state field, and the test fixtures that reference it.
Implementation is the better path: the infrastructure (resolveThreads, paletteIndexForColor) is in place, and the feature delivers a real product improvement (automatic catalog-aware color matching on the digitize side, in addition to the current per-region manual matching).
Severity
Medium. The user sees a labeled, disabled UI element. The tooltip text points to issue numbers that don't exist, which is a code-rot signal even if the user doesn't notice it.
Discovered by
Gap analysis (2026-10-02) of auto-digitize settings after the round 5 + #127/#130/#128 work landed.
Related
resolveThreadsinto the digitize response. TheautoThreadMatchtoggle is the natural user-facing control for this.autoThreadMatchtoggle predates #120 and references the pre-#120 PR-10 catalog concept.Closed by
037d0b5(fix #145).The Auto Thread Match toggle was a UI lie:
disabledwas hardcoded and the tooltip referenced dead pre-Forgejo issue numbers (#24 / #29). The state field existed but had no consumer.This commit wires the toggle through the digitize flow:
src/components/workspace/RightPanel.tsx:319-329): removeddisabledand the dead-ref tooltip. The toggle now dispatchesSET_AUTO_DIGITIZE_SETTINGforautoThreadMatchand the user can actually flip it.useWorkspace.runAutoDigitize(src/components/workspace/useWorkspace.ts:860-918): whenautoThreadMatchis on (the workspace default), afterresolveThreads()returns the catalog matches, every distinct source hex is rewritten to the catalog best match onstitchObjects,colorRegions, and the resultingthreadStops. The exported PES now uses real thread catalog colors. When the toggle is off, or whenresolveThreadsfails (network down, service 5xx), the workspace falls back to the engine-supplied hex — the prior default and the safe fallback when the catalog lookup is unavailable.issue-68.test.tsxnow locks in the new enabled behavior (nodisabled, no#24/#29refs, click dispatches).issue-145.test.tsxadds 5 integration cases covering:autoThreadMatch=false(no rewrite),autoThreadMatch=truerewrites stitchObjects/colorRegions/threadStops, and the safe fallback whenthreadMatches=null.All 597 tests pass; typecheck and lint clean (one pre-existing warning, unrelated).