Skip to content

(sidebar): show remote activity as the local busy spinner - #248

Merged
devsuitup merged 3 commits into
mainfrom
fix/remote-busy-spinner
Sep 10, 2026
Merged

devsuitup merged 3 commits into
mainfrom
fix/remote-busy-spinner

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

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

  • Remote activity now goes through setActivity(sessionId, active, via) in session-activity.js, the same dispatcher local PTY output uses: remote-watch on each event, remote-decay when the 20 s timer fires. The visual is the shared .cli-busy spinner. After decay a non-selected remote session lands in responseReadySessions exactly like a local one.
  • .remote-activity-dot element, CSS and keyframes removed.
  • First paint: seedRemoteActivity(session) runs from renderProjects before 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 from buildSessionItem with no timer. buildSessionItem is a pure read again.
  • New section "Remote hosts — busy spinner (issue (remote): light a pip while a remote session writes #242)" in .ai/contexts/session-cache.md; every pointer names it.
  • test/dom-setup.js loads the real session-activity.js and remote-activity-ui.js instead 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; drop setActivity(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).

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.
@devsuitup
devsuitup merged commit 3ebd557 into main Sep 10, 2026
9 checks passed
@devsuitup
devsuitup deleted the fix/remote-busy-spinner branch September 10, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant