Skip to content

Keep streamed command output bounded in the TUI - #34359

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3cf3cc862db686f20ac09b1f6e7f9dc6d264e6eb
Jul 20, 2026
Merged

Keep streamed command output bounded in the TUI#34359
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3cf3cc862db686f20ac09b1f6e7f9dc6d264e6eb

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 20, 2026

Copy link
Copy Markdown

Keep streamed command output bounded in the TUI

Why

Large command streams, including commands that never emit a newline, can make an active TUI cell grow without bound.

What changed

  • Retain live output in full up to 1 MiB, then preserve the first and last 50 completed lines plus the current partial line.
  • Bound individual long lines while preserving UTF-8 boundaries, visible head and tail content, and ANSI rendering around omission markers.
  • Show omitted line and byte counts in previews and transcripts. Final command output still replaces the bounded live preview when execution completes.

Testing

Added unit and snapshot coverage for chunk boundaries, split CRLF sequences, newline-free and UTF-8 output, truncated ANSI sequences, retained-output limits, and preview and transcript rendering.

## Why

Large command streams, including commands that never emit a newline, can make an active TUI cell grow without bound.

## What changed

- Retain live output in full up to 1 MiB, then preserve the first and last 50 completed lines plus the current partial line.
- Bound individual long lines while preserving UTF-8 boundaries, visible head and tail content, and ANSI rendering around omission markers.
- Show omitted line and byte counts in previews and transcripts. Final command output still replaces the bounded live preview when execution completes.

## Testing

Added unit and snapshot coverage for chunk boundaries, split CRLF sequences, newline-free and UTF-8 output, truncated ANSI sequences, retained-output limits, and preview and transcript rendering.

GitOrigin-RevId: 3cf3cc862db686f20ac09b1f6e7f9dc6d264e6eb
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3cf3cc862db686f20ac09b1f6e7f9dc6d264e6eb branch from e50dc4a to ef6b597 Compare July 20, 2026 14:45
@copyberry
copyberry Bot merged commit ef6b597 into main Jul 20, 2026
30 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3cf3cc862db686f20ac09b1f6e7f9dc6d264e6eb branch July 20, 2026 14:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant