Skip to content

Improve weekly usage trend and forecast - #14

Merged
TheBeems merged 4 commits into
mainfrom
agent/weekly-trend-adaptive-forecast
Jul 18, 2026
Merged

Improve weekly usage trend and forecast#14
TheBeems merged 4 commits into
mainfrom
agent/weekly-trend-adaptive-forecast

Conversation

@TheBeems

Copy link
Copy Markdown
Owner

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review


P1 Badge Pass the window start into adaptive projection

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".

Comment on lines +137 to +140
_adaptiveWeeklyUsageStore.Record(
Current.Secondary,
_weeklyHistory,
GetAdaptiveMaximumGap());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@TheBeems
TheBeems merged commit 68f0eb5 into main Jul 18, 2026
1 check passed
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