odysseus/static
samy 6058be7088 fix: session URL hash lost when sending message mid-stream
Two independent bugs caused the session hash to disappear from the URL:

Bug 1 — ReferenceError in catch block silently killed error recovery
  In handleChatSubmit, two const variables (streamingTTS at line 1922 and
  abortCtrl at line 1741) were declared inside the try block but referenced
  in the catch block. Since const is block-scoped in JavaScript, they were
  undefined in catch, causing a ReferenceError that silently aborted the
  error handler. This prevented materializePendingSession() from ever being
  called, so no hash was written to the URL.
  Fix: Hoisted both as let declarations before the try { block.

Bug 2 — Dual sessions.js ES module instances with mismatched state
  app.js imported sessions.js with a version query string
  (?v=20260722ctxheader4) while every other module imported ./sessions.js
  without one. The browser treated them as different URLs, creating two
  separate module instances with independent _pendingChat and
  currentSessionId state. createDirectChat() set pending on one instance
  while handleChatSubmit() checked hasPendingChat() on the other — so the
  pending session never materialized.
  Fix: Removed the version query string from the sessions.js import in
  app.js and from the modulepreload + script tags in index.html. All
  modules now share a single sessions.js instance.

Bonus guard: _adoptOpenedSessionBeforeAutoCreate() now checks
hasPendingChat() before adopting a stale DOM-active session, preventing
the send path from landing in the wrong session when a New Chat is pending.
2026-08-01 23:04:22 -04:00
..
fonts feat(a11y): add a Text size control and an OpenDyslexic font option (#4210) 2026-06-22 13:53:46 +02:00
icons Cookbook model workflow fixes 2026-06-21 11:02:35 +00:00
js fix: session URL hash lost when sending message mid-stream 2026-08-01 23:04:22 -04:00
lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
app.js fix: session URL hash lost when sending message mid-stream 2026-08-01 23:04:22 -04:00
icon.ico feat(launcher): add portable windows launcher (#976) 2026-06-16 04:58:16 +01:00
index.html fix: session URL hash lost when sending message mid-stream 2026-08-01 23:04:22 -04:00
login.html fix(auth): centralize password and username validation constants (#4120) 2026-06-16 09:52:15 +02:00
manifest.json pwa missing icons added (#428) 2026-06-15 16:00:13 +09:00
modal-control-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
style.css Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
sw.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
wave-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
whirlpool-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00