Skip to content

fix: reset watch limits progress when a session restarts - #22

Merged
coldhighsun merged 2 commits into
mainfrom
fix/watch-limits-session-reset
Sep 15, 2026
Merged

coldhighsun merged 2 commits into
mainfrom
fix/watch-limits-session-reset

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • Once a confirmed --session-reset time elapses, watch --view limits was merging pre-reset activity into the new window whenever there was no >5h idle gap, so the progress bars kept showing the previous session's stale totals instead of resetting.
  • Filter the local scan to only messages at or after the elapsed reset time, so the window clears to "unknown"/waiting until the new session's first message arrives, then starts fresh from it (Resets At updates accordingly).
  • Simplify the watch limits and "How it works" sections in the README (EN + 中文), replacing dense paragraphs with a bullet list and pointing to CLAUDE.md for architecture detail.

Test plan

  • dotnet build AIUsageMonitor.slnx
  • dotnet test AIUsageMonitor.slnx (54/54 passing, including new/updated SessionBlockBuilderTests)
  • Manual: run watch --view limits with an elapsed --session-reset and confirm the session row clears to "waiting for a new session" until new activity appears, then resets correctly

Once a confirmed session reset time elapses, the current-session window
was falling back to a purely activity-based scan of the entire history,
which merged pre-reset messages into the new window whenever there was
no >5h idle gap - keeping the old session's totals and reset time on
screen instead of clearing and waiting for the new session to begin.

Filter the scan to only messages at or after the elapsed reset time, and
show a dedicated "waiting for a new session" note in that state.
The limits explanation and architecture summary had grown into dense,
paragraph-long prose. Break the option list into bullets and point to
CLAUDE.md for the full data-flow detail instead of duplicating it.
@coldhighsun
coldhighsun merged commit 4489751 into main Sep 15, 2026
4 checks passed
@coldhighsun
coldhighsun deleted the fix/watch-limits-session-reset branch September 15, 2026 06:50
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