Skip to content

feat: add date range filter to dashboard and anti-patterns pages#175

Open
kumaresan-subramani wants to merge 1 commit into
microsoft:mainfrom
kumaresan-subramani:main
Open

feat: add date range filter to dashboard and anti-patterns pages#175
kumaresan-subramani wants to merge 1 commit into
microsoft:mainfrom
kumaresan-subramani:main

Conversation

@kumaresan-subramani

@kumaresan-subramani kumaresan-subramani commented Jul 7, 2026

Copy link
Copy Markdown

Description

Adds date range filtering to the Dashboard and Anti-Patterns pages, allowing users to focus analysis on specific time periods (Last 7/28/90/180 days or all-time data).

Changes

  • Add activeRangeDays module-level state to track selected date range
  • Implement buildRangeFilter() helper function that dynamically calculates fromDate based on selected range
  • Update all RPC calls in Dashboard page (getStats, getDailyActivity, getWorkspaceBreakdown, getHarnessBreakdown, getAntiPatterns, getCodeProduction) to use filtered date range
  • Update all RPC calls in Anti-Patterns page (getAntiPatterns, getRuleEditor) to use filtered date range
  • Add 5 preset date range buttons to both pages (Last 7 days, Last 4 weeks, Last 3 months, Last 6 months, All time)
  • Wire event listeners for instant re-rendering when date range changes
  • Pass filtered context to rule editor so rule testing respects selected date range
  • Use existing .cons-range-bar and .cons-range-btn CSS classes (no new styles needed)

User Experience

  • Users can now click date range buttons to quickly filter data
  • Selected range persists across tab/page navigation
  • Rule testing in editor respects the selected date range
  • Active button styling shows current selection

Related Issues

Checklist

  • npm run check passes (typecheck + lint + spellcheck + knip + tests)
  • Changes are covered by tests (if applicable)
  • Documentation updated (if applicable)

final output

image image

- Add date range preset buttons (Last 7/28/90/180 days, All time)
- Add buildRangeFilter() helper to dynamically apply date filters
- Update all RPC calls to use filtered date range
- Wire date filter event listeners for instant re-render
- Pass filtered context to rule editor testing

Applies to:
- Dashboard page: filters daily activity and all metrics
- Anti-Patterns page: filters health scores and pattern findings
- Rule editor: tests rules against selected date range
@kumaresan-subramani

kumaresan-subramani commented Jul 7, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

issue - #174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant