Add an app icon per accent theme !49

merged merged by cmc on 2026-10-26 03:54 UTC · krz/domain-dig:alternate-app-icons into main

Discussion

cmc

W13's other half, which was blocked on artwork the project did not have.

The artwork is generated by Scripts/make-app-icons.swift rather than drawn, so it is reproducible and reviewable as source instead of four opaque PNGs. Re-run it and you get byte-identical output.

The mark is the namespace. The DNS is a tree from the root down, which is what the app actually reads. The first thing I drew was a magnifying glass over some strata; you were right to reject it — that says "search", which is not the same thing and is every other icon in the category. Only the ground colour changes between the four, so they read as one app.

This replaces the primary icon, not just adds alternates. domaindig.png is gone.

The icon follows the accent rather than being a second picker. iOS shows its own "You have changed the icon" alert on every change and there is no public way to suppress it, so two pickers would mean two alerts for what a user thinks of as one choice. AppIconController.apply is idempotent and runs on launch as well as on change, which is what reverts the icon when a lapsed tier drops the accent back to default.

Wired through the asset catalog — ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES plus INCLUDE_ALL_APPICON_ASSETS — so there is no hand-written CFBundleIcons. Verified in the built bundle rather than assumed: the plist carries all three alternates under CFBundleAlternateIcons, and Assets.car holds all four icon assets.

The names are matched as strings at runtime, so a typo fails the same silent way a wrong colorset name would. Two tests check parity in both directions, as the theme tokens do.

377 tests green on iOS 18.6 and 27.0. Ratchet unchanged at 280.

About the audit output on the push. The newly-installed pre-push hook reported an enforced [FAIL][dynamicType] on EditButton for the tracked-domains screen. It is not from this change. The same test passes with 1 finding against a clean store and reports 6 with a seeded test ahead of it in the same invocation, because AccessibilityAuditHarness never resets the app's store between launches — so the "empty-state" screens are not reliably empty and the enforced suite's result depends on execution order. The second commit records that in Docs/ACCESSIBILITY.txt with the measurement; fixing it is a harness change rather than a view change, and it would also let the recent-searches gap recorded earlier be audited deliberately.