fix: prioritize path truncation in changes sidebar#2090
Conversation
jschwxrz
commented
May 18, 2026
- adjusts changes sidebar file row layout so the directory path truncates before the filename
- keeps the path directly next to the filename when there is enough horizontal space
- allows the filename to truncate only once the path has collapsed under tight space
Greptile SummaryThis PR adjusts the Tailwind flex layout of
Confidence Score: 5/5Safe to merge — the change is purely cosmetic, touching only Tailwind classes on the sidebar row layout with no logic alterations. The diff is a focused CSS-only change to four class strings. The flex properties used (shrink-0, max-w-full, shrink, min-w-0, flex-1) interact correctly to produce the priority-truncation order described in the PR: directory collapses before the filename, and the filename truncates only when the container is too narrow even for it alone. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/features/tasks/diff-view/changes-panel/components/changes-list-item.tsx | Flex layout rework to prioritize path truncation over filename truncation; no logic changes, only Tailwind class adjustments. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Available width in sidebar row] --> B{filename natural width\n≤ container width?}
B -- Yes --> C[Filename renders at natural width\nDirectory fills remaining space]
C --> D{Directory natural width\nfits remaining space?}
D -- Yes --> E[Both shown in full]
D -- No --> F[Directory shrinks and truncates\nFilename unchanged]
B -- No --> G[max-w-full caps filename at 100% of container\nFilename truncates via truncate class\nDirectory collapses to 0px]
Reviews (1): Last reviewed commit: "fix: prioritize path truncation in chang..." | Re-trigger Greptile