Add optional gradient: { startColor, endColor } field to StitchPath type (#350 type layer) #393
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#393
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent-Issue: #350
Scope (type layer only — no rendering, no UI)
Add an optional
gradientfield to theStitchPathinterface insrc/components/editor/types.ts. This is the data-model prerequisite for the gradient feature (#350) and for the Swap Colors UI.Concrete change
In
src/components/editor/types.ts(around the existingthreadColor: stringfield on line 18), add:Files to touch
src/components/editor/types.ts— add the field (the one file)Acceptance
pnpm tsc --noEmit(ornpm run typecheck) exits 0.pnpm testpasses with zero new tests required (type-only change).gradientis optional, all consumers keep usingthreadColor.Out of scope (handled in sibling issues)
Reference patterns
Mirror the optional-field + back-compat comment style already used in this file for
satinWidth?(#314, lines 23-35),closed?(#209, lines 37-41),groupId?(#259, lines 42-50),locked?(#289, lines 51-69), and others. The pattern is consistent — copy it.Discovery check
Confirm before starting:
should return ONLY the existing UI-background gradients (
linear-gradient(...)in Home.tsx / Help.tsx / CanvasArea.tsx — those are CSS-only) and the new field added by this issue. No type-level or domain-levelgradientexists yet — verified 2026-10-05.Closed by commit
ab81a69on origin/main.Type-layer only — added optional
gradient?: { startColor: string; endColor: string }to the StitchPath interface in src/components/editor/types.ts. Back-compat shape matches the established pattern in this file (satinWidth #314, fillAngle/fillSpacing #373, crossStitchSize #390, etc.).Sister issues still open for the renderer layer (satinRenderer.ts / fillRenderer.ts) and EditorRightPanel.tsx UI (start/end color inputs + Swap button) per #350.
Acceptance: tsc --noEmit clean. Pre-existing baseline test failures (20 in EditorRightPanel #329/#331/#333/#334 curves) verified unrelated — same count on stashed baseline.