fix: PWA improvements — clean up SW, fix chin bar, add shortcuts, improve mobile support

- Remove dead precache manifest from SW (no fetch handler to consume it)
- Set empty globPatterns in vite-plugin-pwa config
- Fix bottom chin bar padding: use scaled safe-area token instead of raw inset
- Add 'New Session' PWA shortcut (client + server manifest)
- Add PWA meta tags to mobile.html (manifest, Apple icons, theme-color)
- Fix static site.webmanifest: add id/scope, correct description
- Remove duplicate apple-mobile-web-app-title from index.html
- Move SW registration to module scope (earlier, no window.load delay)
- Update manifest route tests for new shortcut order
This commit is contained in:
2026-09-07 21:37:06 +00:00
parent 4b95b327dd
commit b464500310
9 changed files with 69 additions and 27 deletions
@@ -237,6 +237,13 @@ export const registerPwaManifestRoute = (app, dependencies) => {
{ src: '/favicon-16.png', sizes: '16x16', type: 'image/png' },
],
shortcuts: [
{
name: 'New Session',
short_name: 'New',
description: 'Start a new coding session',
url: '/',
icons: [{ src: '/pwa-192.png', sizes: '192x192', type: 'image/png' }],
},
{
name: 'Appearance Settings',
short_name: 'Settings',
@@ -65,6 +65,13 @@ describe('PWA manifest route', () => {
const manifest = JSON.parse(res.body);
expect(fetchCalls).toHaveLength(2);
expect(manifest.shortcuts).toEqual([
{
name: 'New Session',
short_name: 'New',
description: 'Start a new coding session',
url: '/',
icons: [{ src: '/pwa-192.png', sizes: '192x192', type: 'image/png' }],
},
{
name: 'Appearance Settings',
short_name: 'Settings',