Findings-list renderer wraps long file paths mid-word, causing overlapping/garbled text
Description
When the structured code-review findings display renders a finding whosefile:line string is long (e.g. a deeply-nested path likesrc/app/widgets/forms/input_validator_helper.py:1234), the path wraps
mid-identifier inside its column (e.g. splitting a filename across
lines mid-word). The [category] tag and the — summary text appear
to be positioned at fixed column offsets that assume the file:line
fits on a single line, so when it wraps instead, they collide with and
overlap the wrapped path text — producing unreadable, garbled output.
Note: this is not a narrow-terminal issue — reproduced in a wide pane
(~200+ columns of dense text visible on the summary lines).
Here's a screenshot of the issue using made-up file names and everyone's favourite filler text
<img width="2521" height="456" alt="Image" src="https://github.com/user-attachments/assets/803df7a0-ffd9-48cf-b40b-784d0b663c77" />
Steps to reproduce
- Trigger a code-review findings display (e.g. via
/code-review) in a
repo with long/deeply-nested file paths.
- Get a finding whose full
path/to/file.py:NNNexceeds the renderer's
allotted file/line column width.
- Observe the category tag and summary text overlapping the wrapped path.
Expected behavior
Long paths should truncate gracefully with a leading ellipsis so the
filename:line stays intact and readable, e.g.:.../forms/input_validator_helper.py:1234
instead of wrapping mid-word and colliding with adjacent columns.
Environment
- OS: Linux
- Wide terminal pane (not a narrow-width scenario)
🤖 Largely written by Claude 🤖
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
🤖 Written by Claude 🤖
Follow-up investigation, since I wanted to double check my "wide terminal" comment above wasn't a red herring.
I tried building a minimal repro using two variants of the same findings-list display:
So path length alone doesn't seem to be the trigger — file existence does. That suggests the renderer does something conditional on the file being real (e.g. wrapping the path in a clickable terminal hyperlink escape sequence such as OSC 8, or doing a metadata/existence lookup that changes the rendered string), and that extra content's invisible/non-printing bytes are likely being counted toward the visible-width calculation used to decide wrap points — landing the wrap in the wrong place and causing the category tag / summary text to overlap it.
Possible pointer for whoever picks this up: check whether the wrap-width computation strips terminal hyperlink/OSC-8 escape sequences (or whatever extra decoration is applied only for existing files) before computing where to wrap, rather than counting their raw byte length.
Happy to provide more repro details if useful — this was tested in a real terminal session with real (throwaway, empty) files on disk at matching path depths/lengths.
Reproduction (also added to description above)
<img width="2521" height="456" alt="Image" src="https://github.com/user-attachments/assets/4db366fa-7c1e-4db5-b8b7-63961412c0bd" />
Thanks for the detailed repro. I tried this on 2.1.233 (Linux, tmux, 70×30 pane): git repo with an uncommitted buggy change in
src/app/widgets/forms/input_validator_helper.py, ran/code-review low, and captured the findings list when it rendered.The display has since been reworked: findings are now grouped under the file path on its own line, with line/category/summary in aligned columns, and a flowing layout on very narrow terminals. In my captures the long path stayed intact (no mid-word wrapping, no overlapping text) at both 70 and 120 columns:
This was a real issue on 2.1.205, but it was fixed in a recent release (changelog). Closing — please update to the latest version, and reply here if you still see garbled output and we'll reopen.
🤖 Generated with Claude Code