Skip to content

(session-state): feed remote sessions through the remote-ssh adapter - #267

Merged
devsuitup merged 1 commit into
mainfrom
feat/246-remote-adapter
Sep 11, 2026
Merged

devsuitup merged 1 commit into
mainfrom
feat/246-remote-adapter

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Step 3 of #246, after #266.

What

  • public/remote-activity-ui.js becomes the remote-ssh adapter: one persistent createSessionState('remote-ssh') per remote session id, pruned with the decay timers. Ports fed: watch channel → transcriptTouched + busy:true; the 20 s decay → busy:false with armReady:false (a remote row never gets .response-ready); descriptor → descriptorStatus(status, at) and liveness:'alive' when the host's ALIVE-filtered list carries the session (session.remoteDescriptorSeen, one line in main.js annotateRemoteAttachable; absence stays unknown, never dead); attach/detach → attached, driven from the per-row PTY signal in app.js updateRunningIndicators.
  • public/session-activity-dom.js gains applyStateClasses(sessionId, snapshot); the adapter never writes classes (lint from (session-state): pure domain module, single DOM writer, enforced by lint #266 still holds).
  • The Maps in session-activity.js are still fed in parallel for two readers not migrated yet (sidebar initial paint, grid-card dot) — same inputs, so the projections cannot disagree; listed in the context note's migration status.
  • No separate remote activity pip existed anymore (checked); nothing to remove. The unified icon slot is step 3b.
  • Docs: session-state.md (adapter section, ports table, status "steps 1-3 done"), session-cache.md pointer.

Proof

  • test/remote-session-adapter.test.js: event → busy, decay → idle without response-ready, descriptor → liveness/status, attach/detach, seed within the decay window, no-op without remoteAlias.
  • Mutation: decay passing armReady:true turns red the new no-response-ready test and the pre-existing remote-activity-ui.test.js case; reverted.
  • task check: 1182 + 119 pass, 0 fail, pre-existing skips.

Step 3 of #246. remote-activity-ui.js keeps one createSessionState('remote-ssh')
per remote session id, fed by the watch channel (transcriptTouched + busy,
decay without arming response-ready), the descriptor (status, liveness) and
the attach state; it hands the snapshot to the projection file instead of
touching classes. Local and remote rows now share one projection path.
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