fix(tui): keep raw output above composer in zellij#24593
Merged
Conversation
Contributor
canvrno-oai
approved these changes
May 26, 2026
Contributor
Author
Can you check your zellij version with |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Why
Raw output mode intentionally sends logical source lines to the terminal without Codex-inserted wrapping so copied content retains its original line structure. In Zellij, soft-wrapped continuation rows from those raw lines are not confined by the inline history scroll region. When raw mode replays a long transcript, continuation rows can occupy the composer viewport and are overwritten on the following draw, leaving the transcript visibly truncated underneath the composer.
This is specific to the combination of Zellij and raw terminal-wrapped history. Rich output and non-Zellij terminals should continue using the existing insertion behavior.
Related context: #20819 introduced raw output mode, and #22214 removed the broad Zellij insertion workaround after the standard rich-output path no longer required it.
What Changed
Tuiand select a dedicated insertion mode only forHistoryLineWrapPolicy::Terminalbatches in Zellij.How to Test
Targeted tests run:
just test -p codex-tui vt100_zellij_raw -- --nocaptureAdditional validation notes:
just test -p codex-tuiwas attempted; the two new Zellij raw insertion tests passed, while two existingapp::tests::update_feature_flags_disabling_guardian_*tests failed outside this history insertion path.just argument-comment-lintwas attempted but local Bazel analysis fails before reaching the changed source because the LLVMcompiler-rtpackage is missinginclude/sanitizer/*.h. Modified literal callsites were inspected manually.