Stitch preference detail 422s /v1/digitize — front-end UI value not in back-end accepted literal set #116
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#116
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?
Bug: Selecting Stitch Preference "detail" in the Auto-Digitize panel returns 422 from easystitch-service
Reproduction (verified 2026-09-25)
detailbutton in the Stitch Preference toggle group.Expected
Either the value
detailis sent and accepted by the service, or the front-end translates it to a value the service accepts before sending.Actual
Service returns
422 Unprocessable Entity. Body:Verified by direct API call:
Root cause
src/components/workspace/RightPanel.tsx:156): presentsbalanced/detail/speedsrc/lib/digitize-adapters.ts:234-238): identity function, passes UI value through unchangedeasystitch-serviceDigitizeSettingsPydantic model): acceptsbalanced/quality/speedThe front-end's
detailis not in the back-end's accepted literal set. No translation exists.Recommended fix
Pick one of:
Option A — rename the UI option (preferred if "quality" is a better user-facing term): change
RightPanel.tsx:156to renderqualityinstead ofdetail. UpdateStitchPreferencetype if needed. Identity mapper becomes correct.Option B — translate in the mapper: change
mapStitchPreference()to return'quality'when input is'detail'. Keeps the UI label unchanged.Either way, add a unit test that calls
toServiceSettings()withstitchPreference: 'detail'and asserts the returned object hasstitchPreference: 'quality'(option B) or'detail'after the type rename (option A).Add a Playwright regression that picks
detailin the UI and asserts the response is not 422.Severity
High. Picking the second-most-likely option in the panel causes a hard error. The user has no idea why.
Labels
Filed 2026-09-25 by user-driven bughunt session. Supersedes umbrella #115.
body.detail#118Fixed by
2b2f630onMark/Kimi_Agent_Brother_10_Digitizing_App(
fix(#115): auto-digitize settings wiring — stitch pref translation, underlay wire field, 422 detail surfaced).The bug is the Option B fix from the issue body:
mapStitchPreference()insrc/lib/digitize-adapters.tsnow translates UI'detail'→ service'quality'before sending to/v1/digitize. The back-endMark/easystitch-serviceDigitizeSettings.stitch_preferenceLiteralalready accepted
balanced / quality / speed— no schema change wasneeded there.
Verification:
src/lib/digitize-adapters.test.ts→ 19/19 pass, including thenew regression test:
translates 'detail' UI preference to service 'quality' literal (#115)(calls
toServiceSettings({ stitchPreference: 'detail' })and assertsthe returned object has
stitchPreference: 'quality').Mark/Kimi_Agent_Brother_10_Digitizing_App@2b2f630(FE fix)Mark/easystitch-service@e452c59(related: underlay wire field,same umbrella #115 — not strictly required for #116 but landed in
the same triage pass)
the panel still exposes
balanced / detail / speed, but pickingdetailis silently mapped toqualityon the wire.Closing as resolved by the umbrella-supersede. The commit message
references #115 (the original umbrella); #116 is satisfied by the
same code change.