feat(web): delete manual face from marker toolbar #1169
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/manual-face-toolbar-delete"
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?
Follow-up to the manual face bbox feature (docs/superpowers/specs/2026-10-12-manual-face-bbox-design.md).
What this adds
editmode (create sessions have no stored marker). Danish label "Slet markering", consistent pill styling, placed left of the red ✕.POST /api/discovery/results/{faceAnnotationId}/reject. Success: session ends, face removed from the persons strip (tile + image marker), success toast "Markering slettet." Failure: error toast, toolbar stays open; 409/404 resync the face list viareloadFaces().Reported "✕ does nothing" in edit mode
Verified code-wise: ✕ was and is correct in BOTH modes —
cancelStagedFaceSession()setsstagedFace = null, which unmounts both the toolbar and the overlay ({#if stagedFace}mounts in MediaViewer). The perceived no-op is that ✕ only discards the local draft: the stored marker stays on the image and in the strip, so nothing visibly changes. The delete action is the missing affordance the user was reaching for. A new e2e test additionally proves ✕ closes the toolbar and does NOT hit the reject endpoint.Wiring
FaceMarkerEditToolbar.svelte(onDeleteprop, edit-mode-only button) →MediaViewer.svelte(onFaceMarkerDelete) →MediaDetailViewer.svelte(deleteStagedFaceMarker, guarded to edit mode + not busy).Test evidence
npm run check: 0 errors (18 pre-existing warnings)npm run test:unit: 157/157 passednpm run buildthen Playwrightmanual-face-bbox,face-marker-visibility,edit-nav-guard,viewer-tentative-face: 56 passed, 0 failed (desktop + mobile)New e2e coverage in
manual-face-bbox.spec.ts: