Editor has no 'reverse path direction' operation — user with a path drawn right-to-left who wants it left-to-right (e.g., for stitch direction) has to redraw or no documented way to reverse #316

Closed
opened 2026-10-04 03:51:07 +00:00 by Mark · 1 comment
Owner

Finding

grep -rn 'reversePath\|onReverse' src/components/editor/ returns 0. The editor has no reverse operation.

A user with a path:

  • Drawn from (0,0) to (100, 100)
  • Wants to reverse it: from (100, 100) to (0, 0)
  • Currently: has to redraw (or manually reverse the node order)
  • Time-consuming

The fix is a "Reverse path" button.

Where

  • Path operations: src/components/editor/EditorRightPanel.tsx (per-row actions)
  • No reverse: grep -rn 'reversePath' src/components/editor/ returns 0

Suggested fix shape

  1. Algorithm: nodes.reverse() in the editor's state.

  2. UI: a "Reverse" button in the right panel's Path Properties section:

<button onClick={onReverse} data-testid="reverse-path" title="Reverse the direction of the path">
  <ArrowRightLeft size={12} /> Reverse
</button>
  1. EditorContextMenu (per #191): add the same item.

  2. Use cases:

  • Satin stitch direction (some threads look better in a specific direction)
  • Fill stitch direction (fill stitches have a grain; reversing can change the look)
  • Animation direction (the playback goes from start to end; reversing changes the visual)
  1. History: single undoable action.

Severity

Low. The user can redraw. Power users notice.

Discovered by

Gap analysis (2026-10-02) of editor path operations.

  • The path operations family: split, merge, mirror, reverse, close, etc.
  • #290 (open) — Bring to front. Same "modify the path" family.
  • Figma/Illustrator have "Reverse Path" in the menu. Standard.
## Finding `grep -rn 'reversePath\|onReverse' src/components/editor/` returns 0. The editor has no reverse operation. A user with a path: - Drawn from (0,0) to (100, 100) - Wants to reverse it: from (100, 100) to (0, 0) - Currently: has to redraw (or manually reverse the node order) - Time-consuming The fix is a "Reverse path" button. ## Where - Path operations: `src/components/editor/EditorRightPanel.tsx` (per-row actions) - No reverse: `grep -rn 'reversePath' src/components/editor/` returns 0 ## Suggested fix shape 1. **Algorithm**: `nodes.reverse()` in the editor's state. 2. **UI**: a "Reverse" button in the right panel's Path Properties section: ```tsx <button onClick={onReverse} data-testid="reverse-path" title="Reverse the direction of the path"> <ArrowRightLeft size={12} /> Reverse </button> ``` 3. **EditorContextMenu** (per #191): add the same item. 4. **Use cases**: - Satin stitch direction (some threads look better in a specific direction) - Fill stitch direction (fill stitches have a grain; reversing can change the look) - Animation direction (the playback goes from start to end; reversing changes the visual) 5. **History**: single undoable action. ## Severity Low. The user can redraw. Power users notice. ## Discovered by Gap analysis (2026-10-02) of editor path operations. ## Related - The path operations family: split, merge, mirror, reverse, close, etc. - #290 (open) — Bring to front. Same "modify the path" family. - Figma/Illustrator have "Reverse Path" in the menu. Standard.
Author
Owner

Closed by triage-runner: kilo-gsd.py landed the fix on main (push succeeded), but the run's own close call was rejected by Forgejo. Verifying here:

  • f4b6f2a — Add 'Reverse Path' item to editor right-click menu (EditorContextMenu + Editor.tsx + EditorCanvas, 6 new tests)
  • 7cd6dad — Apply changes from kilo-gsd.py run for Mark/Kimi_Agent_Brother_10_Digitizing_App#316 (also adds src/pages/issue-316.test.tsx with 280 lines of coverage)

Both commits present on origin/main. Closing.

Closed by triage-runner: kilo-gsd.py landed the fix on `main` (push succeeded), but the run's own close call was rejected by Forgejo. Verifying here: - `f4b6f2a` — Add 'Reverse Path' item to editor right-click menu (EditorContextMenu + Editor.tsx + EditorCanvas, 6 new tests) - `7cd6dad` — Apply changes from kilo-gsd.py run for Mark/Kimi_Agent_Brother_10_Digitizing_App#316 (also adds `src/pages/issue-316.test.tsx` with 280 lines of coverage) Both commits present on `origin/main`. Closing.
Mark closed this issue 2026-10-05 00:45:09 +00:00
Sign in to join this conversation.
No description provided.