Problem Statement
Is your feature request related to a problem?
The commit activity chart has a 7d / 14d / 30d / 90d range selector, but the PR Analytics widget always shows all-time data — creating inconsistency when reviewing a specific time period.
Describe the solution you'd like
Add the same range selector to the PR Analytics widget so users can filter average review time, merge rate, and open/closed PR counts by time range.
Proposed Solution
Proposed Solution
- Reuse the existing range selector component from the commit chart
- Pass selected range as a query param to
/api/metrics/prs?range=30d
- Update the PR metrics API route to accept and apply the
range param
- Default range:
30d
- All PR stat tiles (merge rate, review time, PR counts) update on range change
Implementation Notes
- Check
src/app/api/metrics/prs/ — extend date filtering if not already supported
- Reuse the same
RangeSelector or toggle component used by the commit chart
- Avoid duplicate fetches — debounce or use
useEffect with range as dependency
Why this helps
Makes PR analytics consistent with commit analytics and gives users meaningful time-scoped insights.
Checklist
Feature Area
Dashboard
Alternatives Considered
No response
Acceptance Criteria
Additional Context
No response
Problem Statement
Is your feature request related to a problem?
The commit activity chart has a 7d / 14d / 30d / 90d range selector, but the PR Analytics widget always shows all-time data — creating inconsistency when reviewing a specific time period.
Describe the solution you'd like
Add the same range selector to the PR Analytics widget so users can filter average review time, merge rate, and open/closed PR counts by time range.
Proposed Solution
Proposed Solution
/api/metrics/prs?range=30drangeparam30dImplementation Notes
src/app/api/metrics/prs/— extend date filtering if not already supportedRangeSelectoror toggle component used by the commit chartuseEffectwith range as dependencyWhy this helps
Makes PR analytics consistent with commit analytics and gives users meaningful time-scoped insights.
Checklist
rangequery paramFeature Area
Dashboard
Alternatives Considered
No response
Acceptance Criteria
Additional Context
No response