fix(stammbaum): guard inferred-relationship badge to single-receiver documents only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-28 17:09:46 +02:00
committed by marcel
parent eb91639a5e
commit fa1dfbc99d

View File

@@ -113,7 +113,12 @@ function getFullName(person: Person): string {
{#each displayedReceivers as receiver, i (receiver.id)}
{@render personCard(
receiver,
i === 0 ? (inferredRelationship?.labelFromB ?? null) : null
// Badge only shown when there is exactly one receiver — with multiple
// receivers the inferred label is computed from the sender's viewpoint
// and cannot be attributed to a specific receiver.
i === 0 && receivers.length === 1
? (inferredRelationship?.labelFromB ?? null)
: null
)}
{/each}
</div>