Skip to content

web: PWA manifest so the UI installs as a standalone app - #32

Open
vynulldev wants to merge 1 commit into
mainfrom
pwa
Open

web: PWA manifest so the UI installs as a standalone app#32
vynulldev wants to merge 1 commit into
mainfrom
pwa

Conversation

@vynulldev

Copy link
Copy Markdown
Owner

What & why

A manifest, two PNG icons rendered from the existing favicon, and three head links (manifest, theme-color, apple-touch-icon) let browsers install the web UI as an app: fullscreen from a home-screen icon on a phone at the booth, its own window and dock icon on desktop. The standalone display mode drops all browser chrome, and the theme colors keep the launch splash on the UI's dark palette instead of flashing white. Everything is embedded in the binary like the rest of the web assets, so the UI stays CDN-free on the offline link-local network.

Two deliberate omissions, both documented in web.go. No service worker: the UI is meaningless without the live server, so offline caching would only mislead — an installed app that opens to a stale library with nothing working is worse than a connection error. Some browsers gate their automatic install banner on a service worker; manual add-to-home-screen and Chromium's install menu work without one, and that trade is the right one for this app. And no maskable icon claim: the icon has no safe-zone padding, and claiming maskable without it gets the artwork clipped by launcher masks — plain icons render correctly everywhere. The apple-touch-icon link covers iOS, which ignores manifests for home-screen icons.

Verified against a live server: /manifest.json serves with the manifest content type and parses in Chromium the way a browser consumes it, both icons serve as correctly-sized PNGs, and the head carries the manifest link and theme-color. The install ceremony itself can't be exercised headless — worth one add-to-home-screen on a phone against a running instance to see it launch fullscreen.

Hardware testing

  • Tested on: N/A: no deck-facing change. Web UI assets and three new HTTP routes only; nothing on the Pro DJ Link side is touched.

Checklist

  • go build ./..., go vet ./..., and go test ./... pass
  • gofmt -l . is clean
  • New source files carry an SPDX header (GPL-3.0-or-later) (n/a — new files are JSON/PNG assets)
  • Tested on real hardware (deck + firmware noted above), or this change doesn't affect deck behaviour
  • I agree my contribution is licensed under the project's GPLv3

A manifest, two PNG icons rendered from the existing favicon, and the
head links (manifest, theme-color, apple-touch-icon) let browsers
install the web UI as an app: fullscreen from a home-screen icon on a
phone at the booth, its own window and dock icon on desktop. The
standalone display mode drops all browser chrome, and the theme colors
keep the launch splash on the UI's dark palette.

No service worker on purpose: the UI is meaningless without the live
server, so offline caching would only mislead. Some browsers gate
their automatic install prompt on one; manual add-to-home-screen and
Chromium's install menu work without it, and that trade is
documented in web.go.

Verified against a live server: /manifest.json serves with the
manifest content type and parses in Chromium, both icons serve as
correctly-sized PNGs, and the head carries the manifest link and
theme-color.
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