fix(people): keep representative bbox when face thumbnail not yet generated #651
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/people-rep-bbox-without-thumbnail"
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?
Bug
Detail page + browse list show full photo instead of face crop for people created via face assignment, because
representativeBboxis null.Root cause
SQL CTEs
manual_selectedandauto_selectedinrepresentativeEnrichmentForPeoplefilter onface_thumbnail_key IS NOT NULL, dropping faces that have no derived face-crop asset yet. This loses the bounding_box fromface_annotations.scopealong with the face.Fix
Remove the two
AND face_thumbnail_key IS NOT NULLWHERE lines from both CTEs. Faces without thumbnails are now still selected as representatives, preserving their bounding_box. TherepresentativeCroppedThumbnailUrlis only set when the underlying derived asset exists, so no 404 occurs.Test impact
personWithoutFaceThumbnailReturnsNullPreviewUrl— face without thumbnail is now selected as representativepersonWithoutFaceThumbnailReturnsBboxFromFaceAnnotation— verifies bbox populated fromface_annotations.scope