HERMES-GIELIE/static
nesquena-hermes 7ec7b9c942 fix(mobile): PWA reflow guard + avoid redundant same-session refresh (salvage of #3976)
Salvages PR #3976 by ksj5131513-ops, ported fresh onto current master and
re-applied on top of #4195's external-refresh gate (the original PR predated
#3916/#4195's rework of refreshActiveSessionIfExternallyUpdated).

Two parts:

1. Avoid an unconditional same-session force reload the moment streaming
   settles. _scheduleActiveSessionIdleReload previously called
   loadSession(force:true) on every idle reconcile, which on mobile PWA caused
   a visible end-of-turn flash and could briefly restore the pane with stale
   layout geometry. It now reconciles against server metadata first via
   refreshActiveSessionIfExternallyUpdated('idle-reconcile', {ignoreStreamJustFinished:true})
   — reloading ONLY when the message count actually changed — and falls back to
   the original forced reload only if the metadata probe itself fails.

   This COEXISTS with #4195: the poll-only external-session early-return
   (if((reason||'poll')==='poll' && !_isExternalSession(S.session)) return) is
   left untouched. The idle path uses a non-'poll' reason so it never trips that
   gate, and opts (read via arguments[1], same pattern as loadSession) only
   bypasses the post-stream cooldown, not the external gate. The function keeps
   its (reason) signature and now returns a status string
   ('skipped'/'unchanged'/'reloaded'/'failed') for callers that want it.

2. Mobile viewport reflow guard for PWA visualViewport changes. When the
   on-screen keyboard / browser chrome shows or hides, the phone layout can stay
   painted against stale geometry. _forceMobileViewportReflow() toggles a
   one-frame html.viewport-reflow class (cheap GPU-promotion transform) to force
   a repaint, then resyncs the workspace panel + sidebar aria. Wired to
   visualViewport resize/scroll (debounced) where available, falling back to the
   window resize handler otherwise. Adds safe-area-inset padding to topbar,
   messages-inner, and composer-wrap on phones. Uses overflow-x:clip (NOT hidden)
   on .layout per the #4856 lesson to avoid coercing overflow-y into a scroller.

Co-authored-by: ksj5131513-ops <ksj5131513-ops@users.noreply.github.com>
2026-06-28 09:02:10 +00:00
..
vendor fix: protect pipes inside backtick code spans in renderMd tables 2026-06-25 08:25:58 +00:00
apple-touch-icon.png
assistant_turn_anchors.js Add assistant turn anchor renderer snapshot adapter 2026-06-14 02:03:45 +08:00
boot.js fix(mobile): PWA reflow guard + avoid redundant same-session refresh (salvage of #3976) 2026-06-28 09:02:10 +00:00
commands.js fix(steer): rename typo, catch retry rejection, update JSDoc (#4749) 2026-06-25 03:23:36 +00:00
favicon-32.png
favicon-192.png
favicon-512.png
favicon-512.svg
favicon.ico
favicon.svg
i18n.js feat(insights): surface prompt-cache hit rate (salvage of #3912) 2026-06-28 08:11:22 +00:00
icons.js stage #4581 onto master (v0.51.556) — surface escape-target symlinks as display-only workspace rows 2026-06-21 09:15:22 +00:00
index.html theme-registration: preserve pending ext skin across reload + expand accent token allowlist 2026-06-28 05:22:26 +00:00
login.js feat: add passkey sign-in 2026-05-25 00:14:38 +00:00
manifest.json Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
messages.js feat(moa): route /moa through WebUI via server-resolved MoA config (#5070, #5057) 2026-06-28 00:23:51 +00:00
onboarding.js fix(onboarding): rehydrate plain-select fallback so saved model isn't reset to option[0] 2026-06-27 04:33:02 +00:00
outline.js fix(outline): keep outline valid on the todos sidebar panel (Opus follow-up) 2026-06-10 23:55:05 +00:00
panels.js feat(insights): surface prompt-cache hit rate (salvage of #3912) 2026-06-28 08:11:22 +00:00
pwa-startup.js Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
sessions.js fix(mobile): PWA reflow guard + avoid redundant same-session refresh (salvage of #3976) 2026-06-28 09:02:10 +00:00
style.css fix(mobile): PWA reflow guard + avoid redundant same-session refresh (salvage of #3976) 2026-06-28 09:02:10 +00:00
sw.js fix: focus the existing chat tab when a notification is clicked instead of opening a new tab 2026-06-13 14:42:41 -07:00
terminal.js fix(#4313): guard EventSource.close() calls to suppress ERR_ABORTED noise 2026-06-18 17:25:18 +00:00
ui.js fix(workspace): live-sync active Workspace Todos tab 2026-06-28 07:28:30 +00:00
workspace.js fix(workspace): live-sync active Workspace Todos tab 2026-06-28 07:28:30 +00:00