From c15148f925b609484d53193a329b6ef42dd72be4 Mon Sep 17 00:00:00 2001 From: hermes-agent Date: Sun, 24 May 2026 18:28:52 +0000 Subject: [PATCH] =?UTF-8?q?Stage=20405:=20PR=20#2842=20=E2=80=94=20feat:?= =?UTF-8?q?=20polish=20installed=20PWA=20startup=20by=20@AJV20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-picked via 3-way apply of net delta against stage HEAD. All 8 files applied cleanly including the new static/pwa-startup.js. Co-authored-by: AJV20 --- static/boot.js | 11 ++++ static/index.html | 4 +- static/manifest.json | 21 ++++++- static/pwa-startup.js | 83 ++++++++++++++++++++++++++ static/style.css | 7 +++ static/sw.js | 5 +- tests/test_mobile_layout.py | 19 ++++++ tests/test_pwa_manifest_sw.py | 61 ++++++++++++++++++- tests/test_service_worker_api_cache.py | 4 +- 9 files changed, 207 insertions(+), 8 deletions(-) create mode 100644 static/pwa-startup.js diff --git a/static/boot.js b/static/boot.js index 2b6d8347..b1c67dd6 100644 --- a/static/boot.js +++ b/static/boot.js @@ -1662,6 +1662,17 @@ function applyBotName(){ if(typeof fetchReasoningChip==='function') fetchReasoningChip(); if(typeof refreshProviderQuotaIndicator==='function') refreshProviderQuotaIndicator(); const urlSession=(typeof _sessionIdFromLocation==='function')?_sessionIdFromLocation():null; + const pwaLaunchAction=(window.HermesPWA&&typeof window.HermesPWA.launchAction==='function') + ? window.HermesPWA.launchAction() + : null; + if(pwaLaunchAction==='new-chat'){ + try{ + await newSession(true); + if(S.session) await _startBootModelDropdown(); + S._bootReady=true; + syncTopbar();syncWorkspacePanelState();await renderSessionList();if(typeof startGatewaySSE==='function')startGatewaySSE();return; + }catch(e){console.warn('[pwa] new-chat launch action failed', e);} + } const savedLocal=localStorage.getItem('hermes-webui-session'); const saved=urlSession||savedLocal; if(saved){ diff --git a/static/index.html b/static/index.html index 8b4009c0..222998e8 100644 --- a/static/index.html +++ b/static/index.html @@ -2,7 +2,7 @@ - + Hermes