Skip to content

Commit 9609b15

Browse files
author
Amos N.
committed
relay: turn off xterm convertEol so progress spinners overwrite in place
PTYs send their own CRLF for line breaks and use bare CR to redraw a single line in place — that's how Claude Code's "Scanning for leaked secrets…" spinner, ora dots, and tqdm bars work. With convertEol=true xterm was rewriting every \\r as \\r\\n, so every spinner frame appeared on a new line and the terminal turned into a stack of duplicated status lines instead of a single updating one. Reported with a screenshot of the security-scanner status display filling the screen with "almost done" lines.
1 parent a08d7a9 commit 9609b15

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/relay/src/web-client.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,12 @@ export const WEB_CLIENT_HTML = /* html */ `<!doctype html>
750750
brightYellow: '#FF9E64', brightBlue: '#7DA6FF', brightMagenta: '#BB9AF7',
751751
brightCyan: '#0DB9D7', brightWhite: '#D8E0F2',
752752
},
753-
convertEol: true, allowProposedApi: true,
753+
// convertEol must stay OFF for raw PTY streams. The daemon already
754+
// sends CRLF for newlines; bare CR is used by progress spinners and
755+
// status redraws to overwrite a single line in place. With convertEol
756+
// on, xterm rewrites every CR as CRLF and each redraw ends up stacked
757+
// on a new line instead of overwriting the previous one.
758+
convertEol: false, allowProposedApi: true,
754759
});
755760
_fit = new FitAddon();
756761
_term.loadAddon(_fit);

0 commit comments

Comments
 (0)