ulysses/static
Wes Huber 05f047b188
fix: prevent document link click from resetting active session (#2055)
* fix: prevent document link click from resetting active session

Clicking a #document-<uuid> link in chat caused the session to reset
because of two issues:

1. chatRenderer.js: clicking on the text inside an <a> yields a Text
   node target whose .closest() is undefined, so preventDefault never
   fires and the browser performs a default hash-navigation

2. sessions.js: the hashchange handler treated the entity hash
   (document-<uuid>) as a session lookup, found no match, and the
   subsequent loadSessions created a new default-model chat

Fix: walk past Text nodes before calling .closest(), and skip
entity-prefixed hashes in the hashchange handler.

Fixes #2035

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(documents): move isOpen=true after container check in openPanel

isOpen was set to true before the #chat-container existence check.
If the container was missing during a race, the function returned
early but isOpen stayed true, preventing the panel from ever
reopening on subsequent calls.

Move isOpen=true to after the container guard so a failed open
doesn't leave the flag stuck.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-05 15:05:30 +02:00
..
fonts Odysseus v1.0 2026-05-31 23:58:26 +09:00
js fix: prevent document link click from resetting active session (#2055) 2026-06-05 15:05:30 +02:00
lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
app.js feat: Add workspace: confine agent tools to a folder (#1103) 2026-06-05 00:06:37 +02:00
index.html fix(memory): let manual add specify memory category 2026-06-05 04:57:13 -06:00
login.html fix(login): keep inputs >=16px on touch so iOS doesn't zoom on focus (#1632) 2026-06-03 14:23:24 +09:00
manifest.json Odysseus v1.0 2026-05-31 23:58:26 +09:00
style.css Add ask_user tool: agent-posed multiple-choice questions (#2111) 2026-06-05 11:49:11 +02:00
sw.js fix(ui): modal drag + removed startDrag func (#2430) 2026-06-04 20:34:18 +02:00