fix(tui): preserve wrapped prose beside URLs#21760
Merged
Merged
Conversation
fcoury-oai
added a commit
that referenced
this pull request
May 9, 2026
fcoury-oai
added a commit
that referenced
this pull request
May 9, 2026
fcoury-oai
added a commit
that referenced
this pull request
May 9, 2026
1006db5 to
c126e01
Compare
etraut-openai
approved these changes
May 9, 2026
Collaborator
etraut-openai
left a comment
There was a problem hiding this comment.
Nice. Code looks good. I also build and verified the existing buggy behavior using some test prompts and confirmed that the bug is fixed with this change.
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
Mixed prose lines that contained URLs started taking the URL-preserving wrapping path, but that path could split ordinary words mid-token. A follow-up issue remained in scrollback insertion: when already-rendered indented rows were wrapped again, continuation rows could lose their margin and fall back to terminal hard wrapping. Together those bugs made normal Markdown output look broken around links, lists, blockquotes, and indented content.
Separately, the local argument-comment lint wrappers failed under environments that set
PYTHONSAFEPATH=1, because Python no longer adds the script directory tosys.pathautomatically. That prevented the lint from reaching Rust callsites at all.What Changed
sys.path, so sibling imports still work whenPYTHONSAFEPATH=1.How to Test
PYTHONSAFEPATH=1and confirm it starts normally instead of failing to importwrapper_common.Targeted tests:
cargo test -p codex-tui mixed_line --libcargo test -p codex-tui preserves_prefix_on_wrapped_rows --libcargo test -p codex-tui agent_markdown_cell_does_not_split_words_after_inline_markdown --libcargo test -p codex-tui mixed_url_markdown_wraps_prose_without_splitting_words_snapshot --libpython3 tools/argument-comment-lint/test_wrapper_common.pyjust argument-comment-lint-from-source -p codex-tui -- --libNotes:
cargo test -p codex-tuicurrently reaches the new tests successfully, then still aborts in the pre-existingtests::fork_last_filters_latest_session_by_cwd_unless_show_allstack-overflow failure.