Skip to content

fix: stop showing an already-elapsed estimated session reset time - #28

Merged
coldhighsun merged 1 commit into
mainfrom
fix/session-reset-estimate-past-time
Sep 16, 2026
Merged

coldhighsun merged 1 commit into
mainfrom
fix/session-reset-estimate-past-time

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • BuildCurrentSessionWindow judged an estimated 5-hour session window's validity by the idle gap since the block's last message, instead of the block's own reset time, so a long-running block could keep displaying a Resets At that had already passed.
  • The window now expires as soon as its own estimated reset time (scanStart + 5h) is reached.
  • The estimated window start is floored to the nearest 10 minutes, so the displayed Resets At matches the granularity Claude's own UI shows (e.g. :30, :40).

Test plan

  • dotnet build AIUsageMonitor.slnx
  • dotnet test tests/AIUsageMonitor.Core.Tests --filter "FullyQualifiedName~SessionBlockBuilder" (12/12 passed)
  • dotnet test AIUsageMonitor.slnx (60/60 passed)

BuildCurrentSessionWindow judged an estimated 5-hour window's validity
by the gap since the block's last message instead of its own reset
time, so a long-running block could keep displaying a Resets At that
had already passed. It now expires the window as soon as its own
estimated reset time is reached, and floors the estimated window
start to the nearest 10 minutes so the displayed reset time matches
the granularity Claude's own UI shows.
@coldhighsun
coldhighsun merged commit 33b70da into main Sep 16, 2026
1 check passed
@coldhighsun
coldhighsun deleted the fix/session-reset-estimate-past-time branch September 16, 2026 07:17
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