From d9c141c177140ddf126f928b8964ff1b3697b446 Mon Sep 17 00:00:00 2001 From: Garemat <9209350+Garemat@users.noreply.github.com> Date: Tue, 23 Jun 2026 21:39:26 +0100 Subject: [PATCH 1/2] feat: show submission status to all members; full detail to host All members now see a per-player submitted/waiting indicator in the Machinations tab (green check = done, faded = pending). The existing X/Y count in the header now reflects real data for non-hosts. The Chamberlain admin panel gains a Submissions detail list beneath the overview table, showing each player's choices (SUPPORT/SABOTAGE and target name) as they trickle in. Co-Authored-By: Claude Sonnet 4.6 --- .../lunachron/ui/MachinationsPhaseUI.kt | 33 +++++++++++++++++++ .../ui/OnlineCampaignDetailScreen.kt | 24 ++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt b/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt index a493298..89b3899 100644 --- a/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt +++ b/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt @@ -205,6 +205,39 @@ internal fun OnlineMachinationsTab( } } + // Submission status — visible to all, shows who has/hasn't submitted yet + item { + val submittedIds = remember(campaign.machinations) { + campaign.machinations.map { it.deviceId }.toSet() + } + FlowRow( + horizontalArrangement = Arrangement.spacedBy(6.dp), + verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + approvedMembers.forEach { m -> + val done = m.deviceId in submittedIds + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(3.dp) + ) { + Icon( + if (done) Icons.Default.CheckCircle else Icons.Default.RadioButtonUnchecked, + contentDescription = null, + modifier = Modifier.size(11.dp), + tint = if (done) SupportGreen + else MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.45f) + ) + Text( + m.username, + style = MaterialTheme.typography.labelSmall, + color = if (done) MaterialTheme.colorScheme.onSurface + else MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.45f) + ) + } + } + } + } + if (myDeviceId.isNotEmpty() && eligibleTargets.isNotEmpty()) { // Opponent exclusion notice if (myNextOpponentId != null) { diff --git a/app/src/main/java/io/github/garemat/lunachron/ui/OnlineCampaignDetailScreen.kt b/app/src/main/java/io/github/garemat/lunachron/ui/OnlineCampaignDetailScreen.kt index 0a3f681..2bdda61 100644 --- a/app/src/main/java/io/github/garemat/lunachron/ui/OnlineCampaignDetailScreen.kt +++ b/app/src/main/java/io/github/garemat/lunachron/ui/OnlineCampaignDetailScreen.kt @@ -2795,6 +2795,30 @@ private fun MachinationsOverviewSection( ) } } + + // Per-player submission detail + if (machinations.any { it.choices.isNotEmpty() }) { + val memberByDeviceId = members.associateBy { it.deviceId } + HorizontalDivider(thickness = 0.5.dp, modifier = Modifier.padding(top = 2.dp)) + Text("Submissions", style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(top = 2.dp)) + for (entry in machinations.filter { it.choices.isNotEmpty() }) { + Column(verticalArrangement = Arrangement.spacedBy(1.dp)) { + Text(entry.username, style = MaterialTheme.typography.labelSmall, fontWeight = FontWeight.Bold) + entry.choices.forEach { choice -> + val targetName = memberByDeviceId[choice.targetDeviceId]?.username ?: "?" + val choiceColor = if (choice.type == "SUPPORT") Color(0xFF4CAF50) + else MaterialTheme.colorScheme.error + Text( + " ${choice.type} → $targetName", + style = MaterialTheme.typography.labelSmall, + color = choiceColor + ) + } + } + } + } } } From 0aebc65d02b79c08fc7a02cf38d1b0c77c57ab02 Mon Sep 17 00:00:00 2001 From: Garemat <9209350+Garemat@users.noreply.github.com> Date: Tue, 23 Jun 2026 21:54:22 +0100 Subject: [PATCH 2/2] fix: add ExperimentalLayoutApi opt-in to MachinationsPhaseUI FlowRow requires this annotation; missing it causes release builds to fail even though debug passes. Co-Authored-By: Claude Sonnet 4.6 --- .../java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt b/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt index 89b3899..125503d 100644 --- a/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt +++ b/app/src/main/java/io/github/garemat/lunachron/ui/MachinationsPhaseUI.kt @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalLayoutApi::class) + package io.github.garemat.lunachron.ui import androidx.compose.animation.AnimatedVisibility