fix(tui): show complete edit previews in details - #4722
Conversation
Keep the compact edit_file approval card bounded, but build and render the complete search and replacement preview lazily in the Alt+V details pager. This gives reviewers a readable full replacement boundary without adding work to the per-frame render path. Add regression coverage for search and replacement bodies beyond the three-line card summary. Fixes Hmbown#4659 Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec75b9a1d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Render Alt+V edit preview chunks with explicit escapes for spaces, tabs, quotes, backslashes, LF, and CRLF so PagerView wrapping cannot collapse source-significant whitespace. Exercise the rendered pager path with mixed indentation and line endings. Addresses Codex review on Hmbown#4722. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a475b65991
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Derive the Alt+V exact edit preview headings from the active locale without changing the compact approval card path. Add regression coverage for every shipped locale. Addresses Codex review on Hmbown#4722. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Render Alt+V edit preview chunks with explicit escapes for spaces, tabs, quotes, backslashes, LF, and CRLF so PagerView wrapping cannot collapse source-significant whitespace. Exercise the rendered pager path with mixed indentation and line endings. Addresses Codex review on #4722. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com> (cherry picked from commit a475b65)
Derive the Alt+V exact edit preview headings from the active locale without changing the compact approval card path. Add regression coverage for every shipped locale. Addresses Codex review on #4722. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com> (cherry picked from commit d180cb5)
|
Thanks @nightt5879 — landed, and #4659 is closed. This reached Not merging the branch itself is deliberate: the only remaining delta is main-side improvement your PR predates — selection now wraps via |
What
edit_fileapproval card bounded.-/+search/replace preview lazily in the Alt+V details pager.Why
The card preview intentionally stays compact, but the details pager previously fell back to raw JSON. That left multiline replacement boundaries difficult to review. Building the full preview only when the pager opens avoids adding unbounded work to the per-frame render path.
Verification
cargo fmt --all -- --checkcargo test -p codewhale-tui --bin codewhale-tui --locked edit_file— 21 passedcargo test -p codewhale-tui --bin codewhale-tui --locked tui::approval::tests::— 99 passedcargo check -p codewhale-tui --all-targets --lockedcargo test --workspace --doc --lockedechobeing a shell built-in, PowerShell redirection producing UTF-16, and a user-home instruction fixture. The parallel-only external approval count failure passed in isolation.Fixes #4659