Advertise installation as web app #37
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Maybe we can put a small, uninterrupting notice to install as a web app. Or add an action for that into the main hamburger menu.
🤖 On it — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
⚠️ Claude run failed (API Error: Connection closed mid-response. The response above may be incomplete.) — see the action log for details.
📜 Full session transcript
🤖 On it — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
Pushed to
claude/issue-37.Advertise installation as a web app
Went with the hamburger-menu action, plus the smallest possible notice: a dot on the hamburger until the menu has been opened once.
The catch was that nothing could be installed to begin with — there was no manifest and no service worker, so no browser ever offered an install. So this is the whole path, not just the button:
Making it installable
wwwroot/manifest.webmanifest+wwwroot/icons/— PNGs generated from two SVG siblings ofBrandMark.razor:icon.svg(rounded, full-bleed) for 192/512, andicon-maskable.svg(square edge, content in the inner 80% safe zone) for the maskable icon and the apple-touch-icon, since iOS reads none of the manifest.wwwroot/service-worker.jscaches nothing but an offline page, and a comment says to keep it that way — this is Blazor Server, so a cached shell could only ever show a page the server has moved on from. It exists because installability needs a worker with a fetch handler, and the handler has to be real (Chrome detects and skips no-op ones). It answers navigations only, falling back tooffline.html— which matters in a standalone window that has no address bar to recover from. That page is self-contained and ships both languages, picking one from theponente-localecookie.The offer
ponente-install-seen). No banner, no toast.js/pwa-install.jsis a classic script in<head>, not a module:beforeinstallpromptfires once and early, usually before a circuit exists, so a listener attached fromOnAfterRenderAsyncwould miss it on most loads. It parks the event;NavHeaderasks for the state and gets called back when it changes.theme-colortags follow the OS by design, soprefs-interop.jsappends an overriding tag when the theme is pinned — otherwise Dark-on-a-light-system left a white bar over a dark header.Strings are in both locales,
NavHeaderalready inheritsLocalizedComponentBase, andCLAUDE.md/README.mdrecord the constraints above.Verified (no container engine in CI, so I installed the .NET 10 SDK, Postgres and Chromium and ran a live server):
dotnet buildclean,dotnet test46/46 (including the en/de key-parity test).tests/e2e/install.spec.js— 7 tests: manifest shape and every icon reachable, service worker registering at root scope, nothing advertised when the browser hasn't offered, the dot + row appearing via the callback into the circuit, the prompt actually being invoked, the nudge not returning after a reload, translation, and the iOS share-sheet branch under an iPhone user agent. All pass. It dispatches the install event the way Chrome would, because a headless run can't provoke a real one.board/i18n/mobile/ both entrance specs: 66/67. The one failure (mobile.spec.js→ "card tags stay labels") needs a pre-existing tagged card on the board and can't pass against the empty database I built here — unrelated to this change, and worth a re-run on the real test stack.Content-Type: application/manifest+jsonandCache-Control: no-cache+ ETag (right for a worker and manifest — updates roll out immediately).Not verifiable from here: a real Android install prompt and a real iOS home-screen add. Both depend on the browser's own judgement rather than on app code, but the icons and the iOS tags are worth eyeballing on a device once this is deployed.
⏱ 21m 14s · 100 turns · tokens: 117.6k in / 57.1k out (+8634.0k cache-read)
📜 Full session transcript
→ Opened PR: #41