feat: expose cluster centrality in set-thumbnail dialog + Danish sort hint #831

Merged
chris merged 2 commits from fix/thumbnail-centrality-order into main 2026-09-23 18:45:23 +02:00
Owner

Context

The set-thumbnail picker already orders faces by embedding-cluster centrality (9dfab68b: cosine distance to dominant-space centroid, ascending, embedding-less last, deterministic tie-break chain + keyset cursor) — but the API didn't expose WHY, and the dialog didn't say so.

Change

  • API: each items[] entry in face-thumbnails now carries centrality (6-decimal cosine distance to the centroid; null when unranked). Positional append, non-breaking.
  • Web: typed centrality? field + subtle Danish header hint in the set-rep dialog ("Sorteret efter mest centrale i klyngen").
  • Math unchanged (existing centroid/cosine path — identical to unit-centroid formulation).

Tests

  • Service test extended: opposite-direction outlier last-before-embedding-less, per-item centrality values + nulls, deterministic repeat order.
  • E2e: mocks carry centrality with the most central face deliberately distinct from the current representative; asserts hint text + first rendered tile IS the central face (client-side re-sort would fail the test).
  • Scoped suites: Thumbnail + discovery 477 green; svelte-check 0 errors; build ok; dialog spec 22+22 (desktop+mobile).
## Context The set-thumbnail picker already orders faces by embedding-cluster centrality (9dfab68b: cosine distance to dominant-space centroid, ascending, embedding-less last, deterministic tie-break chain + keyset cursor) — but the API didn't expose WHY, and the dialog didn't say so. ## Change - API: each `items[]` entry in face-thumbnails now carries `centrality` (6-decimal cosine distance to the centroid; null when unranked). Positional append, non-breaking. - Web: typed `centrality?` field + subtle Danish header hint in the set-rep dialog ("Sorteret efter mest centrale i klyngen"). - Math unchanged (existing centroid/cosine path — identical to unit-centroid formulation). ## Tests - Service test extended: opposite-direction outlier last-before-embedding-less, per-item centrality values + nulls, deterministic repeat order. - E2e: mocks carry centrality with the most central face deliberately distinct from the current representative; asserts hint text + first rendered tile IS the central face (client-side re-sort would fail the test). - Scoped suites: Thumbnail + discovery 477 green; svelte-check 0 errors; build ok; dialog spec 22+22 (desktop+mobile).
feat: sort set-thumbnail dialog by embedding cluster centrality (most central first)
Some checks failed
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
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 converter worker image (push) Has been skipped
Build and Deploy / Build people 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 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 4m44s
176b903e6c
Merge main into fix/thumbnail-centrality-order to re-trigger CI after runner OOM
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 3m4s
6119dfce99
chris merged commit 83890d0951 into main 2026-09-23 18:45:23 +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!831
No description provided.