fix: charts time filter default state mismatch#600
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughInitial time filter default changed from 15 to 16 in the charts page, which affects the initial transaction list fetch and causes the 15D button to appear selected on first render. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #600 +/- ##
=======================================
Coverage 0.46% 0.46%
=======================================
Files 530 530
Lines 20953 20953
Branches 5257 5257
=======================================
Hits 97 97
Misses 20044 20044
Partials 812 812 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7824b5e to
866252e
Compare
The +1 offset on filter buttons is intentional — fetching an extra day provides a comparison point for chart readability (especially for 1D). Only fix: useState(15) → useState(16) so "15D" is selected on page load. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
useState(15)→useState(16)so the "15D" button is correctly selected on page load+1offset on filter buttons is intentional (provides comparison point for chart readability) — left untouched per reviewer feedbackChanges
src/pages/charts/index.tsxconst [timeFilter, setTimeFilter] = useState(15)→useState(16)to matchitem + 1whenitem = 15Test plan
Closes #598
🤖 Generated with Claude Code
Summary by CodeRabbit