Skip to content

Fix live session counts and the Overview estimate-marker crash - #1794

Merged
iamtoruk merged 4 commits into
getagentseal:mainfrom
ozymandiashh:codex/fix-live-counts-overview-crash
Oct 26, 2026
Merged

iamtoruk merged 4 commits into
getagentseal:mainfrom
ozymandiashh:codex/fix-live-counts-overview-crash

Conversation

@ozymandiashh

@ozymandiashh ozymandiashh commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR fixes two user-visible issues: Today-only usage reports marking known session counts as partial, and Overview crashing when a cost total changes between exact and estimated.

Fixes #1785.
Fixes #1760.

The fixes are in two separate commits so they can be reviewed independently.

Accurate session counts for Today — #1785

Today already has live session identities, but its usage rows were being treated as historical cache data. That caused exact counts to appear as partial in the headline, provider and project totals.

The count calculation now distinguishes live Today data from historical cache rows. Today-only reports show exact counts, while historical rows without session identities retain their lower-bound behavior. Cost totals still use the complete durable day set. The same rule applies to the normalized-index headline and CLI JSON, and older status snapshots are regenerated to clear stale labels.

Stable Overview updates — #1760

The amount animation was replacing text inside an element whose children React also managed. When a refresh or period switch added or removed the estimate marker (~), React could throw NotFoundError: insertBefore and show the error boundary.

The animation now owns a dedicated span for the numeric amount. React manages the estimate marker, and the token popover remains attached to the wrapper. Currency changes also refresh the displayed amount when the underlying cost stays the same.

Testing / Verification

  • Regression coverage: eight new live-session-count cases and both estimate-marker transition cases fail on unchanged main and pass with these fixes. Snapshot tests cover both missing count metadata and stale partial labels, including retained historical accounting.
  • Real usage replay: replayed one local Claude session through both CLIs with separate caches. All 60 calls, cost and token totals stay identical; only the incorrect count classification changes from partial to identity. No transcript content is included in this PR.
  • Full CLI and desktop test suites: zero failures on both the baseline and this branch.
  • TypeScript checks and production builds: passed for both CLI and desktop.
  • Browser verification: exercised refreshes, period changes during animation, currency changes and reduced motion using the production Overview, GSAP and error boundary in Chromium with synthetic data. Windows Store packaging was not exercised locally.
Test suite Main (1a3ce74a) This branch
CLI 5,211 passed 5,222 passed
Desktop 1,515 passed 1,518 passed

The same 8 CLI and 4 desktop tests remain skipped on both revisions.

UI reproduction details

Overview before and after

Before:
Before: Overview crashes when the estimate marker appears

After:
After: Overview displays the estimated total

@iamtoruk
iamtoruk merged commit 6489d5e into getagentseal:main Oct 26, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants