Editor has no default-stitch-type setting — workspace has color simplification + thread library settings, but no setting to set the default stitch type for new paths #198
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#198
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?
Finding
src/components/workspace/SettingsModal.tsxrenders two settings sections:ColorSimplificationSection(color count target, similarity threshold, etc.)ThreadLibrarySection(CRUD for the user's thread library)It does NOT render a "Default Stitch Type" or "Default Path Density" section. A new path drawn in the Editor starts with
stitchType: 'satin'(persrc/components/editor/constants.ts:57); the user can change it in the right panel after drawing, but the default is hard-coded.grep -n 'defaultStitch\|stitchType.*default' src/components/editor/returns 0 hits.A user who designs 10 paths and wants them all to be fill (not satin) has to:
Or use the bulk select after #188 lands.
Where
src/components/workspace/SettingsModal.tsx(2 sections)grep -n 'Default Stitch' src/components/workspace/SettingsModal.tsxreturns 0 hitssrc/components/editor/constants.ts:57(stitchType: 'satin')src/components/workspace/types.ts:208(could host adefaultStitchTypefield)Suggested fix shape
Add a "Path Defaults" section to the Settings modal:
The settings persist in localStorage (the Settings modal already uses
useLocalStorage). The Editor'shandleFinishPathreads the default from localStorage when creating a new path.Severity
Low. The user can change per-path. Power users with many paths of the same type notice.
Discovered by
Gap analysis (2026-10-02) of editor defaults.
Related
Shipped via commit
b556049(fix(#198): Editor Path Defaults). Closing summary:src/components/workspace/pathDefaults.ts— versioned localStorage layer (tc_path_defaults_v1) with ausePathDefaults()hook (cross-tabstorageevent sync, mirrors theuseThreadLibrarypattern from #126). Sanitize step clamps density to [0.1, 1.0] and rejects any stitch type that isn't in the editor's user-facing dropdown, so a hand-edited localStorage blob can't leave the Settings select showing a missing<option>.src/components/workspace/PathDefaultsSection.tsx— collapsible section matching the existing Thread Library / Color Simplification pattern.<select>for default stitch type (5 user-facing options: satin, fill, running, cross-stitch, zigzag) + the editor's same<Slider>for default density (0.1..1.0, step 0.05).SettingsModalrenders the new section as a third collapsible in the existing top-level border (default-open, like the other two).Editor.tsxhandleFinishPathnow readspathDefaults.defaultStitchTypeandpathDefaults.defaultDensityfrom the hook instead of the hard-coded'satin'/0.4. Dep array updated to includepathDefaultsso a Settings-modal change propagates on the next drawn path.Tests: 17 in
pathDefaults.test.ts(load/save/sanitize/clamp/cross-tab sync) + 4 new inSettingsModal.test.tsx(section renders with in-code baseline, edits persist, persisted defaults reload, malformed payloads sanitize). Full vitest run: 551 passed in workspace + pages after rebase; the 3 pre-existingEditorCanvas (#170)snap-drag failures are unrelated.tsc -bclean, eslint clean.A power user who designs 10 fill paths can now flip the default once in Settings instead of editing each path in the right panel — and the right-panel per-path controls still override per-path, so existing designs and workflows are unaffected.