Skip to content

Preview streaming prose before a newline arrives in the TUI - #45135

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/26c83c218b986625820b20779a46d1b800a7e0ff
Sep 12, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/26c83c218b986625820b20779a46d1b800a7e0ff

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Preview streaming prose before a newline arrives in the TUI

Why

Unterminated prose stayed hidden until a newline arrived or the stream completed, leaving long single-line responses invisible while they streamed.

What changed

  • Show live prose previews for agent messages and proposed plans, requesting redraws when the preview changes.
  • Keep previews out of the scrollback queue and render the full source on newline or completion without duplicating text.
  • Bound previews to the most recent 8 KiB at a Unicode character boundary, with an ellipsis for omitted text, and reflow them when the width changes.
  • Preserve holdback for incomplete table and code structures, retaining the last safe prose preview when a pipe arrives.

Testing

Add controller tests and TUI snapshots covering visibility before completion, resize reflow, finalization without duplication, long Unicode previews, table and code holdback, and inline visualization context.

## Why

Unterminated prose stayed hidden until a newline arrived or the stream completed, leaving long single-line responses invisible while they streamed.

## What changed

- Show live prose previews for agent messages and proposed plans, requesting redraws when the preview changes.
- Keep previews out of the scrollback queue and render the full source on newline or completion without duplicating text.
- Bound previews to the most recent 8 KiB at a Unicode character boundary, with an ellipsis for omitted text, and reflow them when the width changes.
- Preserve holdback for incomplete table and code structures, retaining the last safe prose preview when a pipe arrives.

## Testing

Add controller tests and TUI snapshots covering visibility before completion, resize reflow, finalization without duplication, long Unicode previews, table and code holdback, and inline visualization context.

GitOrigin-RevId: 26c83c218b986625820b20779a46d1b800a7e0ff
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/26c83c218b986625820b20779a46d1b800a7e0ff branch from 82ca33b to b966240 Compare September 12, 2026 23:54
@copyberry
copyberry Bot merged commit b966240 into main Sep 12, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/26c83c218b986625820b20779a46d1b800a7e0ff branch September 12, 2026 23:54
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 12, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — b966240b Deployed Sep 12, 2026 by ikekou via Identify potential duplicates (open issues fallback) #45077
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants