Underlay toggle in Auto-Digitize Settings is silently dropped — value never reaches the service #117
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#117
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: Toggling "Underlay" in Auto-Digitize Settings has no effect on the digitize service call
Reproduction (verified 2026-09-25)
settings.underlayfield is absent.Expected
When the user toggles Underlay on, the service request should include
underlay: true(or whatever the service contract expects). When off,underlay: false. The output should differ.Actual
src/lib/digitize-adapters.ts:36-57toServiceSettings()builds the service payload:No
underlayfield. The reducer atuseWorkspace.ts:169correctly updatesstate.autoDigitizeSettings.underlay, and the toggle'sonChangecorrectly dispatchesSET_AUTO_DIGITIZE_SETTING. But the mapper drops the value before it reachesdigitize().Root cause
toServiceSettings()does not includeunderlayin its returned object. The mapper is incomplete — the UI control is wired to state, state is updated, but the state→service translation is missing.Recommended fix
underlay: workspaceSettings.underlayto the returned object intoServiceSettings().DigitizeSettingsPydantic model accepts anunderlayfield. If not, file a back-end issue to add it.underlay, either:autoThreadMatchdisabled state)underlayfor bothtrueandfalsetoggle states.settings.underlayreflects the toggle state.Severity
Medium. The toggle silently does nothing. Users who learn about this control have no idea they're being ignored.
Labels
Filed 2026-09-25 by user-driven bughunt session. Supersedes umbrella #115.
Closed via commit
dfa4359onMark/Kimi_Agent_Brother_10_Digitizing_appmain.The mapper fix itself landed in
2b2f630(umbrella #115), which addedunderlay: workspaceSettings.underlaytotoServiceSettings()and a correspondingunderlay?: booleanfield onAutoDigitizeSettings(seesrc/lib/digitize-adapters.ts:60andsrc/lib/easystitch-client.ts:31). The back-endDigitizeSettingsPydantic model already acceptsunderlay: bool | None = NoneatMark/easystitch-servicemodels.py:108(forward-compatible wire field, ignored by_translate_settingsuntil the engine adopts it), so no back-end issue is needed.What was still missing was an end-to-end assertion that the toggle state survives the full UI → state → mapper → wire pipeline.
dfa4359addstests/e2e/issue-117-underlay.spec.ts, a Playwright regression that:POST /api/easystitch/v1/digitizeviapage.route()(Playwright'srequest.postData()/postDataBuffer()both return empty for fetch()-issued multipart uploads because the browser hands the body off as a Blob; routing the path throughpage.route()is what lets us see the buffered multipart envelope before it leaves the page).settingsmultipart part reflects each state.Captured live payloads (
tests/e2e/.playwright-output/issue-117-underlay-payloads.json):underlay: true):"underlay": true"underlay": false"underlay": trueTest passes against the live dev server (
viteon :3000,easystitch-serviceon :8080). Unit tests insrc/lib/digitize-adapters.test.ts(19/19) and the full shakedown are unaffected — this is a new test file with no production code change.