Editor has no way to name a path — path list shows generic 'Path 1', 'Path 2' — user with 5+ paths has to identify them by node count, which is fragile #210

Closed
opened 2026-10-04 00:00:49 +00:00 by Mark · 1 comment
Owner

Finding

src/components/editor/EditorRightPanel.tsx:142 renders the path list. Each row displays... let me check. grep -n 'p\.name\|p\.label' src/components/editor/EditorRightPanel.tsx returns 0 matches. The path rows display "Path N" where N is the array index.

A user with 5 paths:

  • "Path 1, Path 2, Path 3, Path 4, Path 5"
  • Each has 12 nodes, or 18, or 24
  • Identifying a specific path requires reading the node count

grep -n 'name:\|name =' src/components/editor/types.ts — the StitchPath type has no name field. The path is identified by id only.

Where

  • Path list display: src/components/editor/EditorRightPanel.tsx:142-180
  • StitchPath type: src/components/editor/types.ts (no name field)
  • No onRenamePath callback: grep -n 'onRenamePath\|renamePath' src/components/editor/ returns 0
  • Gallery has filename: src/components/gallery/types.ts:18 (Design has filename)

Suggested fix shape

  1. Type change: add name?: string to StitchPath. Default to "Path N" if undefined, where N is the array index + 1.

  2. UI: make the path name editable inline (double-click to rename, like the gallery's DesignCard rename):

{editingPathName ? (
  <input
    value={pathName}
    onChange={(e) => setPathName(e.target.value)}
    onBlur={() => onRenamePath(p.id, pathName.trim()) || setPathName(p.name ?? `Path ${i + 1}`)}
    onKeyDown={(e) => {
      if (e.key === 'Enter') onRenamePath(p.id, pathName.trim());
      if (e.key === 'Escape') setPathName(p.name ?? `Path ${i + 1}`);
    }}
    autoFocus
  />
) : (
  <span onDoubleClick={() => setEditingPathName(true)}>
    {p.name ?? `Path ${i + 1}`}
  </span>
)}
  1. Auto-naming on creation: when handleFinishPath creates a new path from a drawn sequence, give it a meaningful name based on the stitch type: "Satin 1", "Satin 2", "Fill 1", etc. (Next-available-N of the same stitch type). This way the user sees "Satin 3" instead of "Path 7" after drawing 7 satin paths.

  2. Status preservation: the new design saves the path names to the snapshot; loading the design restores the names.

Severity

Low. The user can use node count to identify paths. Power users with many paths name them; without naming it's a frustrating disambiguation problem.

Discovered by

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

  • #187 (open) — Editor duplicate. Duplicating a path should preserve the name (with a " (copy)" suffix).
  • #204 (open) — Editor split/merge. Splitting creates two new paths that need names.
  • #205 (open) — Editor mirror/rotate. Transforming a path could optionally rename it ("Left leaf").
## Finding `src/components/editor/EditorRightPanel.tsx:142` renders the path list. Each row displays... let me check. `grep -n 'p\.name\|p\.label' src/components/editor/EditorRightPanel.tsx` returns 0 matches. The path rows display "Path N" where N is the array index. A user with 5 paths: - "Path 1, Path 2, Path 3, Path 4, Path 5" - Each has 12 nodes, or 18, or 24 - Identifying a specific path requires reading the node count `grep -n 'name:\|name =' src/components/editor/types.ts` — the `StitchPath` type has no `name` field. The path is identified by id only. ## Where - Path list display: `src/components/editor/EditorRightPanel.tsx:142-180` - StitchPath type: `src/components/editor/types.ts` (no name field) - No onRenamePath callback: `grep -n 'onRenamePath\|renamePath' src/components/editor/` returns 0 - Gallery has filename: `src/components/gallery/types.ts:18` (Design has filename) ## Suggested fix shape 1. **Type change**: add `name?: string` to `StitchPath`. Default to "Path N" if undefined, where N is the array index + 1. 2. **UI**: make the path name editable inline (double-click to rename, like the gallery's DesignCard rename): ```tsx {editingPathName ? ( <input value={pathName} onChange={(e) => setPathName(e.target.value)} onBlur={() => onRenamePath(p.id, pathName.trim()) || setPathName(p.name ?? `Path ${i + 1}`)} onKeyDown={(e) => { if (e.key === 'Enter') onRenamePath(p.id, pathName.trim()); if (e.key === 'Escape') setPathName(p.name ?? `Path ${i + 1}`); }} autoFocus /> ) : ( <span onDoubleClick={() => setEditingPathName(true)}> {p.name ?? `Path ${i + 1}`} </span> )} ``` 3. **Auto-naming on creation**: when `handleFinishPath` creates a new path from a drawn sequence, give it a meaningful name based on the stitch type: "Satin 1", "Satin 2", "Fill 1", etc. (Next-available-N of the same stitch type). This way the user sees "Satin 3" instead of "Path 7" after drawing 7 satin paths. 4. **Status preservation**: the new design saves the path names to the snapshot; loading the design restores the names. ## Severity Low. The user can use node count to identify paths. Power users with many paths name them; without naming it's a frustrating disambiguation problem. ## Discovered by Gap analysis (2026-10-02) of editor path identification. ## Related - #187 (open) — Editor duplicate. Duplicating a path should preserve the name (with a " (copy)" suffix). - #204 (open) — Editor split/merge. Splitting creates two new paths that need names. - #205 (open) — Editor mirror/rotate. Transforming a path could optionally rename it ("Left leaf").
Mark closed this issue 2026-10-04 03:40:34 +00:00
Author
Owner

Shipped in cf9bdaa (fix(#210): Editor inline path-name rename + stitch-type auto-name).

What landed:

  • Inline rename in the editor Paths section — double-click the label or click the hover-only pencil icon to enter edit mode (Enter/blur commits, Escape reverts, empty/whitespace-only commits rejected). Mirrors the gallery DesignCard pattern.
  • Auto-name by stitch type on path creation — "Satin 1", "Fill 1" etc. via next-available-N per type. Renamed paths keep their slot; falls back to "Path N" when stitch type is empty.

Local gates green (tsc, lint, 1023 tests pass incl. 22 new for #210, build). CI run 7482 is in waiting state — self-hosted runner queue is backed up with prior cancelled runs; the runner is a substrate issue, not a code issue.

Shipped in cf9bdaa (fix(#210): Editor inline path-name rename + stitch-type auto-name). What landed: - Inline rename in the editor Paths section — double-click the label or click the hover-only pencil icon to enter edit mode (Enter/blur commits, Escape reverts, empty/whitespace-only commits rejected). Mirrors the gallery DesignCard pattern. - Auto-name by stitch type on path creation — "Satin 1", "Fill 1" etc. via next-available-N per type. Renamed paths keep their slot; falls back to "Path N" when stitch type is empty. Local gates green (tsc, lint, 1023 tests pass incl. 22 new for #210, build). CI run 7482 is in waiting state — self-hosted runner queue is backed up with prior cancelled runs; the runner is a substrate issue, not a code issue.
Sign in to join this conversation.
No description provided.