Skip to content

Label each cache percentage with the window it measures - #99

Merged
btsouth merged 1 commit into
mainfrom
fix/label-percentage-periods
Jul 21, 2026
Merged

Label each cache percentage with the window it measures#99
btsouth merged 1 commit into
mainfrom
fix/label-percentage-periods

Conversation

@btsouth

@btsouth btsouth commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Closes SOU-300. Sequenced after SOU-295 as the ticket required — labelling a wrong number more precisely would not have helped.

The problem

Two cache figures sit stacked on the Charts page and differ in both metric and window:

metric window
Token mix cache read + write 7 days
Model rows cache read only 30 days

They can legitimately diverge for two independent reasons, and nothing on the row said either. That ambiguity is what made the (genuinely broken) 49% figure read as merely inconsistent rather than wrong.

What changed

Model rows now carry · 30 days beside the percentage. Their "Cost by model · 30 days" header is several rows away, and the 7-day card sits directly above them — this is the case the ticket was actually about.

Token mix is deliberately left alone. I tried adding · 7 days there and rendered it: the title is in the same row, so the header stuttered "7 days" twice. It read worse than the problem it solved.

Cursor activity shares untouched — a composition summing to 100% within its own card can't be mistaken for a rate from a different one.

The multi-plan notice now states its split is over the last 30 days, which it never said.

Verified against the real stylesheet before and after; the redundant version is why the token-mix change was dropped. Frontend 278 passed, tsc --noEmit clean. No backend change.

The Charts page shows two cache figures that differ in both metric and
window, stacked, with nothing on the row saying which is which. Token
mix is cache read plus write over 7 days; the model rows are cache read
alone over 30. They can legitimately diverge for two separate reasons,
and a reader comparing them had no way to know either.

The model rows now carry "· 30 days" next to the percentage, because
their "Cost by model · 30 days" header is several rows away and the
7-day card sits directly above them.

The token mix figure is left alone: its title is in the same row, so
repeating the window there just stuttered "7 days" twice across one
header. Rendering it settled that; it read worse than the problem.

Cursor's activity shares are also untouched. They are a composition that
sums to 100% inside its own card, so they cannot be mistaken for a rate
from a different one.

The multi-plan notice now says the split is over the last 30 days, which
it never stated.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2ce41359-d524-490d-a17c-ef43ec623cb0

📥 Commits

Reviewing files that changed from the base of the PR and between 831d487 and 7bf7d4a.

⛔ Files ignored due to path filters (1)
  • docs/images/ceiling-charts-comparison.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • apps/desktop-tauri/src/surfaces/settings/providers/sections/charts/ChartsSection.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/label-percentage-periods

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ceiling 7bf7d4a Commit Preview URL

Branch Preview URL
Jul 21 2026, 09:51 PM

@btsouth
btsouth merged commit 2762a22 into main Jul 21, 2026
11 checks passed
@btsouth
btsouth deleted the fix/label-percentage-periods branch July 21, 2026 21:56
btsouth added a commit that referenced this pull request Jul 21, 2026
Undoes an error in #99.

`docs/images/ceiling-charts-comparison.png` was swept in by a `git add
-A` while it was still being edited locally. #99 was a one-file copy
change and had no business carrying an image, and the committed copy was
**already stale** by the time it merged — the local file had been
modified again since.

Nothing in the repo references the file (checked `.md`, `.html`, `.tsx`,
`.ts`, `.json`, `.rs`), so removing it breaks nothing. It stays a local
working file until the screenshots being prepared are final — likely as
part of SOU-294, which needs a refreshed Charts shot anyway.

No code change.

Co-authored-by: tsouth89 <tsouth89@users.noreply.github.com>
@btsouth btsouth mentioned this pull request Jul 21, 2026
btsouth added a commit that referenced this pull request Jul 21, 2026
Release prep. Version bumped in all five tracked locations
(`version.env` incl. BUILD_NUMBER 100→101, both Rust manifests,
`package.json`, `tauri.conf.json`) plus `Cargo.lock`.

## What ships

**Added** — multi-plan disclosure (SOU-297 step 1, #97/#98). Codex
records the plan behind each request, so when a machine's totals span
more than one plan the Charts page says so rather than letting them read
as the signed-in account's.

**Fixed**
- Codex cache rate double-counted cached input, showing ~49% for a model
that was really ~97% (SOU-295, #96).
- Archived Codex sessions were missing from the Charts page, reset
windows, and API value card (SOU-296, #96).
- Cache percentages now say which window they measure (SOU-300, #99).

Also folds in a one-line doc fix flagged during the #90 review:
`CostUsageReport.current_windows` said "token totals" after it started
carrying cost too.

## Note for release notes

The archived-sessions fix will **increase** existing users' totals if
they archive Codex tasks — on the maintainer's machine 81 of 97 rollouts
were archived and therefore invisible. That is a correction, not a
regression, and the notes say so.

## Validation

`local-check.ps1 -All -Version 1.4.0` passes; release-doctor reports all
five version locations at 1.4.0 and the changelog entry present, with
only the expected pre-tag warnings (no local tag, no local assets dir).

Co-authored-by: tsouth89 <tsouth89@users.noreply.github.com>
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