Improve weekly usage trend and forecast - #14
Conversation
There was a problem hiding this comment.
💡 Codex Review
When the weekly card is built with adaptiveWeeklyForecastEnabled and populated adaptiveWeeklyHistory, this call still supplies null as windowStartsAt. AnalyzeTrend only invokes AdaptiveWeeklyForecast.Project in its non-null windowStartsAt branch, so the new history arguments always fall through to the current-pace-only path and the dashboard/status/chart never use the learned forecast.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _adaptiveWeeklyUsageStore.Record( | ||
| Current.Secondary, | ||
| _weeklyHistory, | ||
| GetAdaptiveMaximumGap()); |
There was a problem hiding this comment.
Skip replaying samples collected while forecasting was paused
When a user turns adaptive forecasting back on after it was off, this immediate Record call replays every weekly-history sample newer than the store's old LastSample. Because weekly history is still collected while disabled, the disabled interval is learned retroactively, so the setting does not actually “pause learning” as described in the settings and README; re-enabling should advance the baseline or otherwise ignore samples collected while paused.
Useful? React with 👍 / 👎.
Adds a calendar-day weekly trend with fixed-width day columns, gap-spanning observed lines, reset-aware segmentation, and a cautious locally stored adaptive forecast. It fixes misleading weekday-only and reset-boundary rendering, and lets users pause adaptive forecasting or delete learned history. Root cause: quota-relative buckets and sparse sampling were being rendered as calendar-day data. Validated with 95 passing tests on x64 and ARM64, ARM64 Debug build, and ARM64 integration registration.