(sidebar): show remote activity as the local busy spinner - #248
Merged
Merged
Conversation
A remote session writing its transcript lit a separate violet dot (#242) while a local session busy generating used the braille spinner on .cli-busy. Same signal, two vocabularies. Route the remote-activity event through sessionBusyState and applyActivityClasses — the single declared writer of .cli-busy in session-activity.js — instead of toggling a dedicated element, and drop that element and its CSS.
…ed decay Two bugs in e1e2187: remote-activity-ui.js wrote sessionBusyState directly instead of going through session-activity.js's setActivity dispatcher, so a decayed remote session never picked up the response-ready transition a local one gets; and buildSessionItem seeded busy=true from remoteActiveAt with no decay timer, so a row rendered within the window and never touched again by a live event stayed busy forever. Move the seed into remote-activity-ui.js's seedRemoteActivity(), called once per render before items are built, arming a timer for the remaining window instead of a fresh one. Also repoints every dangling .ai/contexts/session-cache.md comment at the new Remote hosts - busy spinner (issue #242) subsection.
This was referenced Sep 10, 2026
Merged
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.
Why
Since #242 a remote session that writes its transcript lit a dedicated purple pip next to the status dot, while a local session shows the braille spinner in the status dot itself. Same state, two visuals, two code paths.
What
setActivity(sessionId, active, via)insession-activity.js, the same dispatcher local PTY output uses:remote-watchon each event,remote-decaywhen the 20 s timer fires. The visual is the shared.cli-busyspinner. After decay a non-selected remote session lands inresponseReadySessionsexactly like a local one..remote-activity-dotelement, CSS and keyframes removed.seedRemoteActivity(session)runs fromrenderProjectsbefore rows are built and arms a timer for the remaining decay window, so a row rendered inside the window starts busy and still goes idle — the previous seed wrote state frombuildSessionItemwith no timer.buildSessionItemis a pure read again..ai/contexts/session-cache.md; every pointer names it.test/dom-setup.jsloads the realsession-activity.jsandremote-activity-ui.jsinstead of stubbing their Maps/Sets.Proof
Mutations run on the shipped files (each breaks only its property): drop
setActivity(true)on event → busy/decay/response-ready tests red; dropsetActivity(false)on decay → 4 red; drop the seed's timer → decay-after-seed and no-stacking tests red; drop the idempotency guard → no-stacking only.task check: 1207 pass, 0 fail, 8 pre-existing skips.Follow-ups tracked in #244–#247 (indicator alignment sequence).