Skip to content

Fix watch limits token-progress mismatch and add update-check docs - #23

Merged
coldhighsun merged 3 commits into
mainfrom
fix/watch-limits-progress-mismatch
Sep 15, 2026
Merged

coldhighsun merged 3 commits into
mainfrom
fix/watch-limits-progress-mismatch

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • feat: check GitHub for newer releases on startup
  • fix: derive watch --view limits token limit from anchor-pinned window totals, so the progress shown right after entering a session/week percentage matches what was entered (most visible for the week window)
  • docs: document the update-check behavior in the README (EN/中文)

Test plan

  • dotnet build AIUsageMonitor.slnx
  • Manually run aimon watch and confirm entering a week token-progress percentage shows the same percentage immediately after

Adds a standalone AIUsageMonitor.UpdateCheck project that queries GitHub's
latest-release API and compares it against the running version. Every
command checks once after finishing; watch checks once before entering its
refresh loop and keeps the notice pinned to the bottom of the view for the
whole session.
The token limit was being derived from TotalTokens fetched before the
real session/week reset times were resolved, while every subsequent
render used TotalTokens from the anchor-pinned window. This mismatch
made the progress bar show a different percentage than the one just
entered, most visibly for the week window.
@coldhighsun
coldhighsun merged commit c9e8b85 into main Sep 15, 2026
4 checks passed
@coldhighsun
coldhighsun deleted the fix/watch-limits-progress-mismatch branch September 15, 2026 07:21
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