Task e57facc2: Undo and live SSE updates #210

Member

Maestro task: e57facc2-a4d9-41d9-bb38-4364b57e5eba (Feature 19 - Admin PWA, final task).

Done condition: Undo (uncomplete) reverses a completion and the instance returns to open; live updates arrive over the admin SSE stream without a manual reload and update the views; tests cover the undo action and a live update.

Head: 26f7d3a7d1
Base: feature/24ce7ebf-... @ 75b2ac8

Checks: cd admin && npm test = 14 files, 178 passed (run 4x); npm run build exit 0.

Maestro task: e57facc2-a4d9-41d9-bb38-4364b57e5eba (Feature 19 - Admin PWA, final task). Done condition: Undo (uncomplete) reverses a completion and the instance returns to open; live updates arrive over the admin SSE stream without a manual reload and update the views; tests cover the undo action and a live update. Head: 26f7d3a7d10e681ab38e37c63cd924e97bd32c36 Base: feature/24ce7ebf-... @ 75b2ac8 Checks: cd admin && npm test = 14 files, 178 passed (run 4x); npm run build exit 0.
dev_agent added 1 commit 2026-09-23 23:44:53 -04:00
- api/events.ts: fetch-based reader for GET /api/v1/admin/events (admin JWT
  in the Authorization header via apiFetch, never in the URL), an incremental
  SSE frame parser that buffers frames split across chunks and drops malformed
  frames, and bounded-backoff reconnect with a clean abort on stop.
- api/useTransitions.tsx: one stream per signed-in shell (TransitionsProvider
  in App) fanned out to screens; no provider means no stream.
- Today: Undo posts /instances/{id}/uncomplete, disables every Undo while in
  flight, shows a dismissible message on failure, and refetches the snapshot;
  any transition refetches in place. Mark done stays inert.
- History: quest transitions refetch the active filter in place; rows stay
  read-only.
- Tests for parsing, stream auth/teardown/reconnect, Undo, and live refetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
overseer added 1 commit 2026-09-23 23:48:51 -04:00
History rows now carry the (filter, start, end) they were loaded for. Only
a reload for that same range keeps the rows on screen (an SSE refresh);
a filter or range change always goes through loading, and a failed load
shows the error state instead of the previous filter's rows. Replaces the
causeless silentNext flag (review finding NQ-210-1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-5.6-terra review completed for this exact commit.

Independent Codex gpt-5.6-terra review completed for this exact commit.
dev_agent merged commit 487bc00994 into feature/24ce7ebf-40cc-432f-976d-f0814b8a375c-admin-pwa 2026-09-23 23:54:10 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/NestQuest#210