Tell the channel that was running that it has stopped, not the one just opened - #315
Merged
davidmckayv merged 3 commits intoSep 1, 2026
Merged
Conversation
zopeVaibhav
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso and
tylerslaton
as code owners
September 1, 2026 14:03
zopeVaibhav
force-pushed
the
fix/stale-channel-busy-dots
branch
from
September 1, 2026 19:02
74c8c49 to
b612beb
Compare
davidmckayv
approved these changes
Sep 1, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
Real bug, and the fix is in the right place: the report belongs to the turn, not to the screen that started it. Verified the removed setChannelBusyMutationOptions had no other caller. CI green.
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 this changes
A channel stops showing a working indicator once its turn has ended, including when the person has
moved to another channel in the meantime.
busywas reported from an effect keyed on[busy, channel.id], wherebusycame from componentstate.
ChannelChatremounts per channel, so opening another one left the running turn'sbusy: truewith nothing to revoke it: the new instance postsbusy: falsefor the channel justopened, and the old instance's decrement lands on an unmounted component, where
setStateis ano-op and the effect never re-runs. Nothing else sends it.
onRunBusyfires only insidethreadLock(
copilot.ts:1177,copilot.ts:1218) and its one consumer is the handoff delivery atindex.ts:883, which a person's run does not pass through.The signal now comes from the turn rather than from the screen.
sayholds the count in a ref, postsbusy: trueon the first turn in andbusy: falseon the last turn out, and does it through a plainfunction rather than a mutation handle, because the async continuation survives unmount even though
the state update does not. Opening a channel also stops posting a redundant
busy: falsetwicebefore anything has run in it.
Fixes #314.
Where it runs
replacing state that was already there.
busyremains what it was: never queried, neverstored, announced only.
out over
channel_activityexactly as before, and nothing new is read or written on the way.NOTIFY. This changes which moments produce one, not how one travels.channel opened, one more only where one was previously missing.
Boundary and audit
same membership check.
Changelog
CHANGELOG.mdunderUnreleased.Proof
Run against the local stack, with
fetchwrapped in the page to record every/busyand/activitycall. Same steps both times: send a message, switch channel immediately, wait for the reply.
Before:
No
falsefordb0bab97. Dots still showing 45 seconds after the reply completed.After:
Dots cleared, preview correct, and the two mount-time posts are gone.
No unit test. The defect is which component emits the signal, and there is no component-test harness
here: every file in
app/teststests a module directly, and standing one up for this would be alarger change than the fix.
bun run typecheck,bun run lintandbunx biome format .are clean,and 206 app tests plus
server/tests/channel-events.integration.test.tspass.