Hide zero-value sidebar file stats#174
Conversation
Greptile SummaryThis PR hides zero-value
Confidence Score: 5/5This PR is safe to merge — a focused, well-tested UI polish change with no logic regressions. All changes are additive and well-covered by new tests. Null propagation is handled correctly throughout the stack from formatSidebarStat through FileListEntry → sidebarEntryStats → sidebarEntryStatsWidth → SidebarPane statsWidth → FileListItem rendering. There are no P0 or P1 issues. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[buildSidebarEntries] --> B["formatSidebarStat('+', additions)"]
A --> C["formatSidebarStat('-', deletions)"]
B --> D{value > 0?}
C --> D
D -->|yes| E["+N / -N string"]
D -->|no| F[null]
E --> G["FileListEntry\nadditionsText / deletionsText"]
F --> G
G --> H[sidebarEntryStats]
H --> I{additionsText truthy?}
H --> J{deletionsText truthy?}
I -->|yes| K[push addition badge]
J -->|yes| L[push deletion badge]
I -->|no| M[skip]
J -->|no| M
K --> N[sidebarEntryStatsWidth]
L --> N
N --> O["SidebarPane\nstatsWidth = max across entries"]
O --> P["FileListItem\nflex-end right-aligned stats section"]
Reviews (1): Last reviewed commit: "Hide zero-value sidebar file stats" | Re-trigger Greptile |
Summary
+0and-0badges in the file list sidebarTesting
bun run typecheckbun testbun run test:tty-smoke