diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts
index fa901729..6197302d 100644
--- a/composeApp/build.gradle.kts
+++ b/composeApp/build.gradle.kts
@@ -519,10 +519,17 @@ compose.desktop {
// name, `com.machankura.bennu.desktop`, until the Giza fork.
packageName = "Giza"
packageVersion = "1.0.0"
+ // Generated from docs/brand/giza-sphinx.svg by docs/scripts/app-icons.py
+ // (docs/giza-app-icon.md, Phase 4). Edit the master and rerun, not these.
+ macOS {
+ iconFile.set(project.file("desktop-icons/giza.icns"))
+ }
linux {
packageName = "giza"
+ iconFile.set(project.file("desktop-icons/giza.png"))
}
windows {
+ iconFile.set(project.file("desktop-icons/giza.ico"))
// Fixed, so one Giza MSI upgrades another, and its own, so it never upgrades
// a Bennu MSI (docs/giza-rebrand.md, Phase 4). Never change it: a new value
// makes the next release install beside the old one instead of over it.
diff --git a/composeApp/desktop-icons/giza.icns b/composeApp/desktop-icons/giza.icns
new file mode 100644
index 00000000..f747857f
Binary files /dev/null and b/composeApp/desktop-icons/giza.icns differ
diff --git a/composeApp/desktop-icons/giza.ico b/composeApp/desktop-icons/giza.ico
new file mode 100644
index 00000000..951714a9
Binary files /dev/null and b/composeApp/desktop-icons/giza.ico differ
diff --git a/composeApp/desktop-icons/giza.png b/composeApp/desktop-icons/giza.png
new file mode 100644
index 00000000..0194fb0a
Binary files /dev/null and b/composeApp/desktop-icons/giza.png differ
diff --git a/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml b/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml
index 601df181..860241f6 100644
--- a/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml
+++ b/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml
@@ -1,13 +1,15 @@
+
-
+ android:viewportWidth="1024"
+ android:viewportHeight="1024">
+ android:pathData="M0,0h1024v1024h-1024z"/>
+
diff --git a/composeApp/src/jvmMain/kotlin/mobi/giza/desktop/Main.kt b/composeApp/src/jvmMain/kotlin/mobi/giza/desktop/Main.kt
index 4471bf6e..3706c532 100644
--- a/composeApp/src/jvmMain/kotlin/mobi/giza/desktop/Main.kt
+++ b/composeApp/src/jvmMain/kotlin/mobi/giza/desktop/Main.kt
@@ -42,7 +42,9 @@ import mobi.giza.compose.PlatformContext
import mobi.giza.compose.defaultGizaDir
import mobi.giza.compose.resources.Res
import mobi.giza.compose.resources.app_name
+import mobi.giza.compose.resources.compose_multiplatform
import mobi.giza.compose.resources.unlock_s
+import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource
import mobi.giza.compose.ui.theme.GizaTheme
import java.awt.Dimension
@@ -65,6 +67,11 @@ fun main() = application {
Window(
onCloseRequest = ::exitApplication,
title = stringResource(Res.string.app_name),
+ // The title bar and taskbar on Windows and X11. It is the in-app logo, the same one
+ // the QR codes carry. The installers' icons are the .icns/.ico/.png named in
+ // build.gradle.kts; the macOS dock and GNOME on Wayland take theirs from the bundle
+ // and the installed .desktop file, never from here (docs/giza-app-icon.md, Phase 4).
+ icon = painterResource(Res.drawable.compose_multiplatform),
// 1100dp is the expanded breakpoint -- 840 to 1199 -- which is the narrowest window
// M3 recommends two panes in, and so the smallest opening size at which a desktop
// user sees a desktop layout rather than a phone one stretched. It used to open at
diff --git a/composeApp/src/jvmTest/kotlin/mobi/giza/compose/ui/composable/widgets/AppLogoDrawableJvmTest.kt b/composeApp/src/jvmTest/kotlin/mobi/giza/compose/ui/composable/widgets/AppLogoDrawableJvmTest.kt
new file mode 100644
index 00000000..00e08d1a
--- /dev/null
+++ b/composeApp/src/jvmTest/kotlin/mobi/giza/compose/ui/composable/widgets/AppLogoDrawableJvmTest.kt
@@ -0,0 +1,87 @@
+package mobi.giza.compose.ui.composable.widgets
+
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.size
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.toPixelMap
+import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.test.ExperimentalTestApi
+import androidx.compose.ui.test.captureToImage
+import androidx.compose.ui.test.onNodeWithTag
+import androidx.compose.ui.test.runDesktopComposeUiTest
+import androidx.compose.ui.unit.dp
+import mobi.giza.compose.resources.Res
+import mobi.giza.compose.resources.compose_multiplatform
+import org.jetbrains.compose.resources.painterResource
+import kotlin.math.abs
+import kotlin.test.Test
+import kotlin.test.assertTrue
+
+/**
+ * The in-app logo -- `compose-multiplatform.xml`, drawn in the middle of every QR code and as
+ * the desktop window's icon -- is the sphinx from docs/brand/giza-sphinx.svg on black.
+ *
+ * The drawable is generated (docs/scripts/app-icons.py), and nothing else would notice it
+ * going wrong: a QR code with the wrong mark in it still scans. So this samples it where the
+ * master is unambiguous -- each point sits in the middle of an 11 px patch of one colour in
+ * ImageMagick's 256 px render of the master -- and asks for the master's colour back:
+ *
+ * - sand in the face and in the disc, which a dropped or recoloured mark changes;
+ * - black in a cutout inside the disc (the band between the left lappet's stripes), which a
+ * master whose cutouts filled in changes. Today's master has no nested sub-paths, so its
+ * fill rule does not matter; a redraw that nests them would, and this is where it shows;
+ * - black in the corner, which a dropped background changes.
+ *
+ * The test density is 1, so 256.dp is 256 pixels and the points are the render's own.
+ * See docs/giza-app-icon.md, Phase 2.
+ */
+@OptIn(ExperimentalTestApi::class)
+class AppLogoDrawableJvmTest {
+
+ // The brand's own two colours, which the drawable is checked against.
+ private val sand = Color(0xFFD2AB5E)
+ private val black = Color(0xFF000000)
+
+ private val expected = listOf(
+ Triple("the face", Point(128, 140), sand),
+ Triple("the disc", Point(62, 62), sand),
+ Triple("a cutout inside the disc", Point(61, 146), black),
+ Triple("the corner", Point(10, 10), black),
+ )
+
+ @Test
+ fun `the logo is the sphinx on black`() = runDesktopComposeUiTest(width = 256, height = 256) {
+ setContent {
+ Image(
+ painter = painterResource(Res.drawable.compose_multiplatform),
+ contentDescription = null,
+ modifier = Modifier.size(256.dp).testTag(Logo),
+ )
+ }
+
+ // A resource painter is empty until the file has been read, which happens off the
+ // composition. Wait for the background to arrive rather than for idleness.
+ waitUntil(timeoutMillis = 10_000) {
+ onNodeWithTag(Logo).captureToImage().toPixelMap()[10, 10].alpha > 0.99f
+ }
+
+ val pixels = onNodeWithTag(Logo).captureToImage().toPixelMap()
+ expected.forEach { (where, at, colour) ->
+ val seen = pixels[at.x, at.y]
+ assertTrue(seen.near(colour), "$where at (${at.x}, ${at.y}): expected $colour, saw $seen")
+ }
+ }
+
+ private data class Point(val x: Int, val y: Int)
+
+ /** Within two 8-bit steps per channel, for antialiasing and colour-space rounding. */
+ private fun Color.near(other: Color) =
+ abs(red - other.red) < 2.5f / 255 &&
+ abs(green - other.green) < 2.5f / 255 &&
+ abs(blue - other.blue) < 2.5f / 255
+
+ private companion object {
+ const val Logo = "logo"
+ }
+}
diff --git a/docs/README.md b/docs/README.md
index 3ef8e5c3..7ea4edbd 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -37,6 +37,7 @@ the [retired](./retired/) notes now.
| [marmot-kmp.md](./marmot-kmp.md) | moving the group layer off quartz's engine and onto marmot-kmp, mls-kmp and crypto-kmp — why staying on quartz 1.15.2 is staying on an engine that left, the 228 import lines and the one rule that places all but two of them, the group state on a device that must still open afterwards, nine phases that put the swap in one commit and the evidence around it, how often this app persists a group once a sent message no longer rewrites it, and the schema change that followed, opened from the version the app ships |
| [quartz-mls-marmot-update.md](./quartz-mls-marmot-update.md) | moving quartz, mls-kmp, marmot-kmp and crypto-kmp to their newest releases, phased and built but for a mac and mls-kmp 1.4.0's release — why almost nothing the app calls has changed while the way the build reaches them has (Nostr + Blossom through Magpie, none of it on Maven Central), the go/no-go that is the owner's, marmot's own pins first and the newest second, and the lock that has to be written on a mac before it can be frozen |
| [giza-wallet-removal.md](./giza-wallet-removal.md) | taking every wallet out of Giza, phased and built but for moving off the wallet library (7b). Covers why a Giza member declines a Bennu peer's wallet proposal instead of ignoring or signing it, why the wallet's kinds are retired rather than freed, why a recovery phrase stays as a key backup that has to derive the same npub and id byte for byte, and why the threshold crypto keeps the build tied to the wallet library until the last phase |
+| [giza-app-icon.md](./giza-app-icon.md) | the sphinx icon on iOS, desktop and in the app, phased and built but for the checks on a mac, a phone and Windows — one master SVG and one generator for every raster, why the iOS light icon must carry no alpha channel, why its dark icon is transparent and its tinted one grayscale, the desktop installers and window that show Java's icon today, and why the mark's cutouts need no fill rule |
| [member-admin-promotion.md](./member-admin-promotion.md) | making a member an admin and back, phased and built, promotion with a share and demotion with a refresh under the experimental enrollment, under three rules: every admin holds a share, every commit in a keyed room is a proposal until the group's threshold signature is on it, and a robust group keeps at least three admins. Covers why the commit rides inside the group's signature and the rule inside the group's state, which lets every device refuse an unsigned commit with the libraries as they are, why a member's own leave stays exempt, and why a removed admin comes back as an admin when re-invited today |
| [admin-change-rotation.md](./admin-change-rotation.md) | an admin change carries its rotation with it: a phased plan, built but for its device session, in which the rotation that follows removing an admin, and the one before a first promotion, asks nobody, because the group's signature on the change already decided who is withheld, and in which admin changes and rotations take turns. Covers the five ways the two overlap today, a removed admin who keeps a live share among them, and the one check a device makes to take part unasked |
| [member-row-actions.md](./member-row-actions.md) | every member row but your own offers every action that applies to that member, and an action you can't take now opens a screen saying what stands in the way and what would change it — phased and built. Covers the twelve reasons an action is refused today, why an unavailable item is marked rather than disabled, and why the explanation screen recomputes its reason instead of carrying it |
diff --git a/docs/brand/giza-sphinx.svg b/docs/brand/giza-sphinx.svg
new file mode 100644
index 00000000..7a400730
--- /dev/null
+++ b/docs/brand/giza-sphinx.svg
@@ -0,0 +1,5 @@
+
diff --git a/docs/giza-app-icon.md b/docs/giza-app-icon.md
new file mode 100644
index 00000000..57a5456e
--- /dev/null
+++ b/docs/giza-app-icon.md
@@ -0,0 +1,257 @@
+# The sphinx icon on iOS, desktop and in the app
+
+Giza's icon is the desert sphinx: one path in sand, `#D2AB5E`, whose cutouts show
+whatever is behind it. Android has it already (`a4f54ad4`, *Update icon.*, on `giza`). This plan
+puts the same artwork on the three places that still show something else:
+
+- **iOS**, whose `AppIcon.appiconset` holds a pixel-art orange rock on white from before the fork,
+ in two files named `Icon-App-1024(1).png` and `Icon-App-1024 1.png`, and an empty tinted slot;
+- **desktop**, which has no icon at all — `nativeDistributions` names none and `Main.kt`'s
+ `Window` passes none, so the installers, the dock and the title bar show Java's;
+- **`compose-multiplatform.xml`**, the in-app logo, which is still the previous brand's black
+ mark on `#FF3A1A` and is drawn in the middle of every QR code the app shows (`QRCodeView`).
+
+It was written as a plan against `390d4bc3` and is **built**, one commit per phase, on
+`claude/giza-icon-ios-update-b2e5b4`. What is left is what this Linux machine cannot show: an
+Xcode build and the three iOS appearances on a phone, a `.dmg` and an `.msi`, and a camera reading
+a QR code with the new logo in it — the [status](#status) table says which phase each belongs to.
+It finishes Phase 5 of [giza-rebrand.md](./giza-rebrand.md) for the platforms that phase left on
+the old assets.
+
+## What there is to work from
+
+The designer delivered five files. Only two are needed:
+
+| file | what it is | used for |
+|---|---|---|
+| `Desert Sphinx App Icon - Transparent Cutouts.svg` | the sand path alone, `fill-rule="evenodd"`, transparent everywhere else | **the master.** Every output below is rendered from it |
+| `iOS Desert Sphinx App Icon 1024.png` | the same path at 1:1 on `#080A09`, opaque RGB, 1024 px | the reference for the iOS composition; not committed |
+| `Two-Color Desert Sphinx App Icon.svg` | the path on a `#080A09` rect | not needed — the master plus a background colour is the same picture |
+| `Two-Color … - Transparent.svg` | sand and `#080A09` interior, transparent outside | not needed |
+| `Blackj … Transparent Cutouts.svg` | the master's path filled `#000000` | not needed — Android's monochrome layer already is this |
+
+The path in the master is byte-for-byte the path in Android's `ic_launcher_foreground.xml` once
+its spaces become commas. That is the property this plan keeps: **one path, one sand, one
+background, every platform.** A later redraw is then one file and one script run.
+
+Facts about the artwork that the compositions below depend on, measured from the path (the last
+one was found while building Phase 1, and corrects what the first draft of this plan said):
+
+- its bounding box in the 1024 viewport is x 122–901, y 89–939: 779 × 850, centred on (512, 514);
+- it is taller than it is wide, so height is the dimension that hits a mask first;
+- Android draws it at 0.5793 of the viewport (`translate 218.13, 215.38`), so it is 492 px tall
+ in 1024 — inside the adaptive icon's 66 dp safe circle;
+- it has no holes in the geometric sense. Its thirteen sub-paths all wind the same way and none
+ lies inside another: the disc is one outline that runs in and out around the cutouts rather
+ than a circle with shapes subtracted. So the fill rule does not matter -- ImageMagick renders it
+ identically under `evenodd` and `nonzero` -- and the master's `fill-rule="evenodd"` is kept only
+ because it costs nothing and is what the designer wrote. A later redraw that *does* nest its
+ holes would depend on it, which is one reason Phase 2's test samples a cutout.
+
+## Decisions
+
+Each has a recommendation, and the phases are written to it.
+
+| | question | recommended | alternative |
+|---|---|---|---|
+| **I1** | The background: Android's `#000000` or the designer's `#080A09`? | **`#000000`**, Android's. The two are 8/255 apart and indistinguishable on a home screen; what is visible is iOS and Android disagreeing in a screenshot of both. The designer's value is recorded here in case a later brief wants it back — it is one constant in the script | `#080A09` everywhere, which means re-running Android's foreground too |
+| **I2** | iOS composition: the designer's 1:1 (art 83 % of the height) or Android's 0.579? | **1:1**, as the designer composed the iOS file. The iOS mask is a squircle, not a circle, and nothing in the art comes nearer its edge than the beard's tip, 85 px above the bottom; the flares by the corners clear the corner curve by more than 180 px | Android's scale, which leaves a small sphinx in a lot of black on a 60 pt icon |
+| **I3** | macOS shape | **Apple's Big Sur grid**: an 824 px black rounded square (radius 185) centred in a transparent 1024 canvas, the art inside it. A full-bleed square sits in the dock as the only square icon there | full bleed |
+| **I4** | Rename `compose-multiplatform.xml`? | **No.** It is the name asked for, and one call site imports it. A rename to `giza_logo` is a two-line change any time later | rename now |
+
+## Phase 0 — baseline and the master
+
+1. **Bring Android in.** This branch was cut at `390d4bc3`; `a4f54ad4` is on `giza` after it.
+ Merge `giza` so the Android icon is in the tree the other platforms are matched against.
+2. **Commit the master** as `docs/brand/giza-sphinx.svg` — the *Transparent Cutouts* file,
+ unchanged. `docs/brand/` is outside `composeApp` and `iosApp`, so neither the build nor the
+ brand audit reads it; it is the source the generator reads.
+3. **Pin the sameness.** Normalise the master's `d` (spaces to commas) and compare it with the
+ `pathData` in `ic_launcher_foreground.xml` and `ic_launcher_monochrome.xml`. Equal is the
+ expected result; if they differ, stop and ask which is current before going on.
+4. **Baseline.** Record `./gradlew :composeApp:m3Audit` and the `jvmTest` run/failed/skipped
+ counts, so Phase 5 can say nothing moved.
+
+**Done when** the master is committed, its path equals Android's, and the baseline is written down
+in this document's status table.
+
+## Phase 1 — one generator for every output
+
+`docs/scripts/app-icons.py`: Python 3 standard library plus ImageMagick's `convert` (present on
+this Linux machine as 6.9.12; `brew install imagemagick` on a mac). ImageMagick's own SVG
+renderer draws the master correctly — a 256 px probe rendered every cutout.
+No cairosvg, Pillow or Inkscape, none of which is installed here.
+
+It reads `docs/brand/giza-sphinx.svg`, takes two constants — `SAND = "#D2AB5E"`,
+`BACKGROUND = "#000000"` (I1) — and writes:
+
+| output | composition | format |
+|---|---|---|
+| `iosApp/…/AppIcon.appiconset/AppIcon-light.png` | art 1:1 on `BACKGROUND`, full bleed (I2) | 1024², **RGB, no alpha** |
+| `…/AppIcon-dark.png` | art 1:1 in sand on transparent | 1024², RGBA |
+| `…/AppIcon-tinted.png` | art 1:1 in white on `BACKGROUND` | 1024², grayscale |
+| `composeApp/desktop-icons/giza.icns` | Big Sur plate (I3): 824² rounded square, radius 185, centred; art scaled to 0.68 and centred on the plate | ICNS, PNG payloads |
+| `composeApp/desktop-icons/giza.ico` | the same plate, but filling the canvas (radius 12 %), art at 0.80 | ICO, 16 20 24 32 40 48 64 256 |
+| `composeApp/desktop-icons/giza.png` | as the `.ico` | 512², RGBA |
+| `composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml` | `BACKGROUND` square, art 1:1 (Phase 2) | vector XML |
+
+Three things in it are not obvious:
+
+- **The light icon must have no alpha channel at all**, not merely an opaque one: App Store
+ Connect rejects a 1024 marketing icon with alpha. Flatten with `-alpha remove -alpha off` and
+ assert `identify -format %[channels]` says `srgb`.
+- **ICNS is written by the script**, because `iconutil` exists only on macOS and ImageMagick 6
+ cannot write it. The format is a `icns` header and length followed by chunks of four-byte type,
+ four-byte big-endian length and a PNG: `ic07` 128, `ic08` 256, `ic09` 512, `ic10` 1024,
+ `ic11` 32, `ic12` 64, `ic13` 256, `ic14` 512 — about forty lines of `struct.pack`.
+- **The vector XML is generated, not hand-edited**, from the same `d`, so it cannot drift from
+ the PNGs. Compose's vector parser takes SVG path syntax as Android's does.
+
+The 0.68 and 0.80 are starting values: the script prints a contact sheet
+(`scratch/app-icons-sheet.png`, not committed) of every output at every size, and the values are
+settled by looking at it. At 16 and 20 px the stripes will close up; that is acceptable for a
+taskbar glyph, and if it is not, the fix is a simpler path for the two smallest ICO entries, not
+a different scale.
+
+**Done when** one run of the script, from a clean tree, writes every file in the table and a second
+run changes none of them.
+
+## Phase 2 — `compose-multiplatform.xml`
+
+The drawable becomes:
+
+```xml
+
+
+
+
+```
+
+— the same shape as the file it replaces (a full background square, then the mark), with the old
+`#FF3A1A` and black swapped for black and sand. That keeps `QRCodeView` unchanged: its logo
+painter already fills the rect it is given and `QRCodeBackgroundPainter`'s `bluePill` behind it
+is covered, exactly as it is today. The logo's share of the code (`size = 0.3f`, natural padding)
+does not change, so neither does what the code's error correction has to absorb.
+
+The colours are literals in a resource, not in Kotlin, so the m3 colour budget does not see them,
+and they are the brand's own values rather than a role standing in for one — the same position
+as Android's launcher XML.
+
+**A test, because a wrong logo fails silently.** `AppLogoDrawableJvmTest` in `jvmTest` composes
+`Image(painterResource(Res.drawable.compose_multiplatform))` at 256 px with
+`runDesktopComposeUiTest`, captures it, and asserts four pixels against ImageMagick's 256 px
+render of the master: sand in the face and in the disc, black in a cutout inside the disc (the
+band between the left lappet's stripes) and black in the corner. A drawable regenerated from a
+different master, a dropped background, or a future master whose nested holes lose their fill
+rule each moves one of them.
+
+**Done when** the QR codes in the app show the sphinx on black, a phone camera still reads one in
+light and in dark theme, and the test passes.
+
+## Phase 3 — iOS
+
+1. **Replace the files.** Delete `Icon-App-1024(1).png` and `Icon-App-1024 1.png`; add the three
+ from Phase 1. The new names say which appearance each is for, which the old ones did not.
+2. **`Contents.json`**:
+
+ ```json
+ {
+ "images" : [
+ { "filename" : "AppIcon-light.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" },
+ { "appearances" : [ { "appearance" : "luminosity", "value" : "dark" } ],
+ "filename" : "AppIcon-dark.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" },
+ { "appearances" : [ { "appearance" : "luminosity", "value" : "tinted" } ],
+ "filename" : "AppIcon-tinted.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" }
+ ],
+ "info" : { "author" : "xcode", "version" : 1 }
+ }
+ ```
+
+ `ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon` is already set in both configurations of
+ `project.pbxproj`; nothing there changes.
+3. **Why each appearance is what it is.**
+ - *Light* is the designer's iOS composition, opaque.
+ - *Dark* is the art on transparency because iOS 18 and later draw their own dark gradient
+ behind a dark icon; an opaque black one would be a black square on it.
+ - *Tinted* is grayscale because the system tints by luminance: white art gives the full tint,
+ black gives none. Filling the slot rather than leaving it empty stops iOS deriving a tinted
+ icon from the light one, which would tint the background and lose the mark.
+
+**Done when** an iOS build installs with the sphinx on the home screen in light, dark and tinted
+(Settings › Home Screen › Customise), in Spotlight and in the app switcher, and an archive
+validates in Xcode's Organizer without an icon warning. This needs a mac; nothing in this phase
+can be checked here beyond the PNGs' channels and sizes.
+
+## Phase 4 — desktop
+
+1. **Installers.** In `composeApp/build.gradle.kts`, inside `nativeDistributions`:
+
+ ```kotlin
+ macOS {
+ iconFile.set(project.file("desktop-icons/giza.icns"))
+ }
+ windows {
+ iconFile.set(project.file("desktop-icons/giza.ico"))
+ upgradeUuid = "43e5b023-66d9-4c8c-ad31-efe28a96286b" // unchanged; see its comment
+ }
+ linux {
+ packageName = "giza"
+ iconFile.set(project.file("desktop-icons/giza.png"))
+ }
+ ```
+
+ The existing `windows` and `linux` blocks gain one line each; the `upgradeUuid` comment stays
+ where it is.
+2. **The window.** `Main.kt`'s `Window` takes
+ `icon = painterResource(Res.drawable.compose_multiplatform)`. That is the title bar and taskbar
+ on Windows and on X11. It is the same drawable as the QR logo, which is the point: one in-app
+ mark. A vector painter is rasterised by Compose at each size the platform asks for.
+3. **What the window icon does not reach**, so nobody spends an afternoon on it: the macOS dock
+ takes its icon from the bundle's `.icns`, so `./gradlew run` on a mac still shows Java's there
+ (`java.awt.Taskbar.iconImage` would fix that for development runs and is not worth adding).
+ GNOME on Wayland ignores window icons and matches the window to a `.desktop` file, which only
+ an installed `.deb` has.
+
+**Done when** the `.deb` installs with the sphinx in the application grid and dock, `./gradlew run`
+shows it in the title bar on Windows or X11, and a `.dmg` built on a mac shows it in Finder, the
+dock and ⌘-Tab. `packageDeb` can be checked on this machine; the `.dmg` and `.msi` need theirs.
+
+## Phase 5 — checks and the record
+
+1. `./gradlew check` — which runs `m3-audit`, `brand-audit`, `wallet-audit` and the Magpie lock
+ audit — passes with the Phase 0 numbers unchanged. The only Kotlin touched is one argument in
+ `Main.kt` and one test.
+2. `./gradlew :composeApp:jvmTest` passes with one more test than Phase 0's count.
+3. `./gradlew :composeApp:compileDebugKotlinAndroid` — Android is untouched, but the drawable is
+ in `commonMain` and Android compiles it too.
+4. Add this document to `docs/README.md`, and add one line under Phase 5 of
+ `giza-rebrand.md` pointing here as the place the icon was finished.
+5. Fill in the status table below, phase by phase, saying for each device check whether it was
+ done or what it is waiting for.
+
+## Not in this plan
+
+- **Icon Composer (`.icon`) for iOS 26's Liquid Glass.** Asset-catalogue icons still ship on iOS
+ 26, and the system applies its own glass treatment to them. A layered `.icon` would give the
+ system the sand and the black separately; it needs Xcode 26 and a mac, and is its own change.
+- **macOS 26's squircle enclosure.** macOS 26 sets icons it does not recognise as conforming on a
+ grey squircle. The Big Sur plate (I3) is the shape it expects, but whether a jpackage `.icns`
+ without an asset catalogue escapes the enclosure is something only a mac on 26 can say. If it
+ does not, the remedy is an asset catalogue in the bundle, which jpackage does not build.
+- **`AccentColor`.** It is empty (the system blue) and tints only SwiftUI chrome, of which the app
+ has none outside `ContentView`. Setting it to sand is a one-line change for whoever wants it.
+- **The Play Store icon and Android's mipmaps** — done in `a4f54ad4`.
+
+## Status
+
+| phase | state |
+|---|---|
+| 0 | done. `giza` merged in (`a4f54ad4`, Android's icon). The master is `docs/brand/giza-sphinx.svg`, the designer's *Transparent Cutouts* file unchanged; its path equals the `pathData` of both `ic_launcher_foreground.xml` and `ic_launcher_monochrome.xml`, 1,567 characters each. Baseline at `e00d0f80`: `jvmTest` 1,407 run, 0 failed, 0 skipped; `m3Audit` all budgets met, adaptive APIs 12 (floor 12), navigation components 2 (floor 2). Measuring the path also showed its thirteen sub-paths are disjoint, so the fill rule is not load-bearing; the facts above say so |
+| 1 | done. `docs/scripts/app-icons.py`, with `--only ios|desktop|xml`, `--root` (to write somewhere other than the tree) and `--sheet`. Run twice into two scratch roots it wrote byte-identical files. The light icon is RGB with no alpha, the dark RGBA, the tinted grayscale; the `.ico` holds eight entries, 256 as PNG; the `.icns` parses as eight PNG chunks, `ic07`–`ic14`, with the sizes the table names. The contact sheet left 0.68 and 0.80 as they were: the stripes stay apart down to 32 px and merge, as expected, at 16 |
+| 2 | built. `compose-multiplatform.xml` is generated (`--only xml`): a black square and the sand mark, with a comment naming the script and the master. `AppLogoDrawableJvmTest` passes, and fails at line 54 when the previous drawable is put back. **Not yet checked:** a phone camera reading a QR code with the new logo, in light and dark theme — the logo covers the same share of the code as before |
+| 3 | built. The two old PNGs are gone; `AppIcon-light.png` (RGB, no alpha), `AppIcon-dark.png` (RGBA) and `AppIcon-tinted.png` (grayscale), each 1024², are generated (`--only ios`) and named in `Contents.json`. Nothing in `project.pbxproj` named the old files. **Not yet checked, for want of a mac:** an Xcode build, the home screen in light, dark and tinted, and Organizer's validation of an archive |
+| 4 | built. `composeApp/desktop-icons/giza.{icns,ico,png}` are generated (`--only desktop`) and named by `macOS`, `windows` and `linux` under `nativeDistributions`; `Main.kt`'s `Window` takes the in-app logo as its icon. `packageDeb` succeeds on Linux, and the `.deb` carries `opt/giza/lib/Giza.png` byte-identical to `giza.png`, with `giza-Giza.desktop` pointing `Icon=` at it. **Not yet checked:** the package installed and seen in a launcher (it needs root), the window icon on Windows or X11, and a `.dmg` or `.msi`, which need their own machines |
+| 5 | done on Linux. `./gradlew check` passes — `m3Audit` all budgets met with adaptive APIs 12 and navigation components 2 (the Phase 0 numbers), `brandAudit` 0, `walletAudit` 0, the Magpie lock 0 problems. `jvmTest` 1,408 run, 0 failed, 0 skipped: Phase 0's 1,407 and `AppLogoDrawableJvmTest`. `compileDebugKotlinAndroid` succeeds. Still to be seen on devices: Phase 2's QR scan, Phase 3 on a mac and a phone, Phase 4's installed `.deb`, `.dmg` and `.msi` |
diff --git a/docs/giza-rebrand.md b/docs/giza-rebrand.md
index 9f3494dc..781e8ead 100644
--- a/docs/giza-rebrand.md
+++ b/docs/giza-rebrand.md
@@ -331,6 +331,10 @@ the other phases touch.
**Done when** the launcher, home screen, app switcher and installer show Giza's icon on every
platform, and `:composeApp:jvmTest` (contrast) passes.
+The icon itself — the desert sphinx — went onto Android in `a4f54ad4`, and onto iOS, desktop and
+the in-app logo by [giza-app-icon.md](./giza-app-icon.md), which records what is still to be seen
+on devices.
+
## Phase 6 — tooling, documents and a guard
1. **Regtest.** `BENNU_REGTEST` → `GIZA_REGTEST`; the `bennuRegtest` task input →
diff --git a/docs/scripts/app-icons.py b/docs/scripts/app-icons.py
new file mode 100755
index 00000000..3ad62190
--- /dev/null
+++ b/docs/scripts/app-icons.py
@@ -0,0 +1,213 @@
+#!/usr/bin/env python3
+"""Render every app icon outside Android from the one master SVG.
+
+The master is docs/brand/giza-sphinx.svg: the sphinx as one evenodd path in sand, with
+nothing behind it. Android's launcher layers carry the same path (docs/giza-app-icon.md,
+Phase 0), and everything written here is that path, the sand, and one background colour,
+composed per platform:
+
+ ios iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-{light,dark,tinted}.png
+ desktop composeApp/desktop-icons/giza.{icns,ico,png}
+ xml composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml
+
+Needs Python 3 and ImageMagick's `convert` (6 or 7) and `montage` (for --sheet). Nothing
+else: ImageMagick's own SVG renderer draws the master correctly, and the .icns is written
+here because `iconutil` exists only on macOS.
+
+The output is deterministic -- PNGs are written without their date and time chunks -- so a
+second run over an unchanged master leaves the tree clean.
+
+Usage: app-icons.py [--only ios|desktop|xml ...] [--root DIR] [--sheet FILE]
+
+ --root where to write, as a repository root (default: this repository). Point it at a
+ scratch directory to look at the output without touching the tree.
+ --sheet also write a contact sheet of every output at the sizes it is shown at.
+"""
+import argparse, os, re, shutil, struct, subprocess, sys, tempfile
+
+REPO = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
+MASTER = os.path.join(REPO, 'docs', 'brand', 'giza-sphinx.svg')
+
+# The brand's two colours (docs/giza-app-icon.md, I1). BACKGROUND is Android's launcher
+# background, #000000; the designer's files use #080A09, eight steps away.
+SAND = '#D2AB5E'
+BACKGROUND = '#000000'
+
+# The art's bounding box in the 1024 viewport is x 122-901, y 89-939, so its centre is here.
+# Scaling about it keeps the mark where the eye expects it on a plate.
+ART_CENTRE = (511.5, 514.0)
+
+# macOS: Apple's Big Sur grid, an 824 px rounded square centred in 1024 (I3).
+MAC_PLATE, MAC_RADIUS, MAC_ART = 824, 185, 0.68
+# Windows and Linux: a plate filling the canvas, gently rounded.
+DESK_RADIUS, DESK_ART = 123, 0.80
+
+IOS_DIR = os.path.join('iosApp', 'iosApp', 'Assets.xcassets', 'AppIcon.appiconset')
+DESK_DIR = os.path.join('composeApp', 'desktop-icons')
+XML_PATH = os.path.join('composeApp', 'src', 'commonMain', 'composeResources', 'drawable',
+ 'compose-multiplatform.xml')
+
+ICO_SIZES = [256, 64, 48, 40, 32, 24, 20, 16]
+# ICNS chunk types with PNG payloads, and the pixel size of each.
+ICNS_CHUNKS = [(b'ic07', 128), (b'ic08', 256), (b'ic09', 512), (b'ic10', 1024),
+ (b'ic11', 32), (b'ic12', 64), (b'ic13', 256), (b'ic14', 512)]
+
+# Written without timestamps, so reruns are byte-identical.
+PNG_STABLE = ['-strip', '-define', 'png:exclude-chunks=date,time']
+
+
+def master_path():
+ svg = open(MASTER, encoding='utf-8').read()
+ m = re.search(r'\sd="([^"]+)"', svg)
+ if not m or 'evenodd' not in svg:
+ sys.exit(f'{MASTER}: expected one path with fill-rule="evenodd"')
+ return m.group(1)
+
+
+def art(d, fill, scale=1.0):
+ if scale == 1.0:
+ transform = ''
+ else:
+ cx, cy = ART_CENTRE
+ transform = (f' transform="translate({512 - scale * cx:.4f} {512 - scale * cy:.4f})'
+ f' scale({scale})"')
+ return f''
+
+
+def svg(*body):
+ return ('')
+
+
+def plate(size, radius):
+ o = (1024 - size) / 2
+ return (f'')
+
+
+def convert(*args):
+ subprocess.run(['convert', *args], check=True)
+
+
+def render(tmp, name, document):
+ """Rasterise an SVG document to a 1024 RGBA PNG and return its path."""
+ src = os.path.join(tmp, name + '.svg')
+ out = os.path.join(tmp, name + '.png')
+ with open(src, 'w', encoding='utf-8') as f:
+ f.write(document)
+ # msvg: ImageMagick's built-in renderer, so the result does not depend on whether an
+ # rsvg delegate happens to be installed.
+ convert('-background', 'none', 'msvg:' + src, *PNG_STABLE, 'PNG32:' + out)
+ return out
+
+
+def resized(src, size, out):
+ convert(src, '-filter', 'Lanczos', '-resize', f'{size}x{size}', *PNG_STABLE,
+ 'PNG32:' + out)
+ return out
+
+
+def write_ios(d, root, tmp):
+ out = os.path.join(root, IOS_DIR)
+ os.makedirs(out, exist_ok=True)
+ full = plate(1024, 0)
+
+ # Light: no alpha channel at all, which App Store Connect requires of the 1024 icon.
+ light = render(tmp, 'ios-light', svg(full, art(d, SAND)))
+ convert(light, '-background', BACKGROUND, '-alpha', 'remove', '-alpha', 'off',
+ *PNG_STABLE, 'PNG24:' + os.path.join(out, 'AppIcon-light.png'))
+
+ # Dark: the art alone; iOS draws its own dark backdrop behind a dark icon.
+ dark = render(tmp, 'ios-dark', svg(art(d, SAND)))
+ shutil.copyfile(dark, os.path.join(out, 'AppIcon-dark.png'))
+
+ # Tinted: grayscale, since iOS tints by luminance -- white art takes the full tint.
+ tinted = render(tmp, 'ios-tinted', svg(full, art(d, '#FFFFFF')))
+ convert(tinted, '-background', BACKGROUND, '-alpha', 'remove', '-alpha', 'off',
+ '-colorspace', 'Gray', '-define', 'png:color-type=0', *PNG_STABLE,
+ os.path.join(out, 'AppIcon-tinted.png'))
+ return [os.path.join(out, n) for n in ('AppIcon-light.png', 'AppIcon-dark.png',
+ 'AppIcon-tinted.png')]
+
+
+def write_icns(master, path, tmp):
+ chunks = b''
+ for kind, size in ICNS_CHUNKS:
+ png = resized(master, size, os.path.join(tmp, f'icns-{size}.png'))
+ data = open(png, 'rb').read()
+ chunks += kind + struct.pack('>I', 8 + len(data)) + data
+ with open(path, 'wb') as f:
+ f.write(b'icns' + struct.pack('>I', 8 + len(chunks)) + chunks)
+
+
+def write_desktop(d, root, tmp):
+ out = os.path.join(root, DESK_DIR)
+ os.makedirs(out, exist_ok=True)
+
+ mac = render(tmp, 'mac', svg(plate(MAC_PLATE, MAC_RADIUS), art(d, SAND, MAC_ART)))
+ write_icns(mac, os.path.join(out, 'giza.icns'), tmp)
+
+ desk = render(tmp, 'desk', svg(plate(1024, DESK_RADIUS), art(d, SAND, DESK_ART)))
+ resized(desk, 512, os.path.join(out, 'giza.png'))
+
+ # One resize per entry from the 1024 render, rather than letting the ico writer scale.
+ entries = [resized(desk, s, os.path.join(tmp, f'ico-{s}.png')) for s in ICO_SIZES]
+ convert(*entries, *PNG_STABLE, os.path.join(out, 'giza.ico'))
+ return [mac, desk]
+
+
+def write_xml(d, root):
+ path = os.path.join(root, XML_PATH)
+ os.makedirs(os.path.dirname(path), exist_ok=True)
+ xml = f'''
+
+
+
+
+
+'''
+ with open(path, 'w', encoding='utf-8') as f:
+ f.write(xml)
+
+
+def write_sheet(path, ios, desktop, tmp):
+ """Every output at the sizes it is seen at, on a mid grey so plates and cutouts show."""
+ tiles = []
+ for src in ios + desktop:
+ for size in (180, 64, 32, 16):
+ tiles.append(resized(src, size, os.path.join(tmp, f'sheet-{len(tiles)}.png')))
+ subprocess.run(['montage', *tiles, '-background', '#808080', '-geometry', '+8+8',
+ '-tile', '4x', '-gravity', 'center', path], check=True)
+
+
+def main():
+ ap = argparse.ArgumentParser(description=__doc__.split('\n')[0])
+ ap.add_argument('--only', nargs='+', choices=['ios', 'desktop', 'xml'])
+ ap.add_argument('--root', default=REPO)
+ ap.add_argument('--sheet')
+ a = ap.parse_args()
+ if shutil.which('convert') is None:
+ sys.exit('ImageMagick `convert` is not on the PATH')
+ only = set(a.only or ['ios', 'desktop', 'xml'])
+ d = master_path()
+
+ with tempfile.TemporaryDirectory() as tmp:
+ ios = write_ios(d, a.root, tmp) if 'ios' in only else []
+ desktop = write_desktop(d, a.root, tmp) if 'desktop' in only else []
+ if 'xml' in only:
+ write_xml(d, a.root)
+ if a.sheet:
+ write_sheet(a.sheet, ios, desktop, tmp)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-dark.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-dark.png
new file mode 100644
index 00000000..6bff7660
Binary files /dev/null and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-dark.png differ
diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-light.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-light.png
new file mode 100644
index 00000000..6ce01419
Binary files /dev/null and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-light.png differ
diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-tinted.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-tinted.png
new file mode 100644
index 00000000..f08b84af
Binary files /dev/null and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/AppIcon-tinted.png differ
diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json
index 7c77d09d..0cca95d9 100644
--- a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,7 +1,7 @@
{
"images" : [
{
- "filename" : "Icon-App-1024(1).png",
+ "filename" : "AppIcon-light.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
@@ -13,7 +13,7 @@
"value" : "dark"
}
],
- "filename" : "Icon-App-1024 1.png",
+ "filename" : "AppIcon-dark.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
@@ -25,6 +25,7 @@
"value" : "tinted"
}
],
+ "filename" : "AppIcon-tinted.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Icon-App-1024 1.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Icon-App-1024 1.png
deleted file mode 100644
index 3f45c7e6..00000000
Binary files a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Icon-App-1024 1.png and /dev/null differ
diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Icon-App-1024(1).png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Icon-App-1024(1).png
deleted file mode 100644
index 70f1617f..00000000
Binary files a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Icon-App-1024(1).png and /dev/null differ