Commit Graph
14 Commits
Author SHA1 Message Date
Florian Schmidt 33458a40ed fix: forecast windows that are ahead early in their window (D7)
agent-review agent review: pass
The reach date, the dotted forecast and the popup warning showed only
for Claude. Codex had reset its week ten hours before and stood at
39 %, ahead by 33 points, but every forecast shared a gate that
opened only after 10 % of the window. Nothing in the forecast paths
was provider-specific; Codex was just the window early in its week.

The gate now also opens as soon as the window is ahead, with the
configured threshold, so it never disagrees with the chip. Average,
recent and popup forecasts all use it. Until forecasts start, the
tile and the window chart say when they will.

Refs #5
2026-10-15 18:58:06 +02:00
Florian Schmidt 5b42cb8c98 docs: start forecasts early when a window is ahead (D7)
The developer saw reach dates, the dotted forecast and the popup
warning only for Claude. Codex had reset its week ten hours earlier
and stood at 39 %, ahead by 33 points, but D7 started forecasts only
after 10 % of a window, about 17 h of a week. The rule kept noise
out of quiet windows and hid the one warning that mattered.

Forecasts now also start as soon as a window is ahead, and until
they start the tile and the chart say when they will.

Refs #5
2026-10-15 18:48:14 +02:00
Florian Schmidt d477321943 tests: make the wheel-scroll check independent of font metrics
agent-review agent review: pass
On Linux the window selector already fits in the viewport, so the page
stays at offset 0 and a wheel up cannot scroll it: the test assumed a
positive offset that only Windows fonts produced. It now centres the
selector with room in both directions and checks a wheel up and down
without the selection changing.

Refs #5
2026-10-15 10:13:39 +02:00
Florian Schmidt 07a645657d fix: keep real window instances across gaps and early resets (D7)
agent-review agent review: pass
The agent review of ab8d245 found that a gap between two instances,
normal for 5 h sessions, made the analysis infer a previous instance
up to the current start and drop the real one with its samples, and
that an early reset gave the old window tokens from before the new
window's first sample. Instance boundaries now come from resets; real
instances are kept with their own scale, gaps stay unassigned, and
inferred instances exist only for long windows without samples and
never overlap a real one. The dead top-8 breakdown builder is removed
and the day chart legend names the day-of-window pairing.

Refs #5
2026-10-15 09:59:27 +02:00
Florian Schmidt 15145f1cdc docs: instance boundaries come from resets (D7)
The agent review of ab8d245 found that a gap between two session
windows made the analysis invent a previous instance up to the current
start and drop the real one's samples, and that an early Codex reset
gave the old window tokens from before the new window's first sample.
D7 now takes boundaries from resets, keeps real instances, infers past
instances only without samples and never for short windows.

Refs #5
2026-10-15 09:43:42 +02:00
Florian Schmidt ab8d245df8 app: burn-up window charts, estimated days, full breakdown, one tooltip
agent-review agent review: fail
From developer feedback on the redesign:
- Week use per day draws estimated days hatched beside measured ones.
- Limit history becomes a burn-up chart per window instance: even-pace
  diagonal, used line without point markers, forecast to the reset,
  the previous instance faintly, and a strip of past peaks with their
  real start and end.
- The breakdown has its detail columns back, sorts by any column and
  expands "Other" to every row.
- One tooltip component, a title and a label/value grid, for every
  chart and table.
Also the review notes of #7: dated forecasts, the real span of the
recent rate, keyboard focus, distinct settings names, a wheel that no
longer changes selections, and version 1.1.0.

Refs #5, #7
2026-10-15 09:38:11 +02:00
Florian Schmidt e687a40346 core: estimate window use from price-weighted tokens (D7)
Claude limit samples exist only while the app runs, so the day chart
and history of a week stayed empty although the token history covers
it. TokenWeights applies the providers' price ratios and LimitEstimates
scales the weighted tokens by the instance's measured use to estimate
spans without samples: days, the burn-up series and the peaks of past
instances, each marked measured or estimated. Estimates stop at the
limit, an instance ends where the next one begins, and forecasts wait
until 10 % of the window has passed.

Refs #5
2026-10-15 09:38:11 +02:00
Florian Schmidt 06b358570c docs: cap estimates, start forecasts at 10 %, end instances early (D7)
On real data, estimates of past weeks passed 200 %, a Codex window one
hour old forecast 100 % within two days, and Codex windows that ended
early were labelled with reset dates in the future. D7 now caps
estimates at the limit, starts forecasts once 10 % of the window has
passed, and ends an instance when the next one begins.

Refs #5
2026-10-15 09:18:41 +02:00
Florian Schmidt d2ff67bb69 docs: estimate day use from tokens and chart one window instance (D7, D8)
The day chart stayed empty until the app had sampled a whole week,
although the token history covers it. D7 now scales price-weighted
tokens by the measured use of the instance to estimate spans without
samples, always marked as estimates. D8 replaces the long limit
history with a burn-up chart per window instance, an expandable
"Other" and one tooltip component. Developer feedback on the redesign.

Refs #5
2026-10-15 08:45:08 +02:00
Florian Schmidt 73f79eb6ac app: redesign the stats panel and settings (D8)
agent-review agent review: pass
The panel is now a dashboard: a one-row header with range and provider
controls, a tile per limit window with pace, forecasts, today's share
of the week and the daily budget, per-day week charts with even-pace and
budget lines, token stat tiles with one composition legend, hourly and
daily charts side by side, limit history, and top-8 breakdowns. Colours
follow fixed provider and status tokens instead of the OS accent;
numbers are compact to three significant digits. Settings are grouped
into cards with a sticky footer. Developer feedback on v1.

Refs #5
2026-10-14 22:59:24 +02:00
Florian Schmidt a20d0ab9dc core: add limit forecasts, week days and per-model series (D7)
LimitAnalysis computes the use at reset at the average rate, a
recent-rate forecast from the last 24 h of samples, and for windows
longer than a day the use of each local day, today's use, the even
pace and the daily budget. Pace now projects the date of reaching
100 % whenever usage is over pace, not only past the threshold.
Samples whose resets lie within 15 minutes form one window instance,
because Claude's reset times drift by a minute between probes.
TokenSeriesByModel replaces one query per chart point, and a missing
settings.json on first start is no longer a diagnostic.

Refs #5
2026-10-14 22:59:24 +02:00
Florian Schmidt c7086e9760 docs: window instances tolerate reset drift (D7)
Claude reports reset times to the minute and drifts between probes, so
an instance is the samples whose resets lie within 15 minutes.

Refs #5
2026-10-14 22:53:41 +02:00
Florian Schmidt fd4f6f1185 docs: note the partial days of a long window in D7
Refs #5
2026-10-14 22:43:32 +02:00
Florian Schmidt ab0e46d7df docs: record forecasts, week days and the panel layout (D7, D8)
D7 now shows the date of reaching 100 % from the first point over
pace, adds the use at reset and a recent-rate forecast, and defines
today's use, per-day use and the daily budget of a long window. D8
says what the panel leads with and fixes provider and status colours.
Developer feedback on v1.

Refs #5
2026-10-14 22:19:58 +02:00