Repository navigation
feat: make the page addable to the phone's home screen - #18
Merged
Merged
Conversation
Add a web app manifest, 192, 512 and 180 px icons and the apple-mobile-web-app meta tags, so the page opens full-screen with its own icon. There is no service worker: nothing is cached, so the page always shows the live state. The icons are drawn by internal/web/icon.go via go generate. The image is FROM scratch, so .webmanifest gets its MIME type registered in code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A colleague suggested making the page a PWA. A service worker needs HTTPS, and the page runs over plain HTTP on the LAN, so this is the low-cost step only: open full-screen from the home screen with an icon.
What
manifest.webmanifest: name, short_name,display: standalone,start_url: /, theme and background colour, 192 and 512 px icons (512 also as maskable).index.html: links the manifest, anapple-touch-icon(180 px) and a PNG favicon; addsapple-mobile-web-app-titleand-status-bar-style.theme-colorandapple-mobile-web-app-capablewere already there.internal/web/icon.go(//go:generate, stdlib only, reproducible, so CI'sgo generate+git diffcheck covers them).web.go: registersapplication/manifest+jsonfor.webmanifest, because theFROM scratchimage has no/etc/mime.types(it was served astext/plain).No service worker, no caching. Routes are unchanged: the files are served by the existing embedded
GET /, so the OpenAPI contract is untouched. The status dot logic is unchanged.How to validate
go vet,go test -race ./...and golangci-lint v2.15.0 pass locally. A new test checks the manifest's type and content, that every icon is a PNG of the stated size, and that the page registers no service worker.Risk
feat:releases a minor version on merge. Only static files and two meta tags change for the running page. Don't merge or bump the chart while a room is airing.Rollback
Revert the PR.
🤖 Generated with Claude Code