fix(web): carousel shows stored named target, not stale single-centroid ranking #1082
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/carousel-stored-target-title"
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 (measured)
liveTopNamedRowoverrode the card/dialog title and primary action with the live best-pair ranking top row fromgetCandidatePersonRanking— but that endpoint still computes the OLD single-centroid metric while the worker writes multi-representant candidates (ADR 0108). Measured: a card with stored target "Rikke" (dist 0.228) rendered as "Similar to Jutta", because Jutta's stale 12-face single-centroid ranked #1 in the old metric.Fix
liveTopNamedRow(single chokepoint for BOTH render sites — card ~2925 and detail dialog ~2212) now returns null when the stored target (existingInstanceDisplayName) has a name: a named stored target is authoritative for the title and the primary action target id (candidate-merge-primary/candidate-accept/ dialog primary).ensureCandidateLiveRankingfetch is skipped for named stored targets (their rows were provably only read via the gatedliveTopNamedRow). Merge-picker rows (fetchCandidatePickerRows→fetchLiveRankingRows) are a separate path and untouched.Tests (discovery-review.spec.ts)
targetId, never rank-1 "Jutta".Validation
npm run check: 0 errorsnpm run build: oknpm run test:unit: 71/71