Repository navigation
fix(desktop): hide v2 sidebar LOC badge when workspace has no changes - #3399
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the conditional rendering logic in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Greptile SummaryThis PR suppresses the
Confidence Score: 5/5Safe to merge — the change is a one-condition guard on a purely presentational badge with no side effects. The fix is minimal (7 lines changed), the types are sound ( No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[useDiffStats hook] -->|null while loading| B{diffStats === null?}
A -->|DiffStats object| B
B -->|Yes - null| C[Badge hidden]
B -->|No - has object| D{additions > 0 OR deletions > 0?}
D -->|No - both zero| E[Badge hidden — PR fix]
D -->|Yes - has changes| F[DashboardSidebarWorkspaceDiffStats rendered]
F --> G[Shows +N −M badge]
G --> H[Fades on hover]
Reviews (1): Last reviewed commit: "fix(desktop): hide v2 sidebar LOC badge ..." | Re-trigger Greptile |
Summary
+0 −0diff-stats badge when a workspace has no additions and no deletions.Test plan
Summary by cubic
Hide the +0 −0 diff-stats badge in the v2 dashboard sidebar when a workspace has no additions or deletions. The badge now appears only when there are actual changes to reduce visual noise.
Written for commit c4babb1. Summary will update on new commits.
Summary by CodeRabbit