fix(ssp): route cancel/delete through runSubmit, surface the error (RB-20)

ApplicationsStore.cancel and AdminCasesStore.delete rolled an optimistic
write back on failure but showed no message — a bare catch with no
Result and no error channel (CQ-002). Both now call runSubmit and set a
lastError signal on failure, mirroring createSubmitChangeRequest in the
same folder. Each page renders the error with the existing app-alert
atom, the same pattern brief.page.ts already uses for lastError.

Added a spec file for ApplicationsStore (none existed) and extended
AdminCasesStore's spec, each asserting the rollback AND the surfaced
error. Verified both new assertions fail without the fix (an Edit
undo/redo of the store method, not git checkout).

Regenerated libs/shared/docs/behaviour-spec.mdx (gen:behaviour-spec) to
pick up the new/renamed test names. Marked RB-20 done in 99-backlog.md
and recorded the change in implementation/rb-20.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
eho
2026-08-27 18:32:51 +02:00
co-authored by Claude Opus 5
parent 7fbac8fca5
commit 7def4a7552
9 changed files with 267 additions and 15 deletions
+10 -2
View File
@@ -20,7 +20,7 @@ tested where._
Every bullet below is a real test name from the suite — an `it()` title (frontend) or a test
method name (backend), read as a sentence. Nothing here is hand-written prose: this page
**is** the suite, reshaped for a business reader. 451 frontend behaviours across
**is** the suite, reshaped for a business reader. 456 frontend behaviours across
9 contexts; 236 backend behaviours across 41 test
classes.
@@ -406,7 +406,15 @@ classes.
- loads and parses the cross-owner list
- deletes optimistically and confirms via the admin endpoint
- rolls back the removal when the delete fails
- rolls back the removal and surfaces the error when the delete fails
- clears a stale error on the next delete attempt
#### ApplicationsStore
- loads and parses the list
- cancels optimistically and confirms via the DELETE endpoint
- rolls back the removal and surfaces the error when the cancel fails
- clears a stale error on the next cancel attempt
#### STEPS (fixed)