HERMES-GIELIE/static
joaompfp 22fce2fda1 fix(sessions): handle 401 redirect gracefully in loadSession flow
When the webui auth session expires (e.g., after a server restart),
api() returns undefined after redirecting to /login. Previously,
loadSession() and _ensureMessagesLoaded() would dereference the
undefined response and throw, surfacing a confusing 'Failed to load
session' toast while the browser was already navigating away.

Add guards after api() calls that may trigger 401 redirects:
- loadSession(): bail early if data is undefined
- _ensureMessagesLoaded(): return silently if data is missing
- _loadOlderMessages(): return silently if data is missing

This prevents the stuck loading state and unnecessary error toasts
when the user is already being redirected to re-authenticate.

Fixes #1391 (reported as 'Failed to load session' after restart)
2026-05-02 10:49:51 +01:00
..
vendor chore: vendor streaming-markdown@0.2.15, remove CDN dependency 2026-04-24 01:05:20 +00:00
boot.js v0.50.264 polish followups: i18n parity + assistant-output readability 2026-05-02 04:19:28 +00:00
commands.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00
favicon-32.png fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.ico fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.svg fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
i18n.js v0.50.264 polish followups: i18n parity + assistant-output readability 2026-05-02 04:19:28 +00:00
icons.js fix: register 5 missing Lucide icons (TTS speaker + queue chevron + insights cards) (#1413) 2026-05-01 17:57:34 +00:00
index.html Make composer-footer toolsets chip responsive instead of always-hidden 2026-05-02 00:04:12 +00:00
login.js fix(login): retry connectivity probe every 3s, auto-reload when server recovers 2026-05-01 19:54:47 +00:00
manifest.json feat: add PWA support (manifest, service worker, install prompt) (#920) 2026-04-23 15:14:21 -07:00
messages.js Merge PR #1390 from starship-s: preserve session provider context 2026-05-01 16:58:48 +00:00
onboarding.js feat: P2 improvements — cron history, toolsets per session, Codex OAuth 2026-05-01 12:42:21 +00:00
panels.js fix: new-chat guard ignores in-flight streams (#1432) + profile form auto-capitalizes typed values (#1423) 2026-05-02 00:52:41 +00:00
sessions.js fix(sessions): handle 401 redirect gracefully in loadSession flow 2026-05-02 10:49:51 +01:00
style.css v0.50.264 polish followups: i18n parity + assistant-output readability 2026-05-02 04:19:28 +00:00
sw.js fix(ui+pwa): avoid stale Mermaid render errors and bust cached static asset URLs on every release 2026-04-30 16:18:01 +00:00
terminal.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00
ui.js v0.50.264 polish followups: i18n parity + assistant-output readability 2026-05-02 04:19:28 +00:00
workspace.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00