Make terminal output recording optional - #2593
Open
DharmendraChoudhary67 wants to merge 1 commit into
Open
DharmendraChoudhary67 wants to merge 1 commit into
DharmendraChoudhary67 wants to merge 1 commit into
Conversation
DharmendraChoudhary67
force-pushed
the
record-terminal-output
branch
from
September 15, 2026 10:39
49bf144 to
5b4af15
Compare
Adds a `record_terminal_output` parameter (default on) next to `record_scp` and `record_desktop_keyboard_input`. When it is off, `TerminalRecorder` keeps the Input stream and PTY resizes and drops Output/Error for native SSH, web SSH and Kubernetes exec, so a command that prints a large file can no longer fill up the recording storage. The SSH command detector still receives the output, so the "Shell command" log entries are unchanged. Such recordings carry an `input_only` entry in index.ndjson. The terminal player renders the keystrokes for them (Enter breaks the line, backspace erases, other control bytes in caret notation), in replay and live, and replays from the start instead of relying on blank seek anchors, which the recorder no longer writes without output.
DharmendraChoudhary67
force-pushed
the
record-terminal-output
branch
from
September 15, 2026 10:41
5b4af15 to
f23aa31
Compare
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.
Description
Fixes #2567.
Adds a
record_terminal_outputparameter (default on) next torecord_scpandrecord_desktop_keyboard_input. When it is off,TerminalRecorderkeeps the Input stream and PTY resizes and drops Output/Error, so a command that prints a large file cannot fill up the recording storage. A single gate inTerminalRecorder::writecovers native SSH, web SSH and Kubernetes exec. The SSH command detector still receives the output, so theShell commandlog entries are unchanged.Measured: pulling a 54 MB file through one SSH session gives a 72 MB recording with the option on and a 194-byte recording (the typed bytes) with it off.
Playback: such recordings carry an
input_onlyentry inindex.ndjson(additive; existing players ignore unknown entry types). The terminal player renders the keystrokes for them (Enter breaks the line, backspace erases, other control bytes in caret notation), in replay and live, shows an "input only" notice, and replays from the start instead of relying on seek anchors. The recorder no longer writes snapshots without output, since the screen is never fed.Changes:
m00086_record_terminal_output, entity field, admin parameters APIwarpgate-core/src/recordings/terminal.rsParameters.svelte, regenerated admin OpenAPI schemaTerminalRecordingPlayer.svelte: keystroke rendering for input-only recordingstest_terminal_recording_input_onlyNotes:
record_desktop_keyboard_input), so sessions already running keep their mode.sudopasswords) visible in the player; those bytes were always in the Input stream.AI Usage
Choose the level of AI involvement for this PR.
This is not to block AI contributions but rather to speed up PR review (saves time on trying to deduce the logic behind AI hallucinations).