feat(tui): use ellipsis in middle of file path instead of truncating for modified files list#9590
feat(tui): use ellipsis in middle of file path instead of truncating for modified files list#9590angristan wants to merge 2 commits into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
There was a problem hiding this comment.
Pull request overview
This PR improves the user experience in the TUI by displaying file paths with middle truncation (ellipsis in the middle) instead of end truncation in the modified files list. This preserves the filename and extension, which are often the most important parts of the path.
Changes:
- Added constants for sidebar width calculations to enable dynamic file path truncation
- Updated modified files list to use
Locale.truncateMiddle()with calculated width based on available space - Width calculation accounts for sidebar padding and stats display (additions/deletions)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
ed381c2 to
3c7e99e
Compare
|
Hope it's OK to bump this, I'd really like this as well. |
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |

Closes #9592
What does this PR do?
I watched this video a couple of days ago where Scott Jenson talks about early on macOS where they moved the ellipsis in the middle of the file instead of the end to not trim critical information.

I found myself needing this in opencode, because when paths get long, the actual filename get truncated so the modified files list is less useful.
How did you verify your code works?
After/before: