Data UI Backlog

Close the edit form after a sync-complete action

After an action button succeeds synchronously (chores Complete :spawn), handleAction re-opens the edit form on the same record so the "complete" status text shows — leaving a form open on a record the action just made stale. For :spawn the record is closed history: the open form invites edits to it, and the user must click Cancel to escape. Model Bank Deploy / Generate are the counter-case: "accepted" (async) and "failed" need the form to stay open (spinner, 3s poll, failure message).

Fix: handleAction (App.tsx) reads result.status from the /api/actions body. "complete" → close the form (settings mode returns to landing, mirroring submitForm) and refresh the list; every other outcome (HTTP error, "failed", "accepted") keeps today's re-open. Frontend-only; the "complete" text is lost with the form (already ephemeral — fresh opens blank it), the list shows the effect instead.

Plan: action-close-form-plan.org.

Implemented 2026-10-02 per plan, frontend-only, handleAction (web/src/App.tsx) only. Body parsed once (single-read Response); the !res.ok alert now reads body?.error directly instead of errorMessage's second read. "complete" (HTTP 200 only) closes: returnToLanding() in settings mode (no extra fetchList — it races the landing fetch), closeForm() +=fetchList()= otherwise. Everything else — HTTP error, sync "failed", async "accepted", unparseable body — keeps today's fetchList + re-open (spinner, poll, and failure text stay). preserveStatusOnOpenRef untouched on the close path. Built (tsc + vite, dist served verified); wire-verified live on chores dev: POST /api/actions Complete → result.status "complete", row stamped completed/completed-at, successor spawned. (run-action-tests): 20 checks, all pass. No deviations. :change-password= "complete" now silently bounces to Home — accepted per plan (toast is post-MVP).

Slot
1300
Status
60 Done
Tags
mvp, frontend
Contributors
Donnie