Skip to content

feat: make the page addable to the phone's home screen - #18

Merged
subpathdev merged 1 commit into
mainfrom
feat/pwa-manifest
Nov 7, 2026
Merged

subpathdev merged 1 commit into
mainfrom
feat/pwa-manifest

Conversation

@subpathdev

Copy link
Copy Markdown
Owner

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, an apple-touch-icon (180 px) and a PNG favicon; adds apple-mobile-web-app-title and -status-bar-style. theme-color and apple-mobile-web-app-capable were already there.
  • Icons are drawn by internal/web/icon.go (//go:generate, stdlib only, reproducible, so CI's go generate + git diff check covers them).
  • web.go: registers application/manifest+json for .webmanifest, because the FROM scratch image has no /etc/mime.types (it was served as text/plain).
  • README: how to add it and what doesn't work over HTTP.

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.
  • Ran the binary locally against an unreachable broker: the manifest and icons load with the right types and sizes, no service worker, and the status shows "No broker".
  • Not checked on a phone. Over plain HTTP, Android Chrome doesn't install a WebAPK; "Add to home screen" makes a shortcut, which may open as a normal tab. iOS Safari should open it full-screen. Worth trying on both after the release.

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

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>
@subpathdev
subpathdev merged commit 04eca44 into main Nov 7, 2026
5 checks passed
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