Generate FjordIcons from the union of per-app usage lists (GRD-490) #2
Loading…
Reference in a new issue
No description provided.
Delete branch "stephen/grd-490-icon-union"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GRD-490. The kit's
FjordIconswas the subset of upstreamfjord-iconsthat fjord-ios uses. It is now generated from the union of the per-app usage lists, so a second app adds its list instead of vendoring its own icons.Config/icons-usage/<app>.jsonper consuming app (fjord-ios.jsonmoved here from fjord-ios'sConfig/fjord-icons.json, unchanged) andConfig/fjord-icons-revision(the pinned upstream commit, moved from fjord-ios).Scripts/update-icons.sh ../fjord-iconsmerges the lists (Scripts/icons_union.py: sorted, deduplicated, a concept key such asutility/gearcovers its sized keys), runs the upstreamscripts/package_usage.pyat the pinned commit, and writesSources/FjordIconsandmanifest.json. Upstream fails on an unknown key, which catches a typo in a list.f3c80edfwith only the fjord-ios list, the generatedSources/FjordIconsis byte for byte what 0.1.0 shipped.manifest.jsonchanges in one field:appis nowfjord-apple-kitinstead offjord-ios. This also settles the layout the fjord-ios script only guessed at:dist/<app>/swiftui/Sources/FjordIconsplusdist/<app>/manifest.json.Icon usage lists, no Mac queued) runs the union tests andScripts/check_icons_usage.py: every listed icon is carried, the kit carries nothing unlisted, andmanifest.json,FjordIconKey.swiftand the asset catalog agree.Config/icons-usage/<slug>.jsonplus a regenerate (README, Icons section).Config/fjord-icons.json,Config/fjord-icons-revisionandScripts/update-fjord-icons.shand updates the docs.Known edge cases (follow-up): CI proves the list, manifest, sources and assets agree with each other, not that they match the pinned upstream byte for byte, so a hand-edited SVG with consistent names passes; recording the upstream revision in the manifest would close that. Not added here.
Automated Codex review (read-only) of head
3ecee05f22.Low
.swiftformat:1,Scripts/update-icons.sh:39. Invariant: copy and behavior match (standards 11), and generation is reproducible. The PR adds a repo-wide.swiftformatthat the body never mentions. The generated Swift is only byte-identical to 0.1.0 ifswiftformatran.update-icons.shonly warns and exits 0 whenswiftformatis missing. A contributor without it commits unformattedFjordIconKey.swiftand similar files.check_icons_usage.pyonly regex-matches thecaselines, so CI stays green and formatting drift lands in the kit..swiftformatin the body. Fail the script, or add a flag to opt out, whenswiftformatis absent. Alternatively have the CI check ignore formatting explicitly.Low (process) PR body. The body has no "Failure paths" or "Fix scope" section (standards header, items 14 and 18). Two failure paths are worth stating:
update-icons.shcan stop partway:rsync --deletesucceeds andcp manifest.jsonthen fails. CI catches the resulting disagreement.Low (deferral, unchanged) The body already defers that CI proves only internal agreement and not a byte match with upstream. This diff gives no new evidence, so I am not re-raising it as blocking.
I did not run
check_icons_usage.pyor the union tests, because the sandbox denied Python execution. I read the code instead. The manifest uses<concept>/16and<concept>/24keys (for exampleci/passed/16), which matchesexpand().update-icons.shchecks the pinned revision and a clean upstream tree before generating. I found no correctness, security or data-loss problem on the normal path.BLOCKING: 0
Reviewed head
3ecee05f22at 2026-11-19T02:20:28Z by claude -p, read-only tools (Codex unavailable).