Modern Apps git

← Modern-Apps.git

share: add screenshot capture for Share route

Commit
2789f54016bb0c3cea5e07f02202665d249d93ad
Author
Vayun Mathur <[email protected]>
When
2026-12-02 08:08 UTC (3 days ago)
Parents
8aeeff6
Route.Share renders the real send screen (Navigation entry to
ShareSendPage to ShareSendContent), so it needs a capture rather
than a coverage exemption. The existing share previews covered
only named send-flow states (1-pick through 5-sent), none of
which names the share route key, so RouteScreenshotCoverage
failed lintVitalRelease.

Add Preview6Share as 6-share in the phone group used by the
other share previews, driving ShareSendContent with the fixed
Peers, PickedFiles and PickedNames fixtures and ShareActions.Noop
with activeConnection null, so the capture is deterministic and
needs no live socket or native session.

Verified fresh in the worktree:
./gradlew :share:lintVitalRelease --rerun-tasks (green),
./gradlew :share:lint :share:testDevUnitTest --rerun-tasks (green).
share/AGENTS.md does not document individual captures, so it
is unchanged.

Diff

share/src/screenshotTest/kotlin/com/vayunmathur/share/ui/MetadataPreviews.kt
diff --git a/share/src/screenshotTest/kotlin/com/vayunmathur/share/ui/MetadataPreviews.kt b/share/src/screenshotTest/kotlin/com/vayunmathur/share/ui/MetadataPreviews.ktindex c5ca2b4a99..93378a2500 100644--- a/share/src/screenshotTest/kotlin/com/vayunmathur/share/ui/MetadataPreviews.kt+++ b/share/src/screenshotTest/kotlin/com/vayunmathur/share/ui/MetadataPreviews.kt@@ -153,6 +153,23 @@ class MetadataPreviews {         }     } +    @PreviewTest+    @Preview(name = "6-share", device = PHONE, group = "phone", showSystemUi = true)+    @Composable+    fun Preview6Share() {+        Screen {+            ShareSendContent(+                uiState = SendUiState(+                    discoveredDevices = Peers,+                    isScanning = true,+                    outgoingUris = PickedFiles,+                    outgoingDisplayNames = PickedNames,+                ),+                actions = ShareActions.Noop,+            )+        }+    }+     @Composable     private fun Cards(content: @Composable () -> Unit) {         Screen {