Add ability to scope homepage metrics by time range: Today, This Week, This Month, All Time.
Design: Add a row of toggle buttons above the stats-grid: [Today] [This Week] [This Month] [All Time]
Default selection: All Time
Implementation:
1. Add route with query param: "home" :> QueryParam "range" Text :> Get '[Lucid.HTML] HomePage
Range values: "today", "week", "month", "all" (default)
2. In homeHandler, filter tasks by range before computing stats:
3. Also filter activities by range for cost/duration metrics.
4. Update HomePage ToHtml to render toggle buttons: Lucid.div_ [Lucid.class_ "time-filter"] <| do timeFilterBtn "Today" "today" currentRange timeFilterBtn "This Week" "week" currentRange timeFilterBtn "This Month" "month" currentRange timeFilterBtn "All Time" "all" currentRange
Each button is an anchor to /?range=X with active class if selected.
5. Add CSS for .time-filter:
Dependencies: t-179 (cost/duration metrics)
No activity yet.