fix: limit chart data to last 90 days#140
Conversation
✅ Deploy Preview for agentscan ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAccountEventsTimeline now computes a UTC-based 90-day rolling window (dayRangeLimit = 90) from qualifying GitHub events, filters events to that window (limitedEvents), and uses limitedEvents for hourly time labels and building the per-event chart dataset via a constant activeGitHubEventTypes list. ChangesEvent days rolling window & dataset
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/components/Chart/AccountEventsTimeline.vue`:
- Around line 98-113: The hourly labels are still generated from all events by
getCompleteHourRange(props.events), bypassing the 90-day/eventDays window;
update the hourly-label generation to use the same filtered range: either pass
the computed startDay/lastDay (from the eventDays computation that derives
startDay) into getCompleteHourRange or, after calling getCompleteHourRange,
filter its returned hours to only include timestamps between startDay
(inclusive) and lastDay (inclusive). Reference the computed that builds
days/startDay (lines with variables days, lastDay, startDate, startDay) and
getCompleteHourRange so the hourly mode cannot expand beyond the same
constrained eventDays.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b47d6b45-c6a9-4380-8b55-81c4ec821685
📒 Files selected for processing (1)
app/components/Chart/AccountEventsTimeline.vue

This limits the chart dataset to the last 90 days, to avoid long streaks of empty days when a set contains a very old date.
Summary by CodeRabbit