Repository navigation
Terminals: an interactive shell on the App Server's computer - #594
Merged
Merged
Conversation
ADR-0071 decides what a Terminal is and what it is not; the plan records the approved presentation and how each layer implements it.
Protocol 2.3 adds terminals/open, terminals/attach and terminals/close, the terminals subscription scope, and the open-Terminal count in the replacement impact. Clients stop advertising the unread openTerminal shell capability, which still deserializes for 2.2 clients.
App Server owns each login shell, keeps about 10,000 lines of replay in memory, and streams input and output on a WebSocket per viewer, admitted by a single-use attach token. Timed text pings let both sides notice a silent connection, and Windows marks a shell with a child process busy.
A browser WebSocket cannot carry the gateway token, so the gateway forwards an exact GET /terminal upgrade and leaves admission to the attach token.
Opens from a Project menu or the Task header, shows a Project's Terminals as tabs, reattaches with replay after a lost connection, adds the phone key row, and warns before an update closes Terminals.
Quit asks natively before its exit fallback starts, from the open count the Frontend reports, and only when this Desktop owns its App Server.
The crate joined the workspace unformatted, which fails the Rust CI job.
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.
Adds Terminals (ADR-0071): the user's own interactive shell on the App Server's computer, reachable from every App Shell.
Stacked on #592. It needs that branch's base and should merge after it.
What it does
terminals/open,terminals/attach,terminals/close, theterminalssubscription scope, andopenTerminalsin the replacement impact./terminal, admitted by a single-use attach token valid for 30 s.pingevery 15 s, busy or quiet, and the client answerspong. Each side treats 45 s of silence as a lost connection./terminalupgrade. A browser WebSocket cannot send headers, so the attach token is the only credential on that route./proc.openTerminalshell capability. The variant still deserializes for 2.2 clients.android-sshcrate, which failscargo fmt --checkon the base branch.Verification
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings, andcargo test --workspacepass.npm run check,npm run test:gate, and the tests of the Frontend, VS Code extension, Web, and Desktop packages pass.testDebugUnitTest lintDebug assembleDebug assembleDebugAndroidTestpasses.^C;Not verified