Open Postulo links in the installed app, and check installability in Chromium (#899) #1059

Merged
tiagoagueda merged 1 commit from 899-address-bar-install into main 2026-10-27 17:42:10 +00:00
Owner

The manifest gains launch_handler (client_mode: ["focus-existing", "auto"]) and
handle_links: "preferred", so a Postulo link followed from mail, chat or an extension
opens in the installed app where the browser captures links and the person allows it,
and an open app window is reused instead of a second one started. Both are the browser's
to honour and the person's to switch off there; Postulo adds no setting of its own.

focus-existing brings the window forward but does not navigate it: the link's address
arrives through launchQueue. app.js now consumes it and goes there, same origin only,
passing over the launch that loaded the page itself, so an unsaved form still asks first
through the existing beforeunload guard.

The candidates the issue named for a missing address-bar icon were each checked. The
cancelled beforeinstallprompt is not one: preventDefault() holds back Android's
mini-infobar and nothing else, and the desktop omnibox icon, Edge's App available and
the menu entry are drawn from the installability check; the comment in app.js now says
so. The signed-out manifest fetch, start_url redirecting to sign-in, the icon sizes and
scope "/" all pass Chromium's own check. The worker stays signed-in only (#753).

The browser suite asks the full Chromium (channel="chromium", with a real profile, since
the headless shell answers every page with an empty list and an off-the-record context is
never installable) for Page.getInstallabilityErrors, signed in and signed out, and
reads Chromium's parse of the manifest. A unit test covers the new members and the scope.
The help page's Firefox paragraph no longer sends people to Firefox Labs (web apps are on
by default since Firefox 143), and it mentions Open in app.

Closes #899

Notes for review

  • Left for the maintainer: a signed-out visitor registers no service worker (#753). Chrome's documentation (2023) still lists a worker with a fetch handler as a condition for the install prompt. Chromium 151 reports no installability errors signed out, but if the omnibox icon is missing signed out on Ragnar, the fix reverses #753.
  • Checking Edge, Firefox and Safari by hand is not done. The per-browser criteria and what to look at are in the session's notes. The wiki section (Installing the app → From the address bar) follows this PR.

🤖 Generated with Claude Code

The manifest gains `launch_handler` (`client_mode: ["focus-existing", "auto"]`) and `handle_links: "preferred"`, so a Postulo link followed from mail, chat or an extension opens in the installed app where the browser captures links and the person allows it, and an open app window is reused instead of a second one started. Both are the browser's to honour and the person's to switch off there; Postulo adds no setting of its own. `focus-existing` brings the window forward but does not navigate it: the link's address arrives through `launchQueue`. `app.js` now consumes it and goes there, same origin only, passing over the launch that loaded the page itself, so an unsaved form still asks first through the existing `beforeunload` guard. The candidates the issue named for a missing address-bar icon were each checked. The cancelled `beforeinstallprompt` is not one: `preventDefault()` holds back Android's mini-infobar and nothing else, and the desktop omnibox icon, Edge's *App available* and the menu entry are drawn from the installability check; the comment in `app.js` now says so. The signed-out manifest fetch, `start_url` redirecting to sign-in, the icon sizes and `scope "/"` all pass Chromium's own check. The worker stays signed-in only (#753). The browser suite asks the full Chromium (`channel="chromium"`, with a real profile, since the headless shell answers every page with an empty list and an off-the-record context is never installable) for `Page.getInstallabilityErrors`, signed in and signed out, and reads Chromium's parse of the manifest. A unit test covers the new members and the scope. The help page's Firefox paragraph no longer sends people to Firefox Labs (web apps are on by default since Firefox 143), and it mentions *Open in app*. Closes #899 ## Notes for review - **Left for the maintainer:** a signed-out visitor registers no service worker (#753). Chrome's documentation (2023) still lists a worker with a fetch handler as a condition for the install *prompt*. Chromium 151 reports no installability errors signed out, but if the omnibox icon is missing signed out on Ragnar, the fix reverses #753. - **Checking Edge, Firefox and Safari by hand** is not done. The per-browser criteria and what to look at are in the session's notes. The wiki section (*Installing the app → From the address bar*) follows this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Open Postulo links in the installed app, and check installability in Chromium (#899)
All checks were successful
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m14s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m41s
CI / Database tests on PostgreSQL (push) Successful in 3m27s
CI / Security audit (push) Successful in 41s
CI / Browser tests (Chromium) (push) Successful in 30m8s
Every Python / Unit tests (Python 3.12) (push) Successful in 14m0s
Every Python / Unit tests (Python 3.13) (push) Successful in 13m53s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m29s
CI / Browser tests (Chromium) (pull_request) Successful in 31m7s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 13m3s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m38s
CI / Security audit (pull_request) Successful in 50s
3b8a70d694
The manifest gains `launch_handler` (`client_mode: ["focus-existing", "auto"]`) and
`handle_links: "preferred"`, so a Postulo link followed from mail, chat or an extension
opens in the installed app where the browser captures links and the person allows it,
and an open app window is reused instead of a second one started. Both are the browser's
to honour and the person's to switch off there; Postulo adds no setting of its own.

`focus-existing` brings the window forward but does not navigate it: the link's address
arrives through `launchQueue`. `app.js` now consumes it and goes there, same origin only,
passing over the launch that loaded the page itself, so an unsaved form still asks first
through the existing `beforeunload` guard.

The candidates the issue named for a missing address-bar icon were each checked. The
cancelled `beforeinstallprompt` is not one: `preventDefault()` holds back Android's
mini-infobar and nothing else, and the desktop omnibox icon, Edge's *App available* and
the menu entry are drawn from the installability check; the comment in `app.js` now says
so. The signed-out manifest fetch, `start_url` redirecting to sign-in, the icon sizes and
`scope "/"` all pass Chromium's own check. The worker stays signed-in only (#753).

The browser suite asks the full Chromium (`channel="chromium"`, with a real profile, since
the headless shell answers every page with an empty list and an off-the-record context is
never installable) for `Page.getInstallabilityErrors`, signed in and signed out, and
reads Chromium's parse of the manifest. A unit test covers the new members and the scope.
The help page's Firefox paragraph no longer sends people to Firefox Labs (web apps are on
by default since Firefox 143), and it mentions *Open in app*.

Closes #899

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tiagoagueda deleted branch 899-address-bar-install 2026-10-27 17:42:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo!1059
No description provided.