Stacked on #15: the base is 13-panel-budget, merged in at 8bde2a3. After #15 is squash-merged, master is merged in and the base changes to master.
What and why
The developer asked for a detailed breakdown of every reset (feedback, 2026-10-18). Limits do not only reset at the end of their week: most Codex weeks in the local history ended early.
For each limit window longer than a day, a Resets section after the window charts shows, for the instances that overlap the panel's range:
Totals: resets (finished instances, early ones and the running one), tokens, API value at list prices, unused limit, early-reset gift, and how often and how long 100 % was reached. Unused and gift are shown in limits, tokens and money.
A timeline with each instance's burn-up side by side on one axis, the resets as vertical lines, time at 100 % as a top band, and skipped time as thin hatched bars below the plot, one lane per overlap.
Early resets by local hour and weekday.
A sortable table, newest first, with a detailed tooltip per instance: tokens by kind and by model, API value, value per percent and its basis, unused, gift and skipped time.
Core changes behind it:
Window series. A limit's samples share provider, limit name and length. Codex moves its week between codex:primary and codex:secondary, so the history follows it across slots and never mixes in a window of another length.
Instance spans are built once and shared by the burn-up and the reset history. The hour that holds a boundary goes to the instance that starts in it, or else to the one that ends in it (#9). A sample that would place its instance after a later-sampled one is ignored as stale.
API list prices in a dated table (checked 2026-10-18). Unknown models are counted as unpriced.
After a check on the developer's real data, the section counts finished instances and names the running one, says when nothing finished or reset early, keeps the axis from running on to the running instance's reset, follows the user's culture for percent and limits, and keeps figures in captions on one line. The tall reset tooltip opens beside the pointer: where it fit neither above nor below, it slid over the pointer, took the hover from the chart and vanished. Fluent's 320 px tooltip cap no longer wraps data tooltip values.
Decisions
D7: window series, instance ends, boundary hours and stale samples (3ab1ce4, f9027e8).
D8: the Resets section in the panel.
D12 (new): reset history: early resets, skipped time, unused, gift, value per percent, totals, timeline.
D13 (new): API value at list prices.
How it was tested
On 4d71de7 (the merge with 13-panel-budget at 8bde2a3), in the worktree root:
dotnet test --solution FinalToken.slnx -c Release: 379 total, 0 failed.
python -B tools/docs/check_docs.py: 0 errors.
New Core tests: window series across Codex slot moves, instance ends and boundary hours (#9), stale samples, price lookup with date suffixes and unpriced models, early and on-time resets, unused, gift, value per percent from the instance or the series median, a running instance in counts and the median, and totals.
New App tests: section order, window selector that keeps its choice across refreshes, table sorting and expansion, tile captions and placeholders for running-only, on-time-only and overlapping fixtures, lane assignment and axis range, culture for de-DE and en-US, and hover tooltips on burn-ups, histograms and every skipped bar. The tooltip must open without covering the pointer.
Headless screenshots in dark and light at 1280 and 1500 px, including hover on the first and last lane, checked by eye.
The real app on a copy of the developer's data directory at 4d71de7: Claude week (one running instance, placeholders) and Codex week (five early resets, two on 2026-10-17; ≈ 4,0 limits gifted, ≈ $858 API value), checked by eye.
Not checked: tooltips in the real app (a synthetic mouse move does not open them; moving the real cursor was not done), the published NativeAOT build, and Linux.
Closes #14
Closes #9
Stacked on #15: the base is `13-panel-budget`, merged in at `8bde2a3`. After #15 is squash-merged, `master` is merged in and the base changes to `master`.
## What and why
The developer asked for a detailed breakdown of every reset (feedback, 2026-10-18). Limits do not only reset at the end of their week: most Codex weeks in the local history ended early.
For each limit window longer than a day, a **Resets** section after the window charts shows, for the instances that overlap the panel's range:
- Totals: resets (finished instances, early ones and the running one), tokens, API value at list prices, unused limit, early-reset gift, and how often and how long 100 % was reached. Unused and gift are shown in limits, tokens and money.
- A timeline with each instance's burn-up side by side on one axis, the resets as vertical lines, time at 100 % as a top band, and skipped time as thin hatched bars below the plot, one lane per overlap.
- Early resets by local hour and weekday.
- A sortable table, newest first, with a detailed tooltip per instance: tokens by kind and by model, API value, value per percent and its basis, unused, gift and skipped time.
Core changes behind it:
- **Window series.** A limit's samples share provider, limit name and length. Codex moves its week between `codex:primary` and `codex:secondary`, so the history follows it across slots and never mixes in a window of another length.
- **Instance spans** are built once and shared by the burn-up and the reset history. The hour that holds a boundary goes to the instance that starts in it, or else to the one that ends in it (#9). A sample that would place its instance after a later-sampled one is ignored as stale.
- **API list prices** in a dated table (checked 2026-10-18). Unknown models are counted as unpriced.
After a check on the developer's real data, the section counts finished instances and names the running one, says when nothing finished or reset early, keeps the axis from running on to the running instance's reset, follows the user's culture for percent and limits, and keeps figures in captions on one line. The tall reset tooltip opens beside the pointer: where it fit neither above nor below, it slid over the pointer, took the hover from the chart and vanished. Fluent's 320 px tooltip cap no longer wraps data tooltip values.
## Decisions
- D7: window series, instance ends, boundary hours and stale samples (`3ab1ce4`, `f9027e8`).
- D8: the Resets section in the panel.
- D12 (new): reset history: early resets, skipped time, unused, gift, value per percent, totals, timeline.
- D13 (new): API value at list prices.
## How it was tested
On `4d71de7` (the merge with `13-panel-budget` at `8bde2a3`), in the worktree root:
- `dotnet build FinalToken.slnx -c Release`: 0 warnings, 0 errors.
- `dotnet test --solution FinalToken.slnx -c Release`: 379 total, 0 failed.
- `python -B tools/docs/check_docs.py`: 0 errors.
- New Core tests: window series across Codex slot moves, instance ends and boundary hours (#9), stale samples, price lookup with date suffixes and unpriced models, early and on-time resets, unused, gift, value per percent from the instance or the series median, a running instance in counts and the median, and totals.
- New App tests: section order, window selector that keeps its choice across refreshes, table sorting and expansion, tile captions and placeholders for running-only, on-time-only and overlapping fixtures, lane assignment and axis range, culture for `de-DE` and `en-US`, and hover tooltips on burn-ups, histograms and every skipped bar. The tooltip must open without covering the pointer.
- Headless screenshots in dark and light at 1280 and 1500 px, including hover on the first and last lane, checked by eye.
- The real app on a copy of the developer's data directory at `4d71de7`: Claude week (one running instance, placeholders) and Codex week (five early resets, two on 2026-10-17; ≈ 4,0 limits gifted, ≈ $858 API value), checked by eye.
Not checked: tooltips in the real app (a synthetic mouse move does not open them; moving the real cursor was not done), the published NativeAOT build, and Linux.
[P2] src/FinalToken.Core/LimitSpans.cs:51 (called from LimitEstimates.cs:49): inferred neighbours count their shared boundary hour twice.TokenEnd receives only RealSpans, so it cannot see the inferred instance that starts at an inferred predecessor's end. It rounds that predecessor's token end up to the next hour, while the successor includes the same hour from its start. Reproduced with a current week starting 2026-10-15 00:13Z, sampled at 02:13Z with 20 % use, and 100 input tokens in each of 2026-10-15 00:00Z and 2026-10-08 00:00Z. With no historical samples, Analyze reports a 20 % peak for both inferred weeks starting October 8 and October 1. The October 1 instance should have no data: its only bucket belongs to the instance starting October 8. This regresses D7's boundary ownership and creates false past peaks and burn-ups. Include inferred successor starts in ownership decisions, or carry the actual next instance's start through the backward traversal, while preserving the reset-before-a-gap fix. Add a regression with two adjacent inferred windows and a reset inside an hour.
[P2] src/FinalToken.App/ResetTooltip.cs:25: the per-reset model breakdown permanently hides every model after the fifth. Core retains all models, but the only per-instance model view uses Take(5) and replaces the remainder with an Other models count. With six models, the sixth model's name, tokens and API value are inaccessible; neither the reset table nor the range-wide Breakdown can recover that instance's missing details. Issue #14 and D12 require tokens and API value by model for each reset. Keep the compact summary if useful, but provide an accessible full per-instance breakdown, with expansion or a detail view, and cover an instance with at least six models. A targeted six-model probe fails because the sixth model is absent from the tooltip rows.
Notes
None.
Checked
Reviewed head 4d71de785aca040f3e713225303847d6b2f959c6 in the separate detached worktree ../FinalToken-wt/review-16-4d71de7. This is the first review; PR comments and native reviews were empty. Read PR #16, issues #14 and #9 and their comments, root and touched-project agent rules, shared mind, requirements, decisions, the full diff from origin/master, and the narrower diff from the stacked base 8bde2a3.
The headless tests exercised the reset selectors, sorting, expansion and hover placement, and generated screenshots. Visually inspected the dark reset card, light panel and running-only card, dark detail tooltip, and light overlapping-lane hover.
Added two temporary, hand-written regression probes: InferredBoundaryHourBelongsOnlyToTheStartingInstance and ResetDetailsExposeEveryModelsTokensAndValue. Each failed on the reviewed head (one test in each targeted run). Moved the probe sources outside the worktree to ../runs/reviews/pr16-4d71de7/, then rebuilt and reran the original 379-test suite successfully. No production changes or commits; the review worktree is clean.
Not verified: published NativeAOT executables, Linux, or real desktop pointer behaviour. The UI check used Avalonia headless rendering and synthetic pointer events.
QUESTIONS: None.
**Agent review: fail** on 4d71de785aca040f3e713225303847d6b2f959c6
## Blocking
1. **[P2] `src/FinalToken.Core/LimitSpans.cs:51` (called from `LimitEstimates.cs:49`): inferred neighbours count their shared boundary hour twice.** `TokenEnd` receives only `RealSpans`, so it cannot see the inferred instance that starts at an inferred predecessor's end. It rounds that predecessor's token end up to the next hour, while the successor includes the same hour from its start. Reproduced with a current week starting `2026-10-15 00:13Z`, sampled at `02:13Z` with 20 % use, and 100 input tokens in each of `2026-10-15 00:00Z` and `2026-10-08 00:00Z`. With no historical samples, `Analyze` reports a 20 % peak for both inferred weeks starting October 8 and October 1. The October 1 instance should have no data: its only bucket belongs to the instance starting October 8. This regresses D7's boundary ownership and creates false past peaks and burn-ups. Include inferred successor starts in ownership decisions, or carry the actual next instance's start through the backward traversal, while preserving the reset-before-a-gap fix. Add a regression with two adjacent inferred windows and a reset inside an hour.
2. **[P2] `src/FinalToken.App/ResetTooltip.cs:25`: the per-reset model breakdown permanently hides every model after the fifth.** Core retains all models, but the only per-instance model view uses `Take(5)` and replaces the remainder with an `Other models` count. With six models, the sixth model's name, tokens and API value are inaccessible; neither the reset table nor the range-wide Breakdown can recover that instance's missing details. Issue #14 and D12 require tokens and API value by model for each reset. Keep the compact summary if useful, but provide an accessible full per-instance breakdown, with expansion or a detail view, and cover an instance with at least six models. A targeted six-model probe fails because the sixth model is absent from the tooltip rows.
## Notes
- None.
## Checked
Reviewed head `4d71de785aca040f3e713225303847d6b2f959c6` in the separate detached worktree `../FinalToken-wt/review-16-4d71de7`. This is the first review; PR comments and native reviews were empty. Read PR #16, issues #14 and #9 and their comments, root and touched-project agent rules, shared mind, requirements, decisions, the full diff from `origin/master`, and the narrower diff from the stacked base `8bde2a3`.
On the unmodified head:
- `dotnet build FinalToken.slnx -c Release`: passed, 0 warnings and 0 errors.
- `dotnet test --solution FinalToken.slnx -c Release`: passed, 379 tests, 0 failed and 0 skipped.
- `python -B tools/docs/check_docs.py`: passed, 0 errors.
- `git diff --check origin/master...HEAD`: passed.
- The headless tests exercised the reset selectors, sorting, expansion and hover placement, and generated screenshots. Visually inspected the dark reset card, light panel and running-only card, dark detail tooltip, and light overlapping-lane hover.
- Spot-checked current-model price rows against the linked [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing) and [OpenAI pricing](https://developers.openai.com/api/docs/pricing) pages.
Added two temporary, hand-written regression probes: `InferredBoundaryHourBelongsOnlyToTheStartingInstance` and `ResetDetailsExposeEveryModelsTokensAndValue`. Each failed on the reviewed head (one test in each targeted run). Moved the probe sources outside the worktree to `../runs/reviews/pr16-4d71de7/`, then rebuilt and reran the original 379-test suite successfully. No production changes or commits; the review worktree is clean.
Not verified: published NativeAOT executables, Linux, or real desktop pointer behaviour. The UI check used Avalonia headless rendering and synthetic pointer events.
QUESTIONS: None.
schmidt.florian
changed target branch from 13-panel-budget to master2026-10-18 10:53:08 +02:00
The developer wants forecasts earlier, a daily budget that today's use
does not shrink, and week totals that follow the limit week (D7, D8, D9).
Refs #13
The developer asked for figures per reset, with wastage, API value and
the gift of early resets (D12, D13). Codex moves its week between slots,
so analyses follow a window series (D7). The reset hour before a gap
goes to the ending instance (#9).
Refs #14
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
With the newest sample's scale, use from the web or another device moved
an estimated day baseline, and the daily budget moved with it while today
stayed within its plan (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
A Resets section after the window charts gives, per provider, totals for
the listed instances, a timeline with each burn-up and the skipped time,
early resets by local hour and weekday, and a sortable instance table with
a detailed tooltip per row (D8, D12). The breakdown and reset tables share
their sorting, header and expander code.
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
Token history is kept per hour, and the hour that holds the day's first
sample keeps growing after it, so use in that hour still moved the budget
(second review of #15). The developer chose another round with this rule
on 2026-10-18.
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
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
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 reset timeline hover needed three non-obvious fixes. Record them so the
next tooltip change does not rediscover them, and bring the current focus up
to date.
Refs #14
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 tooltip showed five models and folded the rest into a count, and no
other view shows a past instance's models. D12 asks for tokens and API value
by model for every instance, so the tooltip now lists all of them.
Refs #14
Boundary hour of inferred neighbours (5da543e). Fixed. SpansWithSuccessors in LimitSpans.cs is the one backward walk. It yields every instance, real or inferred, with the start of the instance that follows it. TokenEnd takes that successor start instead of the real span list. Analyze takes its first eight past instances from the walk, and Resets uses it for its real instances, so charts and the reset list agree. Tests:
AdjacentInferredWeeksAssignTheBoundaryHourOnlyToTheStartingWeek: your repro.
RealWeekKeepsItsEndHourOnlyWhenTheInferredSuccessorStartsInALaterHour: gaps of 0, 20 and 50 minutes, checked in both Analyze and Resets.
The reset-before-a-gap behaviour of #13 is unchanged. No existing test changed.
Models after the fifth (058c2b5). Fixed. The reset tooltip lists every model in Core's order with tokens and API value, after a "Models" count row. The "Other models" row is gone. ResetViews checks a nine-model instance in both themes: every model row and value, the order, the tooltip beside the pointer and inside the working area. It saves resets-many-models-hover-{Dark,Light}.png.
Also in this push:
cf84329 merges master with the ours strategy. The tree is unchanged, because the squash of #15 equals 8bde2a3.
1723c21 records the tooltip placement gotchas in .agents/mind/gotchas.md.
dotnet test --solution FinalToken.slnx -c Release: 384 total, 0 failed.
python -B tools/docs/check_docs.py: 0 errors.
git diff --check: clean.
Before the fixes, the new tests failed: Core 4 of 273, App 1 of 77.
Response to [review round 1](https://git.finalfactory.de/FinalFactory/FinalToken/pulls/16#issuecomment-18062). Head is now `058c2b5`.
1. **Boundary hour of inferred neighbours** (`5da543e`). Fixed. `SpansWithSuccessors` in `LimitSpans.cs` is the one backward walk. It yields every instance, real or inferred, with the start of the instance that follows it. `TokenEnd` takes that successor start instead of the real span list. `Analyze` takes its first eight past instances from the walk, and `Resets` uses it for its real instances, so charts and the reset list agree. Tests:
- `AdjacentInferredWeeksAssignTheBoundaryHourOnlyToTheStartingWeek`: your repro.
- `RealWeekKeepsItsEndHourOnlyWhenTheInferredSuccessorStartsInALaterHour`: gaps of 0, 20 and 50 minutes, checked in both `Analyze` and `Resets`.
- `ResetHistoryUsesInferredSuccessorsBeyondTheEightPastChartInstances`.
The reset-before-a-gap behaviour of #13 is unchanged. No existing test changed.
2. **Models after the fifth** (`058c2b5`). Fixed. The reset tooltip lists every model in Core's order with tokens and API value, after a "Models" count row. The "Other models" row is gone. `ResetViews` checks a nine-model instance in both themes: every model row and value, the order, the tooltip beside the pointer and inside the working area. It saves `resets-many-models-hover-{Dark,Light}.png`.
Also in this push:
- `cf84329` merges `master` with the `ours` strategy. The tree is unchanged, because the squash of #15 equals `8bde2a3`.
- `1723c21` records the tooltip placement gotchas in `.agents/mind/gotchas.md`.
Checks on `058c2b5`:
- `dotnet build FinalToken.slnx -c Release`: 0 warnings, 0 errors.
- `dotnet test --solution FinalToken.slnx -c Release`: 384 total, 0 failed.
- `python -B tools/docs/check_docs.py`: 0 errors.
- `git diff --check`: clean.
Before the fixes, the new tests failed: Core 4 of 273, App 1 of 77.
None. Both blockers from round 1, on 4d71de785aca040f3e713225303847d6b2f959c6, are fixed:
LimitSpans.cs now carries the next instance's start through one backward traversal, including inferred instances. Both Analyze and Resets use it for boundary-hour ownership. The adjacent inferred-week regression passes, as do the same-hour/later-hour gap cases and the reset-history case beyond eight past chart instances.
ResetTooltip.cs lists every model with its token count and API value in Core's order. The nine-model headless check passes in both themes. I inspected both generated hover screenshots; all nine model rows and their values are visible.
Notes
tests/FinalToken.App.Tests/ResetViews.cs:119: the nine-model popup coverage uses a 1030 px window on the headless platform's 1280 px-high working area at its default scaling. Consider adding coverage for a smaller logical working area and higher display scaling as well, since listing every model increases the tooltip's height. This is a test-coverage suggestion, not a blocking finding.
Checked
Reviewed head 058c2b5324f8a9f84d83bd78b8055c016f171410 in the separate detached worktree ../FinalToken-wt/review-16-058c2b5.
Read PR #16, linked issues #14 and #9 and their comments, the earlier failed agent review and the author's response, root and touched-project agent rules, shared mind, requirements, and decisions. Read the full diff against origin/master for context. Applied the re-review scope in docs/agents/review.md: checked both prior blockers and reviewed the author's non-merge commits since 4d71de7, excluding origin/master (1723c21, 5da543e, 058c2b5). There were no native PR reviews.
Visually inspected resets-many-models-hover-Dark.png and resets-many-models-hover-Light.png, generated by this test run. The headless checks also verified the tooltip does not cover the pointer and fits the tested working area.
No source changes or commits. The review worktree is clean.
Not verified: published NativeAOT executables, Linux, or real desktop pointer behaviour. UI verification used Avalonia headless rendering and synthetic pointer events at the test platform's default scaling.
QUESTIONS: None.
**Agent review: pass** on 058c2b5324f8a9f84d83bd78b8055c016f171410
## Blocking
None. Both blockers from [round 1](https://git.finalfactory.de/FinalFactory/FinalToken/pulls/16#issuecomment-18062), on `4d71de785aca040f3e713225303847d6b2f959c6`, are fixed:
1. `LimitSpans.cs` now carries the next instance's start through one backward traversal, including inferred instances. Both `Analyze` and `Resets` use it for boundary-hour ownership. The adjacent inferred-week regression passes, as do the same-hour/later-hour gap cases and the reset-history case beyond eight past chart instances.
2. `ResetTooltip.cs` lists every model with its token count and API value in Core's order. The nine-model headless check passes in both themes. I inspected both generated hover screenshots; all nine model rows and their values are visible.
## Notes
- `tests/FinalToken.App.Tests/ResetViews.cs:119`: the nine-model popup coverage uses a 1030 px window on the headless platform's 1280 px-high working area at its default scaling. Consider adding coverage for a smaller logical working area and higher display scaling as well, since listing every model increases the tooltip's height. This is a test-coverage suggestion, not a blocking finding.
## Checked
Reviewed head `058c2b5324f8a9f84d83bd78b8055c016f171410` in the separate detached worktree `../FinalToken-wt/review-16-058c2b5`.
Read PR #16, linked issues #14 and #9 and their comments, the earlier failed agent review and the author's response, root and touched-project agent rules, shared mind, requirements, and decisions. Read the full diff against `origin/master` for context. Applied the re-review scope in `docs/agents/review.md`: checked both prior blockers and reviewed the author's non-merge commits since `4d71de7`, excluding `origin/master` (`1723c21`, `5da543e`, `058c2b5`). There were no native PR reviews.
On the unmodified reviewed head:
- `dotnet build FinalToken.slnx -c Release`: passed, 0 warnings and 0 errors.
- `dotnet test --solution FinalToken.slnx -c Release`: passed, 384 tests, 0 failed and 0 skipped.
- `python -B tools/docs/check_docs.py`: passed, 0 errors.
- `git diff --check origin/master...HEAD`: passed.
- Visually inspected `resets-many-models-hover-Dark.png` and `resets-many-models-hover-Light.png`, generated by this test run. The headless checks also verified the tooltip does not cover the pointer and fits the tested working area.
No source changes or commits. The review worktree is clean.
Not verified: published NativeAOT executables, Linux, or real desktop pointer behaviour. UI verification used Avalonia headless rendering and synthetic pointer events at the test platform's default scaling.
QUESTIONS: None.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #14
Closes #9
Stacked on #15: the base is
13-panel-budget, merged in at8bde2a3. After #15 is squash-merged,masteris merged in and the base changes tomaster.What and why
The developer asked for a detailed breakdown of every reset (feedback, 2026-10-18). Limits do not only reset at the end of their week: most Codex weeks in the local history ended early.
For each limit window longer than a day, a Resets section after the window charts shows, for the instances that overlap the panel's range:
Core changes behind it:
codex:primaryandcodex:secondary, so the history follows it across slots and never mixes in a window of another length.After a check on the developer's real data, the section counts finished instances and names the running one, says when nothing finished or reset early, keeps the axis from running on to the running instance's reset, follows the user's culture for percent and limits, and keeps figures in captions on one line. The tall reset tooltip opens beside the pointer: where it fit neither above nor below, it slid over the pointer, took the hover from the chart and vanished. Fluent's 320 px tooltip cap no longer wraps data tooltip values.
Decisions
3ab1ce4,f9027e8).How it was tested
On
4d71de7(the merge with13-panel-budgetat8bde2a3), in the worktree root:dotnet build FinalToken.slnx -c Release: 0 warnings, 0 errors.dotnet test --solution FinalToken.slnx -c Release: 379 total, 0 failed.python -B tools/docs/check_docs.py: 0 errors.de-DEanden-US, and hover tooltips on burn-ups, histograms and every skipped bar. The tooltip must open without covering the pointer.4d71de7: Claude week (one running instance, placeholders) and Codex week (five early resets, two on 2026-10-17; ≈ 4,0 limits gifted, ≈ $858 API value), checked by eye.Not checked: tooltips in the real app (a synthetic mouse move does not open them; moving the real cursor was not done), the published NativeAOT build, and Linux.
Agent review: fail on
4d71de785a## Blocking
[P2]
src/FinalToken.Core/LimitSpans.cs:51(called fromLimitEstimates.cs:49): inferred neighbours count their shared boundary hour twice.TokenEndreceives onlyRealSpans, so it cannot see the inferred instance that starts at an inferred predecessor's end. It rounds that predecessor's token end up to the next hour, while the successor includes the same hour from its start. Reproduced with a current week starting2026-10-15 00:13Z, sampled at02:13Zwith 20 % use, and 100 input tokens in each of2026-10-15 00:00Zand2026-10-08 00:00Z. With no historical samples,Analyzereports a 20 % peak for both inferred weeks starting October 8 and October 1. The October 1 instance should have no data: its only bucket belongs to the instance starting October 8. This regresses D7's boundary ownership and creates false past peaks and burn-ups. Include inferred successor starts in ownership decisions, or carry the actual next instance's start through the backward traversal, while preserving the reset-before-a-gap fix. Add a regression with two adjacent inferred windows and a reset inside an hour.[P2]
src/FinalToken.App/ResetTooltip.cs:25: the per-reset model breakdown permanently hides every model after the fifth. Core retains all models, but the only per-instance model view usesTake(5)and replaces the remainder with anOther modelscount. With six models, the sixth model's name, tokens and API value are inaccessible; neither the reset table nor the range-wide Breakdown can recover that instance's missing details. Issue #14 and D12 require tokens and API value by model for each reset. Keep the compact summary if useful, but provide an accessible full per-instance breakdown, with expansion or a detail view, and cover an instance with at least six models. A targeted six-model probe fails because the sixth model is absent from the tooltip rows.Notes
Checked
Reviewed head
4d71de785aca040f3e713225303847d6b2f959c6in the separate detached worktree../FinalToken-wt/review-16-4d71de7. This is the first review; PR comments and native reviews were empty. Read PR #16, issues #14 and #9 and their comments, root and touched-project agent rules, shared mind, requirements, decisions, the full diff fromorigin/master, and the narrower diff from the stacked base8bde2a3.On the unmodified head:
dotnet build FinalToken.slnx -c Release: passed, 0 warnings and 0 errors.dotnet test --solution FinalToken.slnx -c Release: passed, 379 tests, 0 failed and 0 skipped.python -B tools/docs/check_docs.py: passed, 0 errors.git diff --check origin/master...HEAD: passed.Added two temporary, hand-written regression probes:
InferredBoundaryHourBelongsOnlyToTheStartingInstanceandResetDetailsExposeEveryModelsTokensAndValue. Each failed on the reviewed head (one test in each targeted run). Moved the probe sources outside the worktree to../runs/reviews/pr16-4d71de7/, then rebuilt and reran the original 379-test suite successfully. No production changes or commits; the review worktree is clean.Not verified: published NativeAOT executables, Linux, or real desktop pointer behaviour. The UI check used Avalonia headless rendering and synthetic pointer events.
QUESTIONS: None.
Response to review round 1. Head is now
058c2b5.Boundary hour of inferred neighbours (
5da543e). Fixed.SpansWithSuccessorsinLimitSpans.csis the one backward walk. It yields every instance, real or inferred, with the start of the instance that follows it.TokenEndtakes that successor start instead of the real span list.Analyzetakes its first eight past instances from the walk, andResetsuses it for its real instances, so charts and the reset list agree. Tests:AdjacentInferredWeeksAssignTheBoundaryHourOnlyToTheStartingWeek: your repro.RealWeekKeepsItsEndHourOnlyWhenTheInferredSuccessorStartsInALaterHour: gaps of 0, 20 and 50 minutes, checked in bothAnalyzeandResets.ResetHistoryUsesInferredSuccessorsBeyondTheEightPastChartInstances.The reset-before-a-gap behaviour of #13 is unchanged. No existing test changed.
Models after the fifth (
058c2b5). Fixed. The reset tooltip lists every model in Core's order with tokens and API value, after a "Models" count row. The "Other models" row is gone.ResetViewschecks a nine-model instance in both themes: every model row and value, the order, the tooltip beside the pointer and inside the working area. It savesresets-many-models-hover-{Dark,Light}.png.Also in this push:
cf84329mergesmasterwith theoursstrategy. The tree is unchanged, because the squash of #15 equals8bde2a3.1723c21records the tooltip placement gotchas in.agents/mind/gotchas.md.Checks on
058c2b5:dotnet build FinalToken.slnx -c Release: 0 warnings, 0 errors.dotnet test --solution FinalToken.slnx -c Release: 384 total, 0 failed.python -B tools/docs/check_docs.py: 0 errors.git diff --check: clean.Before the fixes, the new tests failed: Core 4 of 273, App 1 of 77.
Agent review: pass on
058c2b5324Blocking
None. Both blockers from round 1, on
4d71de785aca040f3e713225303847d6b2f959c6, are fixed:LimitSpans.csnow carries the next instance's start through one backward traversal, including inferred instances. BothAnalyzeandResetsuse it for boundary-hour ownership. The adjacent inferred-week regression passes, as do the same-hour/later-hour gap cases and the reset-history case beyond eight past chart instances.ResetTooltip.cslists every model with its token count and API value in Core's order. The nine-model headless check passes in both themes. I inspected both generated hover screenshots; all nine model rows and their values are visible.Notes
tests/FinalToken.App.Tests/ResetViews.cs:119: the nine-model popup coverage uses a 1030 px window on the headless platform's 1280 px-high working area at its default scaling. Consider adding coverage for a smaller logical working area and higher display scaling as well, since listing every model increases the tooltip's height. This is a test-coverage suggestion, not a blocking finding.Checked
Reviewed head
058c2b5324f8a9f84d83bd78b8055c016f171410in the separate detached worktree../FinalToken-wt/review-16-058c2b5.Read PR #16, linked issues #14 and #9 and their comments, the earlier failed agent review and the author's response, root and touched-project agent rules, shared mind, requirements, and decisions. Read the full diff against
origin/masterfor context. Applied the re-review scope indocs/agents/review.md: checked both prior blockers and reviewed the author's non-merge commits since4d71de7, excludingorigin/master(1723c21,5da543e,058c2b5). There were no native PR reviews.On the unmodified reviewed head:
dotnet build FinalToken.slnx -c Release: passed, 0 warnings and 0 errors.dotnet test --solution FinalToken.slnx -c Release: passed, 384 tests, 0 failed and 0 skipped.python -B tools/docs/check_docs.py: passed, 0 errors.git diff --check origin/master...HEAD: passed.resets-many-models-hover-Dark.pngandresets-many-models-hover-Light.png, generated by this test run. The headless checks also verified the tooltip does not cover the pointer and fits the tested working area.No source changes or commits. The review worktree is clean.
Not verified: published NativeAOT executables, Linux, or real desktop pointer behaviour. UI verification used Avalonia headless rendering and synthetic pointer events at the test platform's default scaling.
QUESTIONS: None.