Editor's Path Properties section has no 'auto-fix' button that runs all validations and suggests fixes — user with 5 validation warnings (sharp corner, self-intersection, etc.) has to fix each one separately, no batch validation #345

Open
opened 2026-10-04 03:55:22 +00:00 by Mark · 0 comments
Owner

Finding

grep -rn 'autoFix\|fixAll\|validateAndFix' src/components/editor/ returns 0. The editor has no batch validation/fix.

The validations filed (or in this turn) are:

  • #260 hoop size mismatch
  • #335 sharp corner
  • #336 self-intersection
  • #337 overlap
  • #343 min path length
  • #344 min curve radius

Each is a separate warning. The user has to:

  • See the warning
  • Read it
  • Manually fix

The fix is a single "Validate and auto-fix" button that runs all checks and offers fixes.

Where

  • Right panel: src/components/editor/EditorRightPanel.tsx
  • No batch validate: grep -rn 'autoFix' src/components/editor/ returns 0
  • The validations: spread across the editor

Suggested fix shape

  1. UI: a "Validate" button in the right panel's header (or as a section):
<button onClick={onValidate} data-testid="validate-design">
  <CheckCircle size={12} /> Validate
</button>
  1. Modal: a modal showing all validation issues:
{showValidation && (
  <Modal>
    <h2>Design validation</h2>
    <ul>
      <li>⚠ Sharp corner at node 7 of "Path 1" — angle: 12°</li>
      <li>⚠ Self-intersection at midpoint of "Path 1"</li>
      <li>⚠ "Path 4" extends 2mm beyond the hoop</li>
      <li>✓ No overlaps</li>
      <li>✓ All paths above minimum length</li>
    </ul>
    <button onClick={onAutoFix}>Auto-fix all (where possible)</button>
  </Modal>
)}
  1. Auto-fix options:
  • Sharp corner: smooth the node
  • Self-intersection: split the path
  • Overlap: none (manual fix)
  • Min length: merge with adjacent path
  1. Status: the editor's status bar shows "5 issues found" (per #262's status indicator).

  2. Use cases:

  • Before exporting (catch issues early)
  • After auto-digitize (clean up the output)
  • After importing an SVG (the source may have issues)

Severity

Medium. The user can run each validation separately, but the batch is the polish.

Discovered by

Gap analysis (2026-10-02) of editor validation.

  • #260 (open) — Hoop size mismatch. One of the validations.
  • #335 (open) — Sharp corner. Another.
  • #336 (open) — Self-intersection. Another.
  • #337 (open) — Overlap. Another.
  • #343 (open) — Min path length. Another.
  • #344 (open) — Min curve radius. Another.
  • Wilcom/Hatch have "Object > Validate" with a list of issues. Standard.
## Finding `grep -rn 'autoFix\|fixAll\|validateAndFix' src/components/editor/` returns 0. The editor has no batch validation/fix. The validations filed (or in this turn) are: - #260 hoop size mismatch - #335 sharp corner - #336 self-intersection - #337 overlap - #343 min path length - #344 min curve radius Each is a separate warning. The user has to: - See the warning - Read it - Manually fix The fix is a single "Validate and auto-fix" button that runs all checks and offers fixes. ## Where - Right panel: `src/components/editor/EditorRightPanel.tsx` - No batch validate: `grep -rn 'autoFix' src/components/editor/` returns 0 - The validations: spread across the editor ## Suggested fix shape 1. **UI**: a "Validate" button in the right panel's header (or as a section): ```tsx <button onClick={onValidate} data-testid="validate-design"> <CheckCircle size={12} /> Validate </button> ``` 2. **Modal**: a modal showing all validation issues: ```tsx {showValidation && ( <Modal> <h2>Design validation</h2> <ul> <li>⚠ Sharp corner at node 7 of "Path 1" — angle: 12°</li> <li>⚠ Self-intersection at midpoint of "Path 1"</li> <li>⚠ "Path 4" extends 2mm beyond the hoop</li> <li>✓ No overlaps</li> <li>✓ All paths above minimum length</li> </ul> <button onClick={onAutoFix}>Auto-fix all (where possible)</button> </Modal> )} ``` 3. **Auto-fix options**: - Sharp corner: smooth the node - Self-intersection: split the path - Overlap: none (manual fix) - Min length: merge with adjacent path 4. **Status**: the editor's status bar shows "5 issues found" (per #262's status indicator). 5. **Use cases**: - Before exporting (catch issues early) - After auto-digitize (clean up the output) - After importing an SVG (the source may have issues) ## Severity Medium. The user can run each validation separately, but the batch is the polish. ## Discovered by Gap analysis (2026-10-02) of editor validation. ## Related - #260 (open) — Hoop size mismatch. One of the validations. - #335 (open) — Sharp corner. Another. - #336 (open) — Self-intersection. Another. - #337 (open) — Overlap. Another. - #343 (open) — Min path length. Another. - #344 (open) — Min curve radius. Another. - Wilcom/Hatch have "Object > Validate" with a list of issues. Standard.
Sign in to join this conversation.
No description provided.