Inner Auto-Digitize modal 'Confirm & Edit' button shows success message without API call #62

Closed
opened 2026-09-10 02:55:18 +00:00 by Mark · 1 comment
Owner

Summary

After clicking the inner modal "Confirm & Edit" button (ref e65) in the Auto-Digitize preview modal, the UI updates with "Auto-digitize complete! Design ready for editing" but no /v1/digitize request is ever sent. The "complete" message is a hardcoded UI string that fires unconditionally on the click handler, regardless of whether any network work happened.

Reproduction

  1. Upload an image.
  2. Click Auto-Digitize FAB (toolbar e12) or Design Settings Auto-Digitize (e48).
  3. Auto-Digitize inner modal opens with Image/Stitches/Both preview toggles (refs e61/e62/e63) and a Confirm & Edit button (ref e65).
  4. Click Confirm & Edit.
  5. UI updates: "Auto-digitize complete! Design ready for editing."
  6. Service log shows zero POSTs to /v1/digitize during this sequence.

Code path

Likely RightPanel.tsx:217:

onClick={() => {
  dispatch({ type: 'SET_STATE', state: 'digitizing' });
  dispatch({ type: 'SET_PROCESSING', step: 0, message: 'Detecting color regions...' });
}}

Then a separate dispatch flips to 'digitized' and shows the toast. The actual digitize() call from useWorkspace.ts:432 is never triggered in this flow — the modal's Confirm & Edit is just a state transition.

Expected behavior

The "Confirm & Edit" should fire runAutoDigitize() (the actual API-calling handler) before transitioning to 'digitized'. Or the message should be reworded to "Preview generated" so users don't think the digitize completed.

Severity: high — same family as #32 (silent no-op on Auto-Digitize). User confusion guaranteed.


Moved from Mark/easystitch-service#34 — these are UI bugs in the ThreadCraft frontend, not API bugs on the easystitch-service. They were originally filed on the wrong repo because both projects are part of the same ThreadCraft shakedown work, but the fix surface is here.

Original issue #34 retained as a cross-reference.

**Summary** After clicking the inner modal "Confirm & Edit" button (ref `e65`) in the Auto-Digitize preview modal, the UI updates with "Auto-digitize complete! Design ready for editing" **but no `/v1/digitize` request is ever sent**. The "complete" message is a hardcoded UI string that fires unconditionally on the click handler, regardless of whether any network work happened. **Reproduction** 1. Upload an image. 2. Click Auto-Digitize FAB (toolbar `e12`) or Design Settings Auto-Digitize (`e48`). 3. Auto-Digitize inner modal opens with Image/Stitches/Both preview toggles (refs `e61/e62/e63`) and a Confirm & Edit button (ref `e65`). 4. Click Confirm & Edit. 5. UI updates: "Auto-digitize complete! Design ready for editing." 6. **Service log shows zero POSTs to `/v1/digitize` during this sequence.** **Code path** Likely `RightPanel.tsx:217`: ```tsx onClick={() => { dispatch({ type: 'SET_STATE', state: 'digitizing' }); dispatch({ type: 'SET_PROCESSING', step: 0, message: 'Detecting color regions...' }); }} ``` Then a separate dispatch flips to `'digitized'` and shows the toast. The actual `digitize()` call from `useWorkspace.ts:432` is never triggered in this flow — the modal's `Confirm & Edit` is just a state transition. **Expected behavior** The "Confirm & Edit" should fire `runAutoDigitize()` (the actual API-calling handler) before transitioning to `'digitized'`. Or the message should be reworded to "Preview generated" so users don't think the digitize completed. **Severity**: high — same family as #32 (silent no-op on Auto-Digitize). User confusion guaranteed. --- **Moved from Mark/easystitch-service#34** — these are UI bugs in the ThreadCraft frontend, not API bugs on the easystitch-service. They were originally filed on the wrong repo because both projects are part of the same ThreadCraft shakedown work, but the fix surface is here. Original issue #34 retained as a cross-reference.
Author
Owner

Fixed by commit 20007d1 (pushed via merge fe4a509). Moved the 'Auto-digitize complete!' toast out of commitDigitizedResult into runAutoDigitize so it only fires on a real /v1/digitize success path. Re-entry guard inside runAutoDigitize now uses the abort controller (authoritative in-flight marker) instead of the brittle appState check. Regression test: src/components/workspace/issue-62.test.ts.

Fixed by commit [20007d1](https://forgejo.tail018ac4.ts.net/Mark/Kimi_Agent_Brother_10_Digitizing_App/commit/20007d1) (pushed via merge [fe4a509](https://forgejo.tail018ac4.ts.net/Mark/Kimi_Agent_Brother_10_Digitizing_App/commit/fe4a509)). Moved the 'Auto-digitize complete!' toast out of commitDigitizedResult into runAutoDigitize so it only fires on a real /v1/digitize success path. Re-entry guard inside runAutoDigitize now uses the abort controller (authoritative in-flight marker) instead of the brittle appState check. Regression test: src/components/workspace/issue-62.test.ts.
Mark closed this issue 2026-09-13 01:26:10 +00:00
Sign in to join this conversation.
No description provided.