Repository navigation
Keep a conversation's row Working while its Bot works, subtasks and tasks included - #2204
Merged
Merged
Conversation
…asks included A Bot ran three subtasks after the person gave it Slack. The conversation said "Working on 3 subtasks…" while its row in the Conversations list said "1m". A person's own turn is known to the list only from the socket's busy event; the conversation list from the API never says it. Giving an app reads every query again, and that read (or the read once more a patch mid-read asks for) replaced the row and put out the busy the turn had lit. Any read of the list during a long turn did the same. Now the socket's busy, and this tab's own turns, are held apart from the cache, and a page read keeps a row busy while a turn is known to run there. A reconnect lets go of what the socket said, since an end may have been missed; this tab's own turns stay held until they end. A conversation whose Bot handed work to a task also reads Working until the task is done, from the task list, in the Conversations and Bots panels. Tests: the list read again mid-turn keeps the row Working (fails on main), the reconnect rule and the delegated task, and a real-browser check of both panels in Chromium and WebKit, light and dark.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 25, 2026 19:15
…ation test's requests
davidmckayv
added a commit
that referenced
this pull request
Nov 25, 2026
…tasks and tasks included (#2204)
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.
What was wrong
A Bot ran three subtasks after the person gave it Slack. The conversation said "Working on 3 subtasks…"; its row in the Conversations list said "1m", as if it were done.
A person's own turn runs in their browser, and the list knows of it only from the socket's busy event, which patches the cached row. The conversation list from the API never says it (it leaves
busyout rather than answer false). Giving an app reads every query again (app-access-action.tsx), and the card carries the task on at the same moment: the list's read landed after the busy event, or was read once more because of it (readAgainWhenLanded), and replaced the row withoutbusy. Any read of the list during a long turn (a rename, a pin, a new conversation, a reconnect) did the same.The fix
app/src/lib/channels/held-busy.ts: what the socket said (noteBusyHeard, fromapplyToRoster) and this tab's own turns (noteBusyHere, fromsetChannelBusy) are held apart from the cache. Every page read of the list, a Bot's list and a search (channelPageOf) keeps a row busy while a turn is known to run there. A reconnect lets go of what the socket said, since an end may have been missed while it was down; this tab's own turns stay held until they end.delegatingConversationsQueryOptions), in the Conversations panel and under each Bot in the Bots panel.The existing indicator only: "Working" where the time goes and the orb's typing dots. No API change.
Tests
app/tests/roster-working-through-reads.test.ts(regression): the list read again mid-turn, and a read already on its way when the turn starts, keep the row Working, and it stops once the turn ends. Fails on main, passes here.app/tests/roster-working-sources.test.ts: this tab's own turn stays Working across a reconnect while one only heard of is let go; a delegated task keeps its conversation Working until it is done, waiting on the person, or failed.app/tests/roster-working.test.tsx(real browser, added to the WebKit job): the real Conversations and Bots panels with the app's own socket hook, the server's events replayed: busy, a read of every query, the end; and a delegated task working then done. Chromium and WebKit, light and dark. On main it fails with the row reading "1m" while the turn runs.