From b46450031007ac14a372627e8fa7261ef5be65fb Mon Sep 17 00:00:00 2001 From: bot-hermes Date: Mon, 7 Sep 2026 21:27:53 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20PWA=20improvements=20=E2=80=94=20clean?= =?UTF-8?q?=20up=20SW,=20fix=20chin=20bar,=20add=20shortcuts,=20improve=20?= =?UTF-8?q?mobile=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- packages/ui/src/styles/mobile.css | 2 +- packages/web/index.html | 8 +++++- packages/web/mobile.html | 26 +++++++++++++++++++ packages/web/public/site.webmanifest | 4 ++- .../lib/opencode/pwa-manifest-routes.js | 7 +++++ .../lib/opencode/pwa-manifest-routes.test.js | 7 +++++ packages/web/src/main.tsx | 21 +++++++-------- packages/web/src/sw.ts | 15 ++++------- packages/web/vite.config.ts | 6 ++--- 9 files changed, 69 insertions(+), 27 deletions(-) diff --git a/packages/ui/src/styles/mobile.css b/packages/ui/src/styles/mobile.css index 22b0dcd5..d8b380c0 100644 --- a/packages/ui/src/styles/mobile.css +++ b/packages/ui/src/styles/mobile.css @@ -716,7 +716,7 @@ } :root:not(.oc-capacitor-app):not(.oc-browser-keyboard-open) .oc-mobile-composer { - padding-bottom: calc(0.75rem + max(16px, var(--oc-safe-area-bottom, env(safe-area-inset-bottom, 0px)))) !important; + padding-bottom: calc(0.75rem + var(--oc-safe-area-bottom-visual, 0px)) !important; } /* Fullscreen composer: ChatInput pins the form to the visual viewport from diff --git a/packages/web/index.html b/packages/web/index.html index 750acd52..a7b7ffdd 100644 --- a/packages/web/index.html +++ b/packages/web/index.html @@ -192,6 +192,13 @@ const buildShortcuts = (recentSessions) => { const shortcuts = [ + { + name: 'New Session', + short_name: 'New', + description: 'Start a new coding session', + url: `${baseUrl}/`, + icons: [{ src: `${baseUrl}/pwa-192.png`, sizes: '192x192', type: 'image/png' }], + }, { name: 'Appearance Settings', short_name: 'Settings', @@ -427,7 +434,6 @@ OpenChamber - AI Coding Assistant -