Repository navigation
fix(host): keep replayed terminal queries out of the shell's input - #60
Merged
Merged
Conversation
Refs #23. Show full rolling summaries in the details sidebar, with brief dashboard and channel previews. Preserve existing channel history and lane prefixes.
* feat(desktop): embed native window inspection in Ace * fix(desktop): keep inspection responsive during folder selection * chore(desktop): prepare canary 0.0.10
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.
Fixes #48.
When a terminal is reattached, the host replays its scrollback, and xterm answers queries in that old output as if they were live. A replayed cursor-position query (
CSI 6n) made xterm sendCSI row;col Rto the current shell, and that ended up in front of whatever was pasted next. This is where the1Rprefix came from.replay: true(TerminalFrameinapps/host/src/protocol.ts), so the client knows where the replay ends.onDataemits. xterm calls the write callback right after it parses that chunk and before any live output queued behind it. So the window closes exactly where the replay ends, and live queries are still answered. A counter tracks pending replays, so a stale replay still in xterm's write buffer during a quick reattach can't end the window early.Smoke test
I ran a real
bun ace servewith an isolatedACE_HOMEand a real zsh, connected throughGatewayClient, and used@xterm/headless@6.0.0(the same core as the app's@xterm/xterm@6.0.0) with the panel's input logic copied in:printf '\033[6n'; read -rs -t 2 -d R x; echo LIVE:${#x}. The live query is answered (LIVE:5).echo PASTED-OK.\e[5;1Rduring the replay, and zsh printszsh: command not found: 1Recho. This reproduces the issue.PASTED-OKprints.LIVE-B:6).bun typesandbun run cipass. I didn't run this check again in the desktop app's webview.Built in Ace
Built in an Ace channel (agent with shell in a lane). The smoke test used
@xterm/headless, installed temporarily in/tmpand not committed, because the agent can't type into the desktop app's terminal. It also used a throwawayace serveon port 4199 instead of the running canary host.