Skip to content

(activity): remote decay clears busy without claiming response-ready; PTY purge skips remote rows - #259

Merged
devsuitup merged 1 commit into
mainfrom
fix/remote-decay-semantics
Sep 11, 2026
Merged

devsuitup merged 1 commit into
mainfrom
fix/remote-decay-semantics

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Audit 2026-09-11, findings 3 and 7 (.work-files/switchboard/audit-fable-2026-09-11.md, local note).

Why

Since #248 the remote activity decay called setActivity(id, false), which for a non-selected session arms responseReadySessions — the green "finished, you have not looked" marker. Twenty seconds of transcript silence is not that: a long tool call, or a parent delegating to subagents, went "response ready" on every unviewed remote row. An adapter without a PTY can only say "stopped writing".

Separately, updateRunningIndicators purged busy / ready / attention state for every row without a local PTY whenever the PTY set changed — wiping remote spinners on any unrelated local start or stop — and was the last writer of those collections outside session-activity.js.

What

  • setActivity(id, active, via, { armReady }): an explicit opt-out of the idle → response-ready transition. The remote decay and seed-decay pass { armReady: false }; PTY callers unchanged.
  • purgeActivityFor(id, via) in session-activity.js is the only purge path; app.js calls it and skips rows carrying data-remote-alias (set by buildSessionItem) — a remote row's busy state belongs to the remote adapter.
  • Test flipped: after decay a remote row is neither .cli-busy nor .response-ready; a PTY-sourced idle still arms response-ready.

Proof

Mutations: drop the armReady guard → remote decay test and the unit test red, PTY test green; drop the remote-row skip → the source-pin test red. task check: 1259 pass, 0 fail, 8 pre-existing skips.

Comment trim to one-line pointers follows in the next batch (the machine is too loaded for another hook run right now; patch kept locally).

… PTY purge skips remote rows

setActivity gains opts.armReady (default true); remote-activity-ui's decay
passes armReady:false since silence isn't proof a turn actually finished.
updateRunningIndicators now skips dataset.remoteAlias rows and routes its
local purge through session-activity's new purgeActivityFor.
@devsuitup
devsuitup merged commit 58d603a into main Sep 11, 2026
10 checks passed
@devsuitup
devsuitup deleted the fix/remote-decay-semantics branch September 11, 2026 07:21
devsuitup added a commit that referenced this pull request Sep 11, 2026
…efore a tmux attach (#262)

A killed local CLI leaves its descriptor behind and read as busy until the app
restarted; getStatus now re-probes the pid lazily, throttled. The remote
inventory prints an ALIVE marker per descriptor from /proc so dead CLIs are
dropped without a second ssh. The attach probe checks /proc/<pid>/cmdline is a
claude CLI before attaching to a recycled pid, and probe/restore ssh calls get
ConnectTimeout=5. Comment sweep on the activity files merged in #259.
@devsuitup devsuitup mentioned this pull request Sep 11, 2026
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