Editor has no 'underlay' settings per path — underlay is a critical embroidery parameter (the base layer of stitches that stabilizes the main stitches), but the editor doesn't expose it #319

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

Finding

grep -rn 'underlay\b' src/components/editor/ returns 0. The editor has no underlay.

Underlay: a base layer of stitches laid down before the main satin/fill stitches. It stabilizes the fabric and prevents the main stitches from sinking in. Typical types: center-walk, edge-walk, zigzag.

The export service (per easystitch-client.ts) likely takes underlay as a parameter, but the editor doesn't expose it.

A user designing a logo:

  • Knows the design needs an edge-walk underlay for stability
  • Wants to set it on the satin columns
  • Currently: no way; the export will use a default (or no underlay)

The fix is an underlay selector per path.

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • No underlay: grep -rn 'underlay' src/components/editor/ returns 0
  • The export: src/lib/easystitch-client.ts:exportPES (might have underlay)

Suggested fix shape

  1. Type: add underlay: { type: 'none' | 'center-walk' | 'edge-walk' | 'zigzag'; density: number } to the StitchPath type.

  2. UI: in the Path Properties section, a "Underlay" sub-section:

<SelectField
  label="Underlay type"
  value={p.underlay?.type ?? 'none'}
  options={[
    { value: 'none', label: 'None' },
    { value: 'center-walk', label: 'Center walk' },
    { value: 'edge-walk', label: 'Edge walk' },
    { value: 'zigzag', label: 'Zigzag' },
  ]}
  onChange={(v) => onUpdateUnderlay(p.id, v)}
/>
{p.underlay?.type !== 'none' && (
  <SliderField
    label="Underlay density"
    value={p.underlay.density}
    onChange={(v) => onUpdateUnderlayDensity(p.id, v)}
    min={0.1}
    max={1.0}
    step={0.05}
  />
)}
  1. Render: in the canvas, the underlay stitches are drawn faintly (e.g., at 30% opacity) to show the user what they look like.

  2. Default: 'none' (no underlay). The Path Defaults section (per #198) can have a default.

Severity

Medium. Underlay is a critical parameter for production embroidery. Power users notice.

Discovered by

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

  • #314 (open) — Satin width. Same embroidery-specific parameters.
  • #318 (open) — Pull compensation. Same.
  • The PathDefaultsSection (per #198) is where the default lives.
  • Wilcom/Hatch have underlay; the editor's gap is the parity.
## Finding `grep -rn 'underlay\b' src/components/editor/` returns 0. The editor has no underlay. Underlay: a base layer of stitches laid down before the main satin/fill stitches. It stabilizes the fabric and prevents the main stitches from sinking in. Typical types: center-walk, edge-walk, zigzag. The export service (per `easystitch-client.ts`) likely takes underlay as a parameter, but the editor doesn't expose it. A user designing a logo: - Knows the design needs an edge-walk underlay for stability - Wants to set it on the satin columns - Currently: no way; the export will use a default (or no underlay) The fix is an underlay selector per path. ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - No underlay: `grep -rn 'underlay' src/components/editor/` returns 0 - The export: `src/lib/easystitch-client.ts:exportPES` (might have underlay) ## Suggested fix shape 1. **Type**: add `underlay: { type: 'none' | 'center-walk' | 'edge-walk' | 'zigzag'; density: number }` to the StitchPath type. 2. **UI**: in the Path Properties section, a "Underlay" sub-section: ```tsx <SelectField label="Underlay type" value={p.underlay?.type ?? 'none'} options={[ { value: 'none', label: 'None' }, { value: 'center-walk', label: 'Center walk' }, { value: 'edge-walk', label: 'Edge walk' }, { value: 'zigzag', label: 'Zigzag' }, ]} onChange={(v) => onUpdateUnderlay(p.id, v)} /> {p.underlay?.type !== 'none' && ( <SliderField label="Underlay density" value={p.underlay.density} onChange={(v) => onUpdateUnderlayDensity(p.id, v)} min={0.1} max={1.0} step={0.05} /> )} ``` 3. **Render**: in the canvas, the underlay stitches are drawn faintly (e.g., at 30% opacity) to show the user what they look like. 4. **Default**: 'none' (no underlay). The Path Defaults section (per #198) can have a default. ## Severity Medium. Underlay is a critical parameter for production embroidery. Power users notice. ## Discovered by Gap analysis (2026-10-02) of editor path properties. ## Related - #314 (open) — Satin width. Same embroidery-specific parameters. - #318 (open) — Pull compensation. Same. - The PathDefaultsSection (per #198) is where the default lives. - Wilcom/Hatch have underlay; the editor's gap is the parity.
Author
Owner

Underlay per-path controls shipped to main:

  • 39d71dd — fix(#318): editor pull-compensation input — right-panel mm offset per path — adds the right-panel Underlay sub-section with onUpdateSelectedPathUnderlay / onCommitSelectedPathUnderlay / onApplyToAllPathsUnderlay props, the four UnderlayConfig.type values (center_walk / edge_run / zigzag / custom), enable switch + density slider + apply-to-all bulk stamp. Editor.tsx wires the handlers through the stitchPath store. UnderlayConfig is added to StitchPath (optional, defaults disabled for back-compat with persisted designs predating this issue).
  • 5d8bbd1 — test(#319): lock down editor underlay controls — panel rendering + Editor wiring — 14 panel tests + Editor.tsx wiring test pinning the contract.

Verified on origin/main via git show origin/main:src/components/editor/EditorRightPanel.tsx (lines 17, 100-117, 551-556, 3393-3412) and the test file at src/components/editor/issue-319.test.tsx.

The pre-sweep push had been blocked on a non-FF (! [rejected] main -> main (fetch first)) which also blocked the close; triage-runner retried the push after a git fetch && git pull --rebase, the commits are now on main, and closing the issue now.

Underlay per-path controls shipped to main: - `39d71dd` — `fix(#318): editor pull-compensation input — right-panel mm offset per path` — adds the right-panel Underlay sub-section with `onUpdateSelectedPathUnderlay` / `onCommitSelectedPathUnderlay` / `onApplyToAllPathsUnderlay` props, the four `UnderlayConfig.type` values (center_walk / edge_run / zigzag / custom), enable switch + density slider + apply-to-all bulk stamp. Editor.tsx wires the handlers through the stitchPath store. `UnderlayConfig` is added to `StitchPath` (optional, defaults disabled for back-compat with persisted designs predating this issue). - `5d8bbd1` — `test(#319): lock down editor underlay controls — panel rendering + Editor wiring` — 14 panel tests + Editor.tsx wiring test pinning the contract. Verified on origin/main via `git show origin/main:src/components/editor/EditorRightPanel.tsx` (lines 17, 100-117, 551-556, 3393-3412) and the test file at `src/components/editor/issue-319.test.tsx`. The pre-sweep push had been blocked on a non-FF (`! [rejected] main -> main (fetch first)`) which also blocked the close; triage-runner retried the push after a `git fetch && git pull --rebase`, the commits are now on main, and closing the issue now.
Mark closed this issue 2026-10-05 00:47:15 +00:00
Sign in to join this conversation.
No description provided.