Skip to content

Offer to install apps from Home - #405

Merged
tnkuehne merged 4 commits into
mainfrom
install-element
Nov 25, 2026
Merged

tnkuehne merged 4 commits into
mainfrom
install-element

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Home: in Chrome and Edge on computers (HTMLInstallElement, on by default from Chrome 158), the first Open app asks Use as an app? The dialog holds the browser's own <install> button (labeled Install, or Launch when already installed), Open in browser and Don't ask again in this browser. After a successful install (installresult with success), the browser no longer asks for that app. Other browsers open the app as before.
  • Open app always stays a link: Chrome opens links into an installed app's window by itself, while <install> would first show its launch dialog.
  • Pages cannot read whether an app is installed, so the browser remembers installs from the dialog and the opt-out in localStorage; the opt-out is read on each click, so it applies to every card.
  • Runtime: cross-origin installs fetch the manifest without cookies, so /manifest.webmanifest and the icon paths (favicon.svg, apple-touch-icon.png, favicon.png, icon-192.png, icon-512.png) are served without sign-in. They are the uploaded files as they are (with 304 for a matching ETag), never through _redirects rules, so a catch-all rule cannot expose a page. Suspended organizations and apps without a web entry still get no answer. The generated manifest gains id: "/", and the injected link no longer needs crossorigin="use-credentials".
  • An app's name and icon are therefore readable by anyone who knows its hostname.
  • Includes the e2e builder fix from Answer icon requests in the e2e app builder #408.

Screenshots

Chrome 155 with --enable-blink-features=InstallElement, synthetic catalog app. Home itself is unchanged.

Home Dialog, light Dialog, dark Narrow window

The browser renders the button's icon and text and requires opaque colors, a 3:1 contrast and a minimum size; the page sets colors, radius, padding and font. isValid is true with no invalidReason in the dialog.

Checks

  • Runtime suites on celld (24) and workerd (73), including the manifest fetched without a cookie while the app page answers 401, an icon served as its file on an app whose rewrite rules send every path to a page, and a 304 for its ETag.
  • pnpm check; full e2e suite (76 passed); catalog test with the element enabled.
  • Not checked: a real install and launch from a deployed control plane in Chrome 158, Edge.

Docs: #394

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with a non-blocking loss of the reinstall control on Home.

Findings

  1. P2 Reinstall disappears from Home ▶

Summary

This PR offers app installation from Home and makes app manifests and icons readable without signing in.

  • Home offers a browser install prompt when someone opens an app.
  • App manifests and known icons are available to browsers without sign-in.

Reviews (3) · Last reviewed commit: "Keep Open app as the way into installed ..." · Reviewed by Greptile

Chrome and Edge on computers install another site's web app with the
<install> element. Opening an app from Home there first asks whether to
install it, with the browser's install button, opening it in the browser
instead, and not asking again in this browser. Once installed, the card
shows the element, which the browser labels Launch, in place of Open app.
Other browsers open the app as before.

Such installs fetch the manifest without cookies, so the runtime serves
an app's manifest and icons without sign-in: the uploaded files as they
are, never through rewrite rules, and the generated manifest with the
id "/".
Comment thread packages/app-runtime/src/web-app.ts Resolved
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 1e8dada Nov 25 2026, 05:08 PM

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.
Chrome opens links into an installed app's window by itself, while the
<install> element would first show its launch dialog. Open app stays a
link, and the question stops for an app once it was installed from it.
The dialog asks whether to use the app as an app, which fits both the
Install and the Launch label.
size="sm"
onclick={(event: MouseEvent) => {
// Read on each click: another card may have turned the question off.
if (!supported || read(promptKey) === "off" || read(installedKey) === "installed") return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Reinstall disappears from Home

After a user installs and later uninstalls an app, installedKey still contains "installed". This early return permanently skips the dialog, and the former card-level <install> button is gone. Home therefore loses its reinstall control, contrary to the described behavior. Keep an install control reachable without requiring users to clear browser storage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Intended for now: pages cannot read whether an app is still installed, so an uninstall is not detected. Reinstalling remains available from the app's address bar; we will revisit this if users ask for it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Understood. Since pages can’t detect an uninstall, keeping the install prompt suppressed is intentional, and reinstalling through the app’s address bar is the current path. I’ll treat the missing Home reinstall control as an accepted limitation for this PR.

@tnkuehne
tnkuehne merged commit 87afb39 into main Nov 25, 2026
17 checks passed
@tnkuehne
tnkuehne deleted the install-element branch November 25, 2026 17:50
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