Repository navigation
fix(desktop): ask before a quit cuts off working chats; keep them findable (ATO-1696, ATO-1688) - #1762
Closed
sosidudku1 wants to merge 5 commits into
Closed
fix(desktop): ask before a quit cuts off working chats; keep them findable (ATO-1696, ATO-1688)#1762sosidudku1 wants to merge 5 commits into
sosidudku1 wants to merge 5 commits into
Conversation
…dable (ATO-1696, ATO-1688) - before-quit asked only about queued messages (ATO-135). It now also asks when a chat is still working: "N chats are still working", Quit / Cancel, one dialog when there are both (main/quit-question.ts). - A chat working or waiting on an approval stays on the chat list past Load more's cut (chat-list.js pageWithBusy). - A collapsed project or folder shows the running or approval dot on its header, since it draws no rows. - The ATO-448 offer line now names a quit as well as a restart.
…Stop (ATO-1688) serve dropped its connections before runtime.shutdown, which aborted the turns on them. A turn that unwound in that moment wrote its own end as a plain cancel, over the shutdown's interrupted stand-in, so the chat reopened with no word that its reply was cut off and no Continue. The runtime now has beginShutdown (called by serve before it drops the connections) and isStopping; a turn that ends cancelled while the host stops ends with INTERRUPTED_TURN_ENDING, transcript kept as written. (cherry picked from commit f6068f4)
…r a task's (ATO-1688) Review: shutdown alone set the flag, so a host that stops its own turn and then shuts down (the TUI's quit, and the tests that pin it) had that end overwritten. Now only beginShutdown sets it. A durable task's turn keeps its own end: the task runner runs it again, and Continue on its chat would have nothing to continue. Tests drive isStopping directly. (cherry picked from commit 10f775b)
…ms (ATO-1688) Review: stopNow aborted every turn's request before the SIGTERM (or the Windows stand-in's end), so the agent could end a turn as a person's Stop before it knew it was stopping. close() now ends the agent first and drops the streams once it has gone; a stream the agent's shutdown broke reads as the app ending the turn, not a transport failure. A restart keeps the old order. Also: the Pinned block counts only the pinned rows the page drew, not busy rows kept past the cut.
Collaborator
Author
|
Merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ATO-1696 and the desktop side of ATO-1688. Reported in Discord (Desktop 0.0.9): "I lose chats a lot in the background in the desktop view", and quitting the app silently killed a chat that was still working.
What changes for the person
before-quitasked only about queued messages (ATO-135). It now also asks when a turn is running, in the chat on screen or one left in the background: "A chat is still working" / "N chats are still working", "Quitting now stops its reply before it is done.", Quit / Cancel. With queued messages too it is one dialog that names both. Same exceptions as the queue question (smoke, first-run probe, an update's install, the last window closing off macOS without a tray). Cancel keeps the app and the turn running. Text and counting:main/quit-question.ts.pageWithBusyinrenderer/chat-list.js). Before, an older chat working a long turn slid behind Load more as newer chats were stored.main), cherry-picked here (two commits) so this branch works on its own. The desktop's quit now also ends the agent first and drops the turns' streams once it has gone (AgentClient.stopNowonclose()); before, it dropped them first and the agent saw each turn's request vanish before it knew it was stopping. A restart keeps the old order.Why ask rather than keep the turn running
The turn runs inside
atag serve, a child of the app, so it cannot outlive a full quit. Keep Running (tray) already lets the app live with no window. So the quit warns, the way it already does for queued messages, and a turn cut off anyway (Quit pressed) is offered to continue after relaunch.Tests
test/quit-question.test.mjs: no question when idle, the ATO-135 text unchanged for queue only, working chats asked, both in one dialog, turns counted by chat.test/chat-list.test.mjs:pageWithBusykeeps busy rows past the cut and counts the rest as hidden.Verification
AgentClient.stopNowand the collapsed-group dot (renderer only). Worth a look in the combined run: quit with a chat working, Cancel keeps it running; Quit, relaunch, the chat shows the cut-off line with Continue.