fix: dedup participants in UI, wait for QUIC close ack before exiting

UI: deduplicate room participants by fingerprint so ghost entries from
stale relay state don't show duplicates.

Engine: after select! ends, call close_now() + connection.closed() with
500ms timeout to wait for the relay to acknowledge the CONNECTION_CLOSE.
Previously the close frame was queued but the runtime died before quinn
could retransmit if the first packet was lost.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude
2026-04-06 05:40:06 +00:00
parent 9bbaec6b35
commit aebf9156c0
2 changed files with 32 additions and 14 deletions

View File

@@ -239,13 +239,17 @@ fun InCallScreen(
QualityIndicator(qualityTier, stats.qualityLabel)
if (stats.roomParticipantCount > 0) {
// Dedup by fingerprint — same key = same person, even if
// relay hasn't cleaned up stale entries yet.
val unique = stats.roomParticipants
.distinctBy { it.fingerprint.ifEmpty { it.displayName } }
Spacer(modifier = Modifier.height(8.dp))
Text(
text = "${stats.roomParticipantCount} in room",
text = "${unique.size} in room",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
stats.roomParticipants.forEach { member ->
unique.forEach { member ->
Text(
text = member.displayName,
style = MaterialTheme.typography.labelSmall,