feat(web): manual face bbox drawing + editing toolbar #1164
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/manual-face-bbox-frontend"
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?
Frontend half of the manual face bbox feature (design spec: docs/superpowers/specs/2026-10-12-manual-face-bbox-design.md).
What this adds
manual: true(auto-detected faces untouched).API contract (implemented, pending the parallel backend PR)
POST /api/media/{mediaItemId}/discovery/faceswith body{"scope":{x,y,width,height}}PATCH /api/discovery/faces/{faceAnnotationId}/scopewith body{"scope":{x,y,width,height}}FaceAssignmentViewgainsmanual: booleanNew helpers:
createManualFace,updateFaceScopeinapps/web/src/lib/api/discovery.ts.Test evidence
npm run check(svelte-check): 0 errors.npm run test:unit(vitest): 133 passed (incl. new mediaUtils face-scope/clamp/draft-style tests).manual-face-bbox.spec.ts+face-marker-visibility,edit-nav-guard,viewer-tentative-face,plant-marker-move,timeline→ 138 passed, 0 failed, 11 skipped.The new e2e spec mocks the two endpoints via
page.route(the preview server has no API proxy) but asserts method, URL, and request body to lock the backend contract. Assertions that hit the real endpoints await the backend PR.Note for review
showPersonsSectiongating is unchanged, so the plus card is only reachable when the persons strip renders (faces exist or people overlays). Flagged for orchestrator decision — see task notes.Add a plus card in the persons strip to draw a manual face bbox, a drag/resize overlay with confirm/cancel toolbar (no auto-save), and an edit badge on manual faces. Scope is clamped (min edge 0.05, 0-1) and sent as normalized coords via POST /media/{id}/discovery/faces and PATCH /discovery/faces/{id}/scope. E2E mocks the endpoints via page.route to lock the request contract; full end-to-end behavior awaits the parallel backend PR.