Auto-Digitize button silently no-ops when upload hasn't completed yet #60
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#60
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?
Summary
Clicking Auto-Digitize (toolbar FAB or Design Settings "Run Auto-Digitize" button) before the uploaded image has been committed to Redux state silently exits without calling
/v1/digitize. The UI does not show an error toast, and the button appears responsive (act clickreturnsok (click)), so users think digitize happened and proceed to export.Reproduction path
e12, OR the inner "Run Auto-Digitize" button in Design Settings, refe57) before the FileReader + Image.onload chain finishes.Confirm & Editbutton rendering after the auto-digitize inner modal opens)/api/easystitch/v1/digitizeever fires — service log shows only/healthzpolls.Code path
useWorkspace.ts:414-432:The
useWorkspace.ts:325-335handleFileUploadpopulatesuploadedImageonly afterFileReader.onloadAND a freshImage.onloadcallback. There's no debounce or "image loading" guard that prevents the Auto-Digitize button from accepting clicks in the gap.Expected behavior
Either:
[disabled]whileuploadedImageis null, OREvidence
hook fetchconfirmed only/healthzGETs during the click sequence./v1/digitizetotal across the session (it was the manual curl probe, not from the UI).08_upload_works.pngshows the panel unlocked but no digitize request followed.Severity: high — the entire happy path is broken until the user discovers that Auto-Digitize is not idempotent and the UI misleads them.
Moved from Mark/easystitch-service#32 — 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 #32 retained as a cross-reference.
Fixed by commit 8a8cb8b (pushed via merge fe4a509). The inner 'Run Auto-Digitize' button now calls runAutoDigitize directly instead of dispatching a sentinel state and relying on a stale-closure useEffect. A re-entry guard inside runAutoDigitize prevents duplicate POSTs. Regression test: src/components/workspace/issue-60.test.tsx (renamed to repro-60.test.tsx). Verify gate (6/6 commands) passed: useWorkspace + CanvasArea + RightPanel + repro-60 vitest, pnpm lint, tsc -b.
processingMessageis set in state but never read; same string is hard-coded in the UI #202