Skip to content

Make the site installable and add an Install app button - #286

Merged
stesee merged 1 commit into
mainfrom
install-button
Oct 6, 2026
Merged

stesee merged 1 commit into
mainfrom
install-button

Conversation

@stesee

@stesee stesee commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

What changes

  • Web app manifest (static/manifest.webmanifest) with 192 and 512 px icons drawn from the logo, linked from every page. This is what makes browsers offer "Install app" / "Add to Home screen"; the site had none.
  • "📲 Install app" button in the homepage banner. It is rendered only while a Chromium browser offers its install prompt (beforeinstallprompt) and disappears once the prompt is used or the site is installed. Safari and Firefox never fire that event, so no button appears there.
  • Client module (src/clientModules/installPrompt.ts) that catches the event as soon as the bundle runs, because it fires before React hydrates.

Deliberately not included

No service worker: the installed app needs a connection, like the site itself.

How it was checked

  • npm run build and tsc pass.
  • Two new Playwright tests (manifest and icons are served; the button appears on a simulated install offer, raises the prompt and disappears) pass locally in Chromium, together with the existing ones. Firefox and WebKit run here in CI.
  • Chromium's installability check (Page.getInstallabilityErrors) reports no errors for the built site.
  • Not tested: a real install on a phone or on Windows.

A web app manifest with 192 and 512 px icons (drawn from the logo) makes
browsers offer "Install app" / "Add to Home screen". The homepage shows an
Install app button while a Chromium browser offers its install prompt; a
client module catches that event early, because it fires before React
hydrates. Safari and Firefox never fire it, so no button appears there.

No service worker: the installed app needs a connection, like the site.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 20:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stesee
stesee merged commit 63da48e into main Oct 6, 2026
1 check 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.

2 participants