Skip to content

feat(menubar): say how much of a long quota window the pace leaves unused - #1341

Closed
ozymandiashh wants to merge 2 commits into
getagentseal:mainfrom
ozymandiashh:feat/pace-unused-share
Closed

feat(menubar): say how much of a long quota window the pace leaves unused#1341
ozymandiashh wants to merge 2 commits into
getagentseal:mainfrom
ozymandiashh:feat/pace-unused-share

Conversation

@ozymandiashh

Copy link
Copy Markdown
Collaborator

Summary

  • On weekly and monthly quota windows that will last, the Capacity Dock caption and the agent-tab hover card now say how much of the window your current pace leaves unused: Lasts until reset · ~44% unused (5% used 15 hours into a 7-day window projects to 56% at reset). The tooltip gets a matching sentence, At this pace about 44% of the window goes unused by the reset. Both strings are in en and zh-Hans.
  • The share is 100 − projected from the existing QuotaPace projection, rounded to a whole percent. It only appears when the rounded figure is at least 10 points and the window is outside the existing two-point on-pace band. Below that the caption stays Lasts until reset, because a single-digit leftover is noise on a linear projection. The early-window, validated-duration and freshness/connection guards are unchanged. Windows of six hours or less keep On pace / in deficit / in reserve, and the Plan tab's captions are untouched.
  • "At this pace" doesn't fit the dock's two-column cell (155pt; the full sentence sets at ~208pt), so it lives in the tooltip. The hover card's caption (136pt) now shrinks to 0.8 like the dock's, so the share isn't clipped. codeburn quota prints no pace caption, so the CLI is unchanged.

Refs #725

Testing

  • I have tested this locally against real data (not just unit tests)

  • npm test passes

  • npm run build succeeds

  • cd mac && swift build passes.

  • New and updated cases in CapacityDockPacePresentationTests: the 44% example, 9 points (plain), exactly 10, rounding (55.6→56, 9.6→10), on-pace band, early-window silence, short-window and 6h boundary, overflow.

  • swift test can't load Testing on a Command Line Tools-only host, so the same cases ran in a standalone swiftc harness against the real sources and real .strings tables. They all pass on this branch and 12 fail on main. Mutating the threshold, the rounding, the sign or either guard fails the harness.

  • The localization scanner and catalog checks (unrouted literals, missing or orphaned keys, specifier and %% parity) pass on the branch via the same harness approach.

  • No TypeScript changes.

…used

"Lasts until reset" answers whether a weekly or monthly window makes it,
but hides the difference between finishing it at 98% and at 56%: the
projection that says so was only in the tooltip. Long windows that last
now read "Lasts until reset · ~44% unused", the complement of that same
QuotaPace projection rounded to a whole percent.

The share is only named when the rounded figure is at least 10 points and
the window is outside the existing two-point on-pace band. A single-digit
leftover is noise on a linear whole-window projection and would flicker in
and out; inside the on-pace band the leftover is a small delta divided by
the elapsed fraction, which reads large early in a week while the tooltip
calls the window on pace. Every existing silence (first 3% of a window,
validated duration, freshness and connection) still applies, and windows
of six hours or less keep their on-pace/deficit/reserve stage.

"At this pace" does not fit the dock's two-column cell (155pt; the full
sentence sets at ~208pt), so it moves into the tooltip as its own
sentence, gated identically. The agent-tab hover card leaves the caption
136pt, so it now shrinks to 0.8 like the dock's caption instead of
clipping the share. Both strings are in en and zh-Hans.

Refs getagentseal#725
Document when the Capacity Dock names the share of a long window the pace
leaves unused, how it relates to the Plan tab's "at reset" figure and to
a short window's "in reserve", and add the changelog entry under Added
(macOS).

Refs getagentseal#725
@ozymandiashh ozymandiashh changed the title **Body:** feat(menubar): say how much of a long quota window the pace leaves unused Sep 13, 2026
@iamtoruk

Copy link
Copy Markdown
Member

Closing. The unused share is 100 minus the projected figure the tooltip already shows, so this adds a second sentence for the same fact. The code and tests are clean; the extra surface is not worth carrying.

@iamtoruk iamtoruk closed this Sep 13, 2026
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.

2 participants