Auto-Digitize Settings panel is half-wired: detail 422s the service, underlay is silently dropped, error messages hide the cause #115

Closed
opened 2026-09-30 01:43:56 +00:00 by Mark · 1 comment
Owner

Superseded by #116, #117, #118. Splitting this umbrella into three focused issues for independent triage and regression coverage. Original analysis remains accurate; this issue just aggregates three distinct root causes.

  • #116 — detail stitch preference 422s the service (front-end / back-end literal mismatch)
  • #117 — underlay toggle silently dropped before the request
  • #118 — 422 error messages hide FastAPI body.detail from the user
Superseded by #116, #117, #118. Splitting this umbrella into three focused issues for independent triage and regression coverage. Original analysis remains accurate; this issue just aggregates three distinct root causes. - **#116** — `detail` stitch preference 422s the service (front-end / back-end literal mismatch) - **#117** — `underlay` toggle silently dropped before the request - **#118** — 422 error messages hide FastAPI `body.detail` from the user
Mark 2026-09-30 01:43:56 +00:00
Author
Owner

Closed via two-repo fix (commits on main):

Mark/Kimi_Agent_Brother_10_Digitizing_App — commit 2b2f630

  • mapStitchPreference(): UI detail → service quality so the Detail preference no longer 422s.
  • toServiceSettings(): includes underlay so the workspace Underlay toggle reaches the service.
  • AutoDigitizeSettings type: stitch-preference literal set corrected; new optional underlay field.
  • readErrorBody(): now reads FastAPI's detail (string OR RequestValidationError array). The previously opaque easystitch-service responded 422 now surfaces the actual field-level cause (e.g. stitchPreference: Input should be ... quality).
  • Tests: replaced the obsolete 'passes detail through' assertion; new readErrorBody describe block covers the FastAPI envelope (string detail, validation-error array, message/error fallbacks, non-JSON).

Mark/easystitch-service — commit e452c59

  • DigitizeSettings: accepts underlay: bool | None = None as a forward-compatible wire field (same pattern as fabric / targetStitchCount in #31). Engine-side consumption is deferred; the wire field is accepted now so the front-end control has a real effect the moment the engine adopts it.
  • New test: test_digitize_accepts_underlay_field — verifies on/off payloads both 200 and reach the runner.

Verification

  • Front-end: pnpm test — 376/376 pass. pnpm lint clean.
  • Back-end: pytest tests/ — 159/159 pass. ruff check clean.
  • Both CI runs on Forgejo Actions: green.
Closed via two-repo fix (commits on `main`): **`Mark/Kimi_Agent_Brother_10_Digitizing_App`** — commit `2b2f630` - `mapStitchPreference()`: UI `detail` → service `quality` so the Detail preference no longer 422s. - `toServiceSettings()`: includes `underlay` so the workspace Underlay toggle reaches the service. - `AutoDigitizeSettings` type: stitch-preference literal set corrected; new optional `underlay` field. - `readErrorBody()`: now reads FastAPI's `detail` (string OR `RequestValidationError` array). The previously opaque `easystitch-service responded 422` now surfaces the actual field-level cause (e.g. `stitchPreference: Input should be ... quality`). - Tests: replaced the obsolete 'passes detail through' assertion; new `readErrorBody` describe block covers the FastAPI envelope (string detail, validation-error array, message/error fallbacks, non-JSON). **`Mark/easystitch-service`** — commit `e452c59` - `DigitizeSettings`: accepts `underlay: bool | None = None` as a forward-compatible wire field (same pattern as `fabric` / `targetStitchCount` in #31). Engine-side consumption is deferred; the wire field is accepted now so the front-end control has a real effect the moment the engine adopts it. - New test: `test_digitize_accepts_underlay_field` — verifies on/off payloads both 200 and reach the runner. **Verification** - Front-end: `pnpm test` — 376/376 pass. `pnpm lint` clean. - Back-end: `pytest tests/` — 159/159 pass. `ruff check` clean. - Both CI runs on Forgejo Actions: green.
Sign in to join this conversation.
No description provided.