Skip to content

Avoid redundant terminal row clears - #39075

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a9cac06f5624032a2b8c80a66c651cf3e85ec7fb
Aug 17, 2026
Merged

Avoid redundant terminal row clears#39075
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a9cac06f5624032a2b8c80a66c651cf3e85ec7fb

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 17, 2026

Copy link
Copy Markdown

Avoid redundant terminal row clears

Why

The custom TUI buffer diff emitted ClearToEnd for unchanged trailing blank
regions, producing unnecessary terminal output.

What changed

  • Clear a row tail only when its cached contents changed or a wide glyph overlaps
    the clear boundary.
  • Keep blank cells marked AlwaysUpdate in the drawable region so viewport
    invalidation still forces them to repaint.
  • Preserve Ratatui's native cell diff behavior for the remaining updates.

Testing

Add coverage for unchanged row tails, forced blank-cell updates, and shrinking
wide graphemes, including half-width katakana with combining marks.

## Why

The custom TUI buffer diff emitted `ClearToEnd` for unchanged trailing blank
regions, producing unnecessary terminal output.

## What changed

- Clear a row tail only when its cached contents changed or a wide glyph overlaps
  the clear boundary.
- Keep blank cells marked `AlwaysUpdate` in the drawable region so viewport
  invalidation still forces them to repaint.
- Preserve Ratatui's native cell diff behavior for the remaining updates.

## Testing

Add coverage for unchanged row tails, forced blank-cell updates, and shrinking
wide graphemes, including half-width katakana with combining marks.

GitOrigin-RevId: a9cac06f5624032a2b8c80a66c651cf3e85ec7fb
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a9cac06f5624032a2b8c80a66c651cf3e85ec7fb branch from ad40c64 to 37efa18 Compare August 17, 2026 20:44
@copyberry
copyberry Bot merged commit 37efa18 into main Aug 17, 2026
27 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a9cac06f5624032a2b8c80a66c651cf3e85ec7fb branch August 17, 2026 20:45
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 17, 2026
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.

1 participant