fix(ui): align activity heading count with sidebar#258
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR fixes an activity count discrepancy between the sidebar badge and activity view heading by introducing an optional Changes
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR fixes the inconsistency between the sidebar badge ( Confidence Score: 5/5Safe to merge — the change is minimal, well-scoped, and backed by both unit and integration tests. No P0 or P1 findings. The No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[useGitHubData] -->|stats.unreadActivity| B[App MainContent]
A -->|dashboard.recentActivity| B
B -->|headerCount| C[ActivityFeed]
B -->|activities| C
C --> D{isLoading?}
D -- yes --> E[sectionCount = undefined]
D -- no --> F{headerCount defined?}
F -- yes --> G[sectionCount = headerCount]
F -- no --> H[sectionCount = visible.length]
G --> I[SectionHead shows headerCount]
H --> I2[SectionHead shows visible.length]
E --> I3[SectionHead shows no count]
C --> J[Filter and search applied]
J --> K[Render visible items only]
Reviews (1): Last reviewed commit: "fix(ui): align activity heading count wi..." | Re-trigger Greptile |
Summary
Root Cause
The sidebar badge used
stats.unreadActivity, while the Activity view header displayed the count of currently visible feed items. That made the two numbers diverge whenever the loaded or filtered list did not match the total unread count.Validation
npm test -- src/components/ActivityFeed/ActivityFeed.test.tsx src/App.test.tsxnpx oxlint src/App.tsx src/components/ActivityFeed/ActivityFeed.tsx src/App.test.tsx src/components/ActivityFeed/ActivityFeed.test.tsxCloses #250
Summary by cubic
Fixes inconsistent counts by aligning the Activity view header with the sidebar badge. The header now shows total unread from
stats.unreadActivity, not the filtered list. Closes #250.stats.unreadActivityfromuseGitHubDatatoActivityFeedviaheaderCount.Written for commit 8ecfe1d. Summary will update on new commits.
Summary by CodeRabbit
New Features
Tests