Editor's Path Properties has 'Stitch type' but no 'recommended stitch type' for the path's geometry — user with a 2-node line gets a 'Satin' option (which is unusual for a line) #385

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

Finding"

grep -rn 'recommendedStitch\|suggestStitch' src/components/editor/ returns 0. The editor doesn't suggest a stitch type based on the path's geometry.

This is similar to #354 but more general.

A user with a 2-node line:

  • The dropdown shows all 5 types
  • "Satin" is unusual for a line (satin is for narrow columns)
  • The user might pick "Satin" by mistake

The fix is a "recommended" indicator.

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • No recommendation: grep -rn 'recommendedStitch' src/components/editor/ returns 0

Suggested fix shape

  1. Algorithm: a function that recommends a stitch type based on the path's geometry:
function recommendStitchType(path: StitchPath): UserFacingStitchType {
  if (path.nodes.length === 2) return 'running';
  if (path.isClosed) {
    const bbox = pathBoundingBox(path.nodes);
    if (bbox.width < 5 && bbox.height < 5) return 'satin';
    if (bbox.width > 5 && bbox.height > 5) return 'fill';
  }
  return 'satin';  // default
}
  1. UI: a small "Recommended: Satin" hint above the dropdown:
{recommended && recommended !== p.stitchType && (
  <p className="text-[10px]" style={{ color: '#E6A948' }}>
    💡 Recommended: {STITCH_LABELS[recommended]} for this path's geometry
  </p>
)}
  1. Auto-apply: a button to apply the recommendation.

  2. Use cases:

  • New users picking stitch types
  • Power users wanting quick recommendations

Severity**

Low. The user can experiment. New users notice.

Discovered by

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

  • #354 (open) — Recommended stitch type in dropdown. Same family.
  • #326 (open) — Node count goal. Same guidance family.
  • Figma's "Smart selection" is the parallel.
## Finding" `grep -rn 'recommendedStitch\|suggestStitch' src/components/editor/` returns 0. The editor doesn't suggest a stitch type based on the path's geometry. This is similar to #354 but more general. A user with a 2-node line: - The dropdown shows all 5 types - "Satin" is unusual for a line (satin is for narrow columns) - The user might pick "Satin" by mistake The fix is a "recommended" indicator. ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - No recommendation: `grep -rn 'recommendedStitch' src/components/editor/` returns 0 ## Suggested fix shape 1. **Algorithm**: a function that recommends a stitch type based on the path's geometry: ```ts function recommendStitchType(path: StitchPath): UserFacingStitchType { if (path.nodes.length === 2) return 'running'; if (path.isClosed) { const bbox = pathBoundingBox(path.nodes); if (bbox.width < 5 && bbox.height < 5) return 'satin'; if (bbox.width > 5 && bbox.height > 5) return 'fill'; } return 'satin'; // default } ``` 2. **UI**: a small "Recommended: Satin" hint above the dropdown: ```tsx {recommended && recommended !== p.stitchType && ( <p className="text-[10px]" style={{ color: '#E6A948' }}> 💡 Recommended: {STITCH_LABELS[recommended]} for this path's geometry </p> )} ``` 3. **Auto-apply**: a button to apply the recommendation. 4. **Use cases**: - New users picking stitch types - Power users wanting quick recommendations ## Severity** Low. The user can experiment. New users notice. ## Discovered by Gap analysis (2026-10-02) of editor path properties. ## Related** - #354 (open) — Recommended stitch type in dropdown. Same family. - #326 (open) — Node count goal. Same guidance family. - Figma's "Smart selection" is the parallel.
Author
Owner

Stale duplicate — resolved by #354.

The premise of this issue (grep -rn 'recommendedStitch\|suggestStitch' src/components/editor/ returns 0, the dropdown shows all 5 types, no recommendation) was addressed by commit 668f1d8 on origin/main (merged 2026-10-05):

  • recommendedStitchTypes(path) helper in EditorRightPanel.tsx (lines 7233-7258) — path-based algorithm covering 2-node lines (→ running), closed ≥3-node shapes (→ fill), ≥4-node polylines (→ satin); cross-stitch and zigzag always available.
  • Dropdown reorders recommended types first with a ★ (recommended) suffix on the option label (lines 4966-4992).
  • Inline advisory below the select when the current pick is non-recommended for the path's geometry (lines 5068-5102), driven by stitchTypeAdvisory(path) — the 'Satin is unusual for a 2-node line' case is the canonical example (stitchTypeAdvisory, line 7292).
  • 16 unit tests in src/components/editor/issue-354.test.tsx all pass.

This issue's suggested fix shape (a single recommendStitchType returning one type) is a subset of what #354 shipped (ordered recommended subset + advisory). Closing as resolved by #354 — no further work needed.

— triage-runner, work t_bb00c42b

Stale duplicate — resolved by #354. The premise of this issue (`grep -rn 'recommendedStitch\|suggestStitch' src/components/editor/` returns 0, the dropdown shows all 5 types, no recommendation) was addressed by commit `668f1d8` on `origin/main` (merged 2026-10-05): - `recommendedStitchTypes(path)` helper in `EditorRightPanel.tsx` (lines 7233-7258) — path-based algorithm covering 2-node lines (→ running), closed ≥3-node shapes (→ fill), ≥4-node polylines (→ satin); cross-stitch and zigzag always available. - Dropdown reorders recommended types first with a `★ (recommended)` suffix on the option label (lines 4966-4992). - Inline advisory below the select when the current pick is non-recommended for the path's geometry (lines 5068-5102), driven by `stitchTypeAdvisory(path)` — the 'Satin is unusual for a 2-node line' case is the canonical example (`stitchTypeAdvisory`, line 7292). - 16 unit tests in `src/components/editor/issue-354.test.tsx` all pass. This issue's suggested fix shape (a single `recommendStitchType` returning one type) is a subset of what #354 shipped (ordered recommended subset + advisory). Closing as resolved by #354 — no further work needed. — triage-runner, work t_bb00c42b
Mark closed this issue 2026-10-05 18:54:47 +00:00
Sign in to join this conversation.
No description provided.