BottomThreadBar's thread stops cannot be reordered (no drag-and-drop) — Home page claims "reorder with drag-and-drop simplicity" but reorderColors only exists for the library catalog, not stops #165
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#165
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 Home page feature grid advertises:
The
reorderColors(from, to)function exists insrc/components/workspace/threadLibrary.ts:189and is used byuseThreadLibrary'sreordercallback (line 557-560). This reorders the user's library catalog (the list of available thread colors).The BottomThreadBar (
src/components/workspace/BottomThreadBar.tsx, 320 lines) renders the design'sthreadStops— the ordered list of color changes in the stitch sequence. There is no drag handler, no reorder UI, no onDragStart, no onDrop, nosetThreadStopsreordering capability. The stops are rendered instate.threadStopsorder; the user can add/remove but not reorder.A user who digitizes a design and wants to re-sequence the thread stops to optimize the stitch path cannot. They have to re-digitize, or accept the engine's order.
Where
src/components/workspace/BottomThreadBar.tsx(no drag handlers)src/components/workspace/threadLibrary.ts:189, 557-560src/pages/Home.tsx("Thread stop management" card)Suggested fix shape
Add a
reorderThreadStops(from: number, to: number)action to the workspace reducer (src/components/workspace/useWorkspace.ts) and expose it via the workspace hook. Then wire the BottomThreadBar to use it:Reducer action:
REORDER_THREAD_STOPSwith payload{ from, to }. Updatestate.threadStopsaccordingly. The history snapshot captures the reorder for undo/redo.UI in BottomThreadBar: wrap each stop in a draggable element. Use the HTML5 drag-and-drop API (or
react-dndif the codebase already has it). On drop, dispatch the reorder action.Visual affordance: a drag handle (the 6-dot icon) appears on hover. The drop indicator shows where the stop will land. The reorder animates smoothly.
Sort order persistence: the new order survives undo/redo and save-to-gallery.
Severity
Medium. A power-user feature for production embroidery, where stop order affects stitching time (the machine has to physically re-thread for each stop). The Home page promise is real but unfulfilled.
Discovered by
Gap analysis (2026-10-02) of thread stop affordances.
Related
reorderColorsinthreadLibrary.tsis the model implementation; copy the shape.cursor: grabbut no onDragStart/onDrop — visual lie; thread stop reorder in the right panel is non-functional #177Shipped as commit
81107c1onmain(#165):BottomThreadBar.tsx: each chip wrapper now renders aGripVerticaldrag handle (the only draggable element — the chip's onClick select behavior is preserved). Source wrapper dims to opacity 0.4 while dragging; a vertical accent bar appears next to the drop target, switching left/right based on cursor position vs. the wrapper midpoint.Workspace.tsx: passes anonReorderStopscallback that dispatchesREORDER_THREAD_STOPS { from, to }to the reducer. The reducer splice-moves the stop and pushes history, so undo/redo round-trip the new order.issue-165.test.tsx: 8 regression tests covering handle presence/absence, forward + backward splice math, no-op on same-chip drop, drop indicator visibility, and source wrapper opacity.Gates green:
npm run lint✓,npm test(728/728, 8 new) ✓,npm run build✓. The Home page "Thread stop management" feature card is now genuinely fulfilled — user can re-sequence the stops in place to optimize the stitch path.Note for gap-analysis: the reducer's
REORDER_THREAD_STOPSwas declared and implemented but had no dispatcher; this fix wires the dispatcher + adds the UI. The underlying splice-move + pushHistory behavior is covered byissue-92.test.ts(pre-#165).cursor: grabbut no onDragStart/onDrop — visual lie; thread stop reorder in the right panel is non-functional #177