fix(people): emit suggested-people thumbnail URLs only when face crop asset exists #708
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/face-suggestion-thumbnail-404"
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?
Summary
The Suggested people dialog rendered broken image icons for every suggestion: the 3 thumbnail-URL subqueries in
ClassInstanceDiscoveryService.suggestSimilarInstancesemitted/api/media/{media}/faces/{face}/thumbnailunconditionally, butDerivedAssetController.faceThumbnailserves the crop only whendiscovery_results.thumbnail_derived_asset_idresolves to aface_thumbnailderived_assets row. Verified on the owner instance: 0 of 16,411 people faces have that link (legacy face-thumbnail generation was removed with spec 014 phase 2; existing 51k assets reference pre-spec036 face ids). Every URL therefore 404ed.Change
All 3 subqueries (embedding candidates, name fallback, blank-query fallback) now
JOIN derived_assets da2 ON da2.id = dr2.thumbnail_derived_asset_id AND da2.derived_type = 'face_thumbnail'— URLs are emitted only when the asset exists. Null URLs degrade to the text+count row already supported by MediaInfoPanel (same pattern as merged PR #657). Follow-up candidates noted (not in scope): ClassInstanceAutomationRunService.java:240 same blind pattern; face-thumbnail generation pipeline itself is dead and would need revival as a worker feature.Tests
suggestSimilarInstances built /faces/{id}/thumbnail URLs blindly; the endpoint 404s unless discovery_results.thumbnail_derived_asset_id resolves to a face_thumbnail derived_assets row. Production data: 0 of 16411 people faces have the link (legacy generation pipeline removed), so every suggestion thumbnail rendered broken. All 3 URL subqueries now join derived_assets and emit the URL only when the crop exists; the dialog already renders a text-only row for null URLs (PR#657 pattern). Known issues: ISSUE-029 (med, resolved).