fix: reset watch limits progress when a session restarts - #22
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--session-resettime elapses,watch --view limitswas 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.Resets Atupdates accordingly).watch limitsand "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.slnxdotnet test AIUsageMonitor.slnx(54/54 passing, including new/updatedSessionBlockBuilderTests)watch --view limitswith an elapsed--session-resetand confirm the session row clears to "waiting for a new session" until new activity appears, then resets correctly