feat(web): person embedding Kort view — leaflet PCA map with face-thumbnail markers (spec 042) #817

Merged
chris merged 1 commit from feat/embedding-map-web into main 2026-09-22 20:34:44 +02:00
Owner

Summary

  • New "Galleri | Kort" toggle on the people instance detail page. Kort renders a Leaflet map (CRS.Simple, no tile layer — existing leaflet dep reused) whose axes are the backend PCA coordinates: face thumbnails as markers, not dots.
  • Decluttering is deterministic: tentative markers always visible at base zoom; accepted sorted by local density (ascending, tie-break faceAnnotationId), first 52 at base zoom, +25 per zoom level. Count hint "Viser N af M · zoom ind for flere".
  • Marker rings: target = emerald, neighbors = muted neutrals, tentative = amber (pops). Hover tooltip (name, distance, state); click tentative → popover Acceptér/Afvis reusing existing refs-scoped confirm/decision wiring; click accepted → existing ?media= overlay. Variance badge (PC1/PC2 %), truncated chip, clickable person legend chips.
  • Lazy fetch on first Kort activation with stale-response guard; optimistic state transitions on accept/reject.
  • Toggle is people-domain only (backend endpoint rejects non-people anyway).

Tests

  • New apps/web/tests/embedding-map.spec.ts (3 tests × desktop/mobile): toggle swap, 150-pt declutter cap ≤60 + zoom reveal, variance badge, truncated notice, amber tentative class + thumbnail URL contract, accept posts refs confirm + marker transition, reject posts decision + marker removed, legend dim/highlight.
  • Regression: discovery-instance-tentative.spec.ts 34 passed; svelte-check 0 errors; production build ok.
  • Companion PR: #816 (API endpoint). Merge order: API first.

Spec: 042 (in #816)

## Summary - New "Galleri | Kort" toggle on the people instance detail page. Kort renders a Leaflet map (CRS.Simple, no tile layer — existing leaflet dep reused) whose axes are the backend PCA coordinates: face thumbnails as markers, not dots. - Decluttering is deterministic: tentative markers always visible at base zoom; accepted sorted by local density (ascending, tie-break faceAnnotationId), first 52 at base zoom, +25 per zoom level. Count hint "Viser N af M · zoom ind for flere". - Marker rings: target = emerald, neighbors = muted neutrals, tentative = amber (pops). Hover tooltip (name, distance, state); click tentative → popover Acceptér/Afvis reusing existing refs-scoped confirm/decision wiring; click accepted → existing ?media= overlay. Variance badge (PC1/PC2 %), truncated chip, clickable person legend chips. - Lazy fetch on first Kort activation with stale-response guard; optimistic state transitions on accept/reject. - Toggle is people-domain only (backend endpoint rejects non-people anyway). ## Tests - New apps/web/tests/embedding-map.spec.ts (3 tests × desktop/mobile): toggle swap, 150-pt declutter cap ≤60 + zoom reveal, variance badge, truncated notice, amber tentative class + thumbnail URL contract, accept posts refs confirm + marker transition, reject posts decision + marker removed, legend dim/highlight. - Regression: discovery-instance-tentative.spec.ts 34 passed; svelte-check 0 errors; production build ok. - Companion PR: #816 (API endpoint). Merge order: API first. Spec: 042 (in #816)
feat(web): person embedding Kort view — leaflet PCA map with face-thumbnail markers (spec 042)
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 / Build plants worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Build ML worker image (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 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 2m57s
ba298e5d98
chris merged commit 0ef371a03a into main 2026-09-22 20:34:44 +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!817
No description provided.