Repository navigation
feat: period comparison, per-account history, more rows with a series - #105
Merged
Merged
Conversation
Period comparison ("+12% vs last week"), dropped with the ETA in 2c2e289
and still listed in the README, is back on the quota rows. Rows carry an
optional periodMs (5 h, 7 d, or the calendar month that ends at resetAt),
and UsageHistory.periodChange compares the usage now with the same point
of the period before:
- a window of a day or more against itself, as far into the window
before; a monthly one is laid over the calendar month before it, so the
10th is held against the 10th whether that month had 28 days or 31;
- a shorter one (a 5-hour session starts when it is first used) as today
against yesterday up to the same time, summed across the resets.
It reports a relative change and says nothing when the history has a hole
at the point compared with or the baseline is under 5 points. The old
version read whatever sample lay one fixed period back.
Extra accounts (claude@work) now record their own history series: relabel
suffixes historyValues, chartWindows[].key and quotaWindows[].historyKey
with "@<key>", so chart, ETA and comparison read that login alone instead
of a series fed by two. The chart's Antigravity and money special cases
follow the suffix. History recorded before this stays under the base keys.
Rows that had no series get one, and with it an ETA and a comparison:
Z.AI 7-day tokens and monthly tools (za7, zat), Cursor Auto and API (cua,
cup), Claude scoped weeks (their row key) and Codex additional limits
(cx_<model>_s / _w).
scripts/eta-replay.js scores the ETA's burn rate against a recorded
history file, per half-life and next to the old six-hour fit. On 48 days
of real history the new rate is ~15% closer overall one hour ahead (26%
on the active Claude session), 30 min is the best session half-life and
6 h the best for weekly rows 24 h ahead: the shipped constants stand.
Contributor
Windows screenshots (ef20c7b)Build and downloadable PNGs · updated with every new commit |
Contributor
macOS screenshots (ef20c7b)Build and downloadable PNGs · updated with every new commit |
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.








Period comparison ("+12% vs last week"), dropped with the ETA in 2c2e289 and still listed in the README, is back on the quota rows. Rows carry an optional periodMs (5 h, 7 d, or the calendar month that ends at resetAt), and UsageHistory.periodChange compares the usage now with the same point of the period before:
Extra accounts (claude@work) now record their own history series: relabel suffixes historyValues, chartWindows[].key and quotaWindows[].historyKey with "@", so chart, ETA and comparison read that login alone instead of a series fed by two. The chart's Antigravity and money special cases follow the suffix. History recorded before this stays under the base keys.
Rows that had no series get one, and with it an ETA and a comparison: Z.AI 7-day tokens and monthly tools (za7, zat), Cursor Auto and API (cua, cup), Claude scoped weeks (their row key) and Codex additional limits (cx__s / _w).
scripts/eta-replay.js scores the ETA's burn rate against a recorded history file, per half-life and next to the old six-hour fit. On 48 days of real history the new rate is ~15% closer overall one hour ahead (26% on the active Claude session), 30 min is the best session half-life and 6 h the best for weekly rows 24 h ahead: the shipped constants stand.