feat: unassign a face from its person in the detail viewer face dialog #835

Merged
chris merged 2 commits from fix/face-unassign into main 2026-09-23 21:43:09 +02:00
Owner

What

Removes the forced-reassignment dead end in the photo detail viewer's face dialog: an assigned face can now be DETACHED from its person without picking a replacement — the face becomes an unassigned detected face again, re-eligible for future suggestions.

  • API: POST /api/discovery/faces/{faceAnnotationId}/unassign (session auth, owner-scoped) — ClassInstanceService.unassignFace sets the face's accepted occurrence to state='removed' (the existing V074 occurrence lifecycle, provenance audit owner_unassigned_face_from_person), marks the owner dirty (recognition re-arms), returns the refreshed assignment view; 409 when nothing assigned, 403 foreign.
  • Web: 'Fjern tildeling' action in the face dialog's re-assign row (only for assigned faces, confirm-free, disabled while busy); on success the dialog stays open, face flips to unassigned in place, typed query cleared, 'Tildeling fjernet.' message; 409 resyncs via the existing refresh path.
  • Guardrails: face annotation never deleted; person instance untouched (even on last face); pending suggestions untouched; re-assigning later revives the same occurrence row.

Tests

  • API: unassign/removal/reassignment (occurrence removed → view unassigned → re-assign revives same row), guardrails (409 unassigned, 403 foreign, pending stays pending), audit provenance, dirty mark, controller delegation — discovery+people suites 615 green.
  • Web: timeline e2e — button appears for assigned faces, posts /unassign once, dialog stays open, face shows 'Unassigned detected face', tile offers 'Assign person' again after close (60 passed incl. edit-nav-guard regression). svelte-check 0 errors; build ok.
## What Removes the forced-reassignment dead end in the photo detail viewer's face dialog: an assigned face can now be DETACHED from its person without picking a replacement — the face becomes an unassigned detected face again, re-eligible for future suggestions. - API: `POST /api/discovery/faces/{faceAnnotationId}/unassign` (session auth, owner-scoped) — `ClassInstanceService.unassignFace` sets the face's accepted occurrence to state='removed' (the existing V074 occurrence lifecycle, provenance audit `owner_unassigned_face_from_person`), marks the owner dirty (recognition re-arms), returns the refreshed assignment view; 409 when nothing assigned, 403 foreign. - Web: 'Fjern tildeling' action in the face dialog's re-assign row (only for assigned faces, confirm-free, disabled while busy); on success the dialog stays open, face flips to unassigned in place, typed query cleared, 'Tildeling fjernet.' message; 409 resyncs via the existing refresh path. - Guardrails: face annotation never deleted; person instance untouched (even on last face); pending suggestions untouched; re-assigning later revives the same occurrence row. ## Tests - API: unassign/removal/reassignment (occurrence removed → view unassigned → re-assign revives same row), guardrails (409 unassigned, 403 foreign, pending stays pending), audit provenance, dirty mark, controller delegation — discovery+people suites 615 green. - Web: timeline e2e — button appears for assigned faces, posts /unassign once, dialog stays open, face shows 'Unassigned detected face', tile offers 'Assign person' again after close (60 passed incl. edit-nav-guard regression). svelte-check 0 errors; build ok.
feat: unassign a face from its person in the detail viewer face dialog
Some checks failed
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 4m50s
8a956111fb
Merge main (CI heavy-test lock) into fix/face-unassign before CI rerun
All checks were successful
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 1m45s
8cb345b8a6
chris merged commit dc628d097f into main 2026-09-23 21:43:09 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!835
No description provided.