From 1bb9779e9e87b905c1aa61f482a6e5fa9604aa46 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Apr 2026 17:49:55 +0000 Subject: [PATCH] feat(nests): paint themed background color on the room screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NestThemedScope was overriding MaterialTheme.colorScheme but the Box holding the room body never explicitly painted the themed background color — only consumers that read MaterialTheme.colorScheme.background themselves picked up the change. A room that shipped `["c", hex, "background"]` (EGG-10) but no `bg` image therefore fell back to the platform surface and never looked themed. Add `.background(themed.background)` to the Box. The optional `bg` image still paints on top (per EGG-10 rule 3 — image overlays the color); when no image is present, the themed color tints the whole screen, matching the lobby card's containerColor pattern from the last commit. PIP screen left as-is: it's a small system-managed floating window where the platform surface color is the right call. https://claude.ai/code/session_01RDpuki4t8StSg1CZcXnV5b --- .../ui/screen/loggedIn/nests/room/NestThemedScope.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestThemedScope.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestThemedScope.kt index cacfecf018..e4744ae915 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestThemedScope.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestThemedScope.kt @@ -106,7 +106,15 @@ internal fun NestThemedScope( } MaterialTheme(colorScheme = themed, typography = themedTypography) { - Box(modifier = Modifier.fillMaxSize()) { + // Paint the themed background COLOR on the Box itself so a room + // that ships `["c", hex, "background"]` but no `bg` image still + // visibly tints the room screen — without this, only consumers + // that explicitly read `MaterialTheme.colorScheme.background` + // would pick the override up, and the room would visually fall + // back to the platform surface. The `bg` image, when present, + // paints on top per EGG-10 rule 3 ("image overlays the color"); + // a partially-transparent image lets the color show through. + Box(modifier = Modifier.fillMaxSize().background(themed.background)) { theme.backgroundImageUrl?.let { url -> when (theme.backgroundMode) { RoomTheme.BackgroundMode.COVER -> {