Skip to content

Render PNG app icons from favicon.svg - #403

Merged
tnkuehne merged 3 commits into
mainfrom
app-icon-pngs
Nov 25, 2026
Merged

tnkuehne merged 3 commits into
mainfrom
app-icon-pngs

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Apps that ship only /favicon.svg get PNG icons as regular assets: /apple-touch-icon.png (180 px on white, because iOS shows transparency as black), /icon-192.png and /icon-512.png. iOS requests the first at the root; the web app manifest lists all PNG icons an app has.
  • crates/platform-app-icons renders them with resvg 0.50.0 (default features off: no text, fonts, embedded raster images or references to other files), for SVGs up to 256 KiB, centered on a square.
  • The CLI renders them while collecting a deployment's assets and uploads them like files. An invalid SVG skips the icons with a warning instead of failing the deployment.
  • Template installs render them in the app builder through the same crate, built as platform-app-icons-wasm (POST /icons), next to the service documentation module. CI, the runtime image and hosted deployment build and ship the new module.
  • An app that ships any PNG icon (apple-touch-icon.png, favicon.png, icon-192.png, icon-512.png) keeps its icons unchanged. Rendering happens once per deployment, never on a visitor request, and adds nothing to the app runtime release.

New dependency: resvg (Rust, MIT/Apache-2.0), native in the CLI and as a 1.1 MB WebAssembly module in the app builder.

Checks

  • cargo test -p platform-app-icons -p platform-cli, cargo clippy --workspace --all-targets and for both wasm crates, cargo fmt --check.
  • RUN_BUILDER_TESTS=1 app builder suite in workerd (24 passed), including rendering and an invalid SVG.
  • Template install integration suite (10 passed): a template with only favicon.svg deploys the three rendered icons.
  • Runtime suites on celld (24) and workerd (73), pnpm check.
  • Rendered the Board app's and the Linear template's logos and checked them visually. Not checked: the builder's icon route on celld, and installing on real iOS and Android devices.

Docs: #394

RetriggerView in GreptileConfidence Score: 4/5

The earlier asset-limit issue has returned and should be fixed before merging.

Summary

Adds PNG icons rendered from /favicon.svg during CLI deployments and template installs.

  • CLI deployments create PNG icons from an app’s SVG icon.
  • Template installs render missing PNG icons before uploading app assets.
  • Web app manifests list every supported PNG icon an app supplies.

Reviews (3) · Last reviewed commit: "Drop the asset limit check for app icons" · Reviewed by Greptile

Home screens need PNG icons: iOS requests /apple-touch-icon.png and
Android installs from PNG manifest icons. An app that ships only
/favicon.svg now gets /apple-touch-icon.png (180 px, on white, since iOS
shows transparency as black), /icon-192.png and /icon-512.png as regular
assets, which the web app manifest lists.

crates/platform-app-icons renders them with resvg, without text, fonts,
embedded images or references to other files, for SVGs up to 256 KiB.
The CLI renders them while collecting assets for a deployment, and the
app builder renders them for template installs through the same crate
built as a WebAssembly module. Apps that ship any PNG icon keep their own.
Comment thread packages/app-builder/src/icons.ts Resolved
Comment thread crates/platform-cli/src/deploy.rs Resolved
Comment thread crates/platform-cli/src/deploy.rs Resolved
Template installs keep their assets when the builder cannot render the
SVG, as the CLI does. Neither path adds icons that would take a
deployment over 10,000 assets or 250 MiB. The CLI renders off the async
runtime, and the builder passes the SVG in after allocating its buffer,
since that allocation can grow and detach the module's memory.
@tnkuehne
tnkuehne merged commit b2d2475 into main Nov 25, 2026
15 of 16 checks passed
@tnkuehne
tnkuehne deleted the app-icon-pngs branch November 25, 2026 15:58
tnkuehne added a commit that referenced this pull request Nov 25, 2026
Template installs ask the builder for PNG app icons since #403. The e2e
builder parsed every request other than /document as a bundle request,
so the icon request failed and the template install test with it.
tnkuehne added a commit that referenced this pull request Nov 29, 2026
## Summary
- Adds **Install apps on phones and computers**: every Widefleet app
installs on iPhone, iPad, Android, Mac and Windows from the same
deployment. Covers the install steps per device (iPhone steps match the
**Open app** dialog on Home), the installed name, icons rendered from
`favicon.svg`, own icons or manifest, and that name and icon are
readable without signing in.
- **App development** says that every app installs on phones and
computers and links the guide, so readers looking for a phone app find
it.
- **Applications** keeps a short section that links the guide.

Documents #393, #403 and #405, released in v0.7.23.

## Checks
- `blume validate` and Oxfmt pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant