Improve adaptive forecasts and show allowance restorations - #15
Conversation
There was a problem hiding this comment.
💡 Codex Review
https://github.com/TheBeems/CodexUsageDock/blob/23816c812b48431a0f1818766eb8f532d4d9e56c/CodexUsageService.cs#L202
Preserve baseline requests until a weekly sample exists
When adaptive forecasting is re-enabled while the current snapshot has no weekly window (for example, data is temporarily unavailable or only a five-hour limit is returned), AdvanceBaseline returns without updating LastSample, but this line still clears _adaptiveWeeklyForecastNeedsBaseline. The next valid weekly refresh then falls into Record() and replays all stored samples after the old baseline, so measurements collected while the forecast was paused can be learned despite the setting’s documented behavior; keep the flag set unless a baseline was actually advanced.
ℹ️ 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".
Summary
User impact
Weekly usage changes that restore allowance are now explicit instead of appearing only as an unexplained line break. Forecasts restart from the latest restoration and continue to treat current pace as the primary signal.
Validation
git diff --cached --checkpassed before commitRemaining manual check
Reload Command Palette Extension and visually verify restoration marker contrast and text wrapping in narrow and wide layouts, light and dark themes, and high contrast.