Editor has no multi-path selection — selectedPathId is string | null not Set<string>, so the user can only ever edit one path at a time even with 5+ paths in a design #188

Closed
opened 2026-10-03 23:46:39 +00:00 by Mark · 0 comments
Owner

Finding

src/components/editor/EditorRightPanel.tsx:14 declares selectedPathId: string | null (single id, nullable). Every consumer in the right panel operates on a single selected path (e.g., the "Path Properties" section at line 277 renders one path's data; the "Path List" at line 142 highlights one selected path).

A user with a design containing 5 paths can't:

  • Move 3 paths to a different thread color at once
  • Apply the same density to all satin paths in one action
  • Hide/show 4 paths at once
  • Delete 2 paths without undoing and redoing

Each operation requires selecting one path, doing the change, selecting the next path, doing the change, etc. The Editor's "multi-select" affordance doesn't exist at the path level.

The Workspace's stitchObjects: StitchObject[] has multi-select (the context menu's Bring to Front / Send to Back operates on a multi-selection, and the right panel's Object List renders one card per object). The Editor's paths: StitchPath[] does not have a parallel affordance.

Where

  • Single selection: src/components/editor/EditorRightPanel.tsx:14 (selectedPathId: string | null)
  • Type: src/components/editor/types.ts (verify selectedPathId is single-string)
  • Workspace contrast: src/components/workspace/types.ts:25 has selectedIds: string[] (multi)
  • No multi-select reducer: grep -n 'SELECT_PATHS\|TOGGLE_PATH_SELECTION' src/components/editor/ returns 0 hits

Suggested fix shape

  1. Type change: rename selectedPathId: string | null to selectedPathIds: string[] (array), or add a parallel selectedPathIds for multi-select while keeping selectedPathId for the "primary" path whose properties are shown.

  2. Reducer: add TOGGLE_PATH_SELECTION (adds/removes an id from the array) and CLEAR_PATH_SELECTION actions.

  3. UI affordances:

    • Click a path in the right panel's path list: select it (Ctrl+click to add, Shift+click for range).
    • Path operations (color, density, stitch type, visibility, delete) apply to all selected paths.
    • "Stitch Type" and "Density" controls in the right panel show "Mixed" when the selection has different values, and a "Apply to all" button.
  4. Backwards compatibility: the "primary path" stays selectedPathId (the first in the array, or the one that was last clicked without modifier). The right panel renders the primary path's properties.

Severity

Medium. Power users with multi-path designs feel the friction immediately. New users don't notice.

Discovered by

Gap analysis (2026-10-02) of editor selection model.

  • #170 (closed) — Editor snap toggles. Snap works on a per-node basis; multi-path selection is a parallel affordance.
  • The Workspace's selectedIds: string[] is the model to mirror.
## Finding `src/components/editor/EditorRightPanel.tsx:14` declares `selectedPathId: string | null` (single id, nullable). Every consumer in the right panel operates on a single selected path (e.g., the "Path Properties" section at line 277 renders one path's data; the "Path List" at line 142 highlights one selected path). A user with a design containing 5 paths can't: - Move 3 paths to a different thread color at once - Apply the same density to all satin paths in one action - Hide/show 4 paths at once - Delete 2 paths without undoing and redoing Each operation requires selecting one path, doing the change, selecting the next path, doing the change, etc. The Editor's "multi-select" affordance doesn't exist at the path level. The Workspace's `stitchObjects: StitchObject[]` has multi-select (the context menu's Bring to Front / Send to Back operates on a multi-selection, and the right panel's Object List renders one card per object). The Editor's `paths: StitchPath[]` does not have a parallel affordance. ## Where - Single selection: `src/components/editor/EditorRightPanel.tsx:14` (`selectedPathId: string | null`) - Type: `src/components/editor/types.ts` (verify `selectedPathId` is single-string) - Workspace contrast: `src/components/workspace/types.ts:25` has `selectedIds: string[]` (multi) - No multi-select reducer: `grep -n 'SELECT_PATHS\|TOGGLE_PATH_SELECTION' src/components/editor/` returns 0 hits ## Suggested fix shape 1. **Type change**: rename `selectedPathId: string | null` to `selectedPathIds: string[]` (array), or add a parallel `selectedPathIds` for multi-select while keeping `selectedPathId` for the "primary" path whose properties are shown. 2. **Reducer**: add `TOGGLE_PATH_SELECTION` (adds/removes an id from the array) and `CLEAR_PATH_SELECTION` actions. 3. **UI affordances**: - Click a path in the right panel's path list: select it (Ctrl+click to add, Shift+click for range). - Path operations (color, density, stitch type, visibility, delete) apply to all selected paths. - "Stitch Type" and "Density" controls in the right panel show "Mixed" when the selection has different values, and a "Apply to all" button. 4. **Backwards compatibility**: the "primary path" stays `selectedPathId` (the first in the array, or the one that was last clicked without modifier). The right panel renders the primary path's properties. ## Severity Medium. Power users with multi-path designs feel the friction immediately. New users don't notice. ## Discovered by Gap analysis (2026-10-02) of editor selection model. ## Related - #170 (closed) — Editor snap toggles. Snap works on a per-node basis; multi-path selection is a parallel affordance. - The Workspace's `selectedIds: string[]` is the model to mirror.
Sign in to join this conversation.
No description provided.