[PR #66] [MERGED] Chat: switch chats while an answer is being written (no "Still writing" toast) #312

Closed
opened 2026-10-29 21:24:04 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/66
Author: @needmorevram
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mw00

Base: main ← Head: dashboard-chat-switch


📝 Commits (1)

  • 24e65f1 Chat: another chat opens while an answer is being written (no "Still writing" toast); the answer goes on in its own chat and shows again when that chat is opened

📊 Changes

1 file changed (+28 additions, -11 deletions)

View changed files

📝 serve/web/app.js (+28 -11)

📄 Description

While an answer was being written, clicking another chat (or New chat) did nothing but show a "Still writing - Stop the answer first, or wait for it." toast. Now the other chat opens, and the answer goes on in its own chat.

What changes (serve/web/app.js)

  • No block on switching: opening another chat, or a new one (button or Ctrl+Shift+O), works while an answer runs; the toast is gone.
  • The answer stays in its own chat. It used to draw into the element it started in; now it finds its own message each time it paints, and draws nothing while another chat is open. Coming back shows it still streaming; it is saved when it ends.
  • In another chat meanwhile: Send stays off (the server runs one answer at a time), Stop still works, the composer hint says "An answer is being written in another chat", and the context meter counts the open chat, not the running request.
  • Esc stops an answer only in its own chat, so an Esc elsewhere does not stop it.
  • When the answer ends while another chat is open, that chat's last answer gets its Regenerate button back, and an answer a reload cut off in the open chat is taken back up.
  • Deleting the chat whose answer is running still asks to stop it first (unchanged).

Testing

  • The real page in headless Chromium against a stand-in server that streams a slow answer: switching away mid-answer and back, the other chat's view untouched, the answer complete at the end, New chat and Esc during an answer, Esc in its own chat still stopping it, a page reload - all passed, no page errors. The same run against main's app.js shows the toast and no switch.
  • python3 -m unittest serve.test_server: 56 tests OK.
  • Not yet tried against a running model.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/66 **Author:** [@needmorevram](https://github.com/needmorevram) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `dashboard-chat-switch` --- ### 📝 Commits (1) - [`24e65f1`](https://github.com/mw00/project-maya/commit/24e65f181151e29128051fe1fbc8f0cf46044bb3) Chat: another chat opens while an answer is being written (no "Still writing" toast); the answer goes on in its own chat and shows again when that chat is opened ### 📊 Changes **1 file changed** (+28 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `serve/web/app.js` (+28 -11) </details> ### 📄 Description While an answer was being written, clicking another chat (or New chat) did nothing but show a "Still writing - Stop the answer first, or wait for it." toast. Now the other chat opens, and the answer goes on in its own chat. ## What changes (`serve/web/app.js`) - **No block on switching:** opening another chat, or a new one (button or Ctrl+Shift+O), works while an answer runs; the toast is gone. - **The answer stays in its own chat.** It used to draw into the element it started in; now it finds its own message each time it paints, and draws nothing while another chat is open. Coming back shows it still streaming; it is saved when it ends. - **In another chat meanwhile:** Send stays off (the server runs one answer at a time), Stop still works, the composer hint says "An answer is being written in another chat", and the context meter counts the open chat, not the running request. - **Esc** stops an answer only in its own chat, so an Esc elsewhere does not stop it. - **When the answer ends while another chat is open,** that chat's last answer gets its Regenerate button back, and an answer a reload cut off in the open chat is taken back up. - Deleting the chat whose answer is running still asks to stop it first (unchanged). ## Testing - The real page in headless Chromium against a stand-in server that streams a slow answer: switching away mid-answer and back, the other chat's view untouched, the answer complete at the end, New chat and Esc during an answer, Esc in its own chat still stopping it, a page reload - all passed, no page errors. The same run against main's `app.js` shows the toast and no switch. - `python3 -m unittest serve.test_server`: 56 tests OK. - Not yet tried against a running model. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:04 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#312
No description provided.