(remote): show a live remote session before its first transcript exists - #279
Merged
Merged
Conversation
Closes #278. The inventory tags each live descriptor with whether a transcript matches it, in the same ssh call; the index synthesizes a placeholder row for descriptor-only ones (project from cwd, same session id, status and age, attachable and stoppable, no transcript affordance). Once the transcript is scanned the descriptor is no longer descriptor-only and the real row takes over under the same id. open-terminal resolves the host alias from the index when the session has no cache row yet.
This was referenced Sep 12, 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.
Closes #278. Measured 2026-09-12 on the host: a CLI launched in tmux writes its descriptor at once and its transcript only after the first prompt; the row was missing for 3 minutes and a manual refresh did not help. Since #272 the row is the only place to stop a remote process.
What
remote-transport.js listFiles(): each live descriptor (ALIVE filter unchanged) is taggeddescriptorOnlyby cross-checking the transcript ids from the same ssh call — no extra round trip.remote-index.js getPlaceholderSessions(alias): a session-shaped placeholder for each descriptor-only descriptor with acwd—sessionId= the descriptor's id,folder=encodeProjectPath(cwd),summary= cwd basename,status/statusUpdatedAt,remoteAlias,remoteDescriptorSeen: true,placeholder: true; computed on demand, nothing persisted or mirrored.findSessionAlias(sessionId)for sessions without a cache row.main.js:mergePlaceholderSessions(projects)beforeannotateRemoteAttachable(), so the placeholder gets the same status / attachability treatment;open-terminal's remote branch resolves the alias from the index whengetCachedFolderhas no row (it used to fall through to a local spawn).sidebar.js: no "View messages" control on a placeholder row; stop and attach work as on any live remote row.sessionId, is what the sidebar renders — no swap code. Thepid:<n>fallback id is unreachable with today's descriptor validation; stated in the doc.session-cache.md(descriptor-only sessions),session-state.md(placeholder rows).Proof
.is-alive, the stop control, status text, no transcript button.buildPlaceholderSessionpush → synthesis and replacement tests red; removing the!session.placeholderguard → DOM test red. Both reverted.task check: 1318 + 119 pass, 0 fail, pre-existing skips.Not covered by a direct test:
open-terminal's alias fallback branch (handler not source-extracted in tests;findSessionAliasunit-tested). Not verified on the wire.