Files
loki/scripts
CatoandClaude Fable 5.2 3304426bab fix(chat): a queued message stays in its conversation and survives a reload; an unanswered question says so and offers Try again (#1711)
* fix(chat): a queued message stays in its conversation and survives a reload; a question left unanswered says so and offers Try again

Measured on production, 2026-11-13:
- Three quick messages in a new chat became three conversations and the
  screen kept only the last. The queue was drained by a closure that still
  saw no conversation, so each queued message opened a new one.
- Two queued messages vanished when the page reloaded.
- Reloading mid-answer stops the turn (lib/api/sse), and the reopened
  thread showed the question with nothing under it: no working sign, no
  answer thirty seconds and a second reload later, and no way to ask again.

- hooks/use-send-queue: each message belongs to the conversation it was
  typed in (as in @bitbaum/chatkit's useChatApp) and the queue is kept in
  sessionStorage; a message carrying files is not stored.
- LokiWorkspace: the drain sends into the thread of the turn that landed.
- lib/loki/unanswered + use-thread-recovery: a thread whose last message is
  the person's, with nothing answering it, says Loki did not finish and
  offers Try again (re-asks without a second bubble). Messages a reload
  brought back get Send now.
- LokiWorkspace stays under its line limit: the rail filter and delete
  moved to use-visible-conversations.

scripts/test/send-queue.ts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* test(loki-work-trail): the queue's source pins follow the per-thread queue

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 16:51:21 +01:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00