TokenEnd only saw the real spans, so an instance kept the boundary hour
that its inferred successor also counted. Two adjacent inferred weeks then
both showed the same tokens, which made false past peaks (D7).
One backward walk now yields every instance with the start of the instance
that follows it. Analyze takes its first eight past instances from it and
the reset history uses it for its real instances, so the window charts and
the reset list agree. An instance that resets before a gap keeps its end
hour, as before.
Refs #14
The reset history builds on #13's panel and day budgets, so its PR stacks
on #15.
Conflicts: D8 lists both the per-day budgets and the reset history. The
weight helper from #13 now takes the instance's exclusive token end, so
the day baseline counts tokens like its instance does, without the
boundary hour a later instance owns (D7).
Refs #14
The second review found that the hour bucket holding the first sample
keeps growing after it, so use later in that hour still moved the
estimated baseline and both budgets. Following D7, the estimate now
counts only the whole hours before that sample's hour. No counted bucket
can grow after the sample, so later samples and tokens no longer move it.
Refs #13
On the developer's data the section counted the running instance as a
reset, showed zeros before anything finished, and drew the skipped time
of five early resets over almost the whole timeline (D12).
The Resets tile now counts finished instances and names the running one.
Unused, Gift and the median say when nothing finished or reset early.
Skipped time is a thin hatched bar below the plot, one lane per overlap,
and the axis no longer runs on to the running instance's reset. Percent
and limit values follow the user's culture, and figures in captions do
not wrap.
The reset tooltip is tall. Where it could not fit above or below the
pointer it slid over it, took the hover from the chart and vanished.
Tall tooltips now open beside the pointer and use the width DataTooltip
asks for.
Refs #14
An estimated day baseline took its scale from the newest sample, so use
from the web lowered the budget while today stayed within it. It now takes
the scale from the first sample at or after the day start (D7). The stale
sample warning moves into the "used" caption, so tiles of one kind keep the
same rows (D8). Both answer the first review of #15.
Refs #13
The developer wants figures for every reset: how long an instance lasted,
its tokens, its final use, its API value, what it left unused and what an
early reset handed out (D12, D13). Instances come from one window series,
so a Codex limit that moves between the primary and secondary slot stays
one history (D7).
Building the spans once also fixes two D7 cases: the hour in which one
instance ends and the next starts goes to the new instance instead of
being lost, and a late sample of an old instance no longer places it after
a newer one.
Refs #14
Refs #9
The budget was the rest of the week over the time left, so each use today
lowered it and a partial first day was held to a full day. Now each day of
the instance has its share, its even pace and its budget. Today's budget
starts from the use at the day start and does not move with today's use
(D7). Forecasts start at 2 % of a window, so an early reset no longer hides
them for most of a day.
Limit tiles of one kind show the same rows, with placeholders that say why
a value is missing. The week chart draws per-day steps and marks the
instance start and reset (D8). Week token totals follow the provider's
limit week and say since when, with the calendar week as fallback (D9).
Refs #13
The headless forecast test failed from 2026-10-16 on because the panel
read the real clock while its fixture fixes the time.
- App: PanelWindow takes an optional TimeProvider (the system clock by
default) and passes it to the pace bar, burn-up, peak and usage charts
and every forecast label. The burn-up chart uses the panel's render
time as now.
- Tests: headless panels run on a fixed clock at fixture time, with a
check before, at and after the forecast start. App and Core tests
with fixed-date Claude events pin HistoryStore's clock, so the 60-day
retention cannot drop them later.
Closes#11
Redesign the stats panel after the developer's feedback on v1 and add
limit forecasts, daily week use and token-based estimates (D7, D8).
- Panel: a fixed header with range and provider controls, limit tiles
with pace chips, meters and forecasts, week use per day, token KPIs
and charts, one burn-up chart per limit window with past instances,
and a sortable breakdown whose "Other" row expands. One tooltip
component for every chart, tile and table.
- Core (D7): average and recent-rate forecasts, the reach date whenever
use is over pace, days of a long window with even pace and daily
budget, window instances derived from resets with a 15-minute
tolerance, and estimates from price-weighted tokens where samples are
missing. Forecasts start at 10 % of a window, or as soon as it is
ahead, so a Codex week far ahead right after its reset warns too.
- Settings, popups and the version (1.1.0) follow the new design.
Closes#5Closes#7
FinalToken v1: a NativeAOT tray app for Windows 11 and CachyOS that tracks
Claude Code and Codex usage and limits through their CLIs only, with no
provider sign-in and no tokens (R1-R7, D1-D11).
- Core: incremental collectors for Claude transcripts and Codex
rollouts, limit probes through `claude -p /usage` and
`codex app-server`, a journaled history store, the refresh engine,
pace and popup decisions, and the snapshot.json contract.
- App (Avalonia): stats panel with limit bars, pace, projections, token
totals, charts, limit history and breakdowns; tray, settings,
non-activating pace popups, single-instance activation, start with
the OS, and the Off/Ask/Automatic Stream Deck plugin install.
- Stream Deck plugin (SDK v2, NativeAOT) for Elgato and OpenDeck.
- finaltoken-cli, tools/publish.py, the documentation check and the
agent review workflow.
Closes#1