[MOVED] Support SVG gradient and pattern fills in digitize #39

Closed
opened 2026-07-24 23:46:58 +00:00 by Mark · 3 comments
Owner

Feature — Support SVG gradient and pattern fills in digitize pipeline

Expected behavior: Gradients/patterns should produce stitched output or clear 422 (not 500 crash).

Current behavior: Backend crashes with HTTP 500 on url(#...) fill references.

Acceptance:

  1. 2+ stop gradients produce reasonable stitch approximation
  2. Pattern fills tile as filled regions
  3. No 500 crash for any valid SVG
  4. If unsupported, return 422 with clear message (never 500)

Approach: Browser-side gradient flattening (sample N stops, replace with banded solid fills) or canvas rasterize+trace.

## Feature — Support SVG gradient and pattern fills in digitize pipeline **Expected behavior**: Gradients/patterns should produce stitched output or clear 422 (not 500 crash). **Current behavior**: Backend crashes with HTTP 500 on `url(#...)` fill references. **Acceptance**: 1. 2+ stop gradients produce reasonable stitch approximation 2. Pattern fills tile as filled regions 3. No 500 crash for any valid SVG 4. If unsupported, return 422 with clear message (never 500) **Approach**: Browser-side gradient flattening (sample N stops, replace with banded solid fills) or canvas rasterize+trace.
Author
Owner

Reopened by QA verification t_60438e89 — fix was never actually implemented. The fixit task was prematurely marked done when kilo-gsd only started (Phase 1/9 Research); no fix commits exist. See issue #41 for the earlier report of this problem.

Reopened by QA verification t_60438e89 — fix was never actually implemented. The fixit task was prematurely marked done when kilo-gsd only started (Phase 1/9 Research); no fix commits exist. See issue #41 for the earlier report of this problem.
Mark 2026-07-25 01:58:46 +00:00
  • closed this issue
  • added the
    bug
    label
Mark 2026-07-25 16:26:10 +00:00
Author
Owner

The fix that landed (e729900) rejected SVGs with gradient/pattern fills before they reached the service. Reverted in 26cd733. The correct fix is to flatten gradients to approximate solid colors or handle them gracefully — not blocking them. Also: no 500 crash, ever.

The fix that landed (e729900) rejected SVGs with gradient/pattern fills before they reached the service. Reverted in 26cd733. The correct fix is to flatten gradients to approximate solid colors or handle them gracefully — not blocking them. Also: no 500 crash, ever.
Author
Owner

This was filed on the wrong repo. The fix belongs in the engine (Mark/easystitch). Migrated to Mark/easystitch#96.

This was filed on the wrong repo. The fix belongs in the engine (Mark/easystitch). Migrated to Mark/easystitch#96.
Mark changed title from SVG gradient/pattern fills crash the service with HTTP 500 to [MOVED] Support SVG gradient and pattern fills in digitize 2026-07-25 17:09:16 +00:00
Mark closed this issue 2026-07-25 17:09:16 +00:00
Sign in to join this conversation.
No description provided.