feat(menubar): say how much of a long quota window the pace leaves unused - #1341
Closed
ozymandiashh wants to merge 2 commits into
Closed
feat(menubar): say how much of a long quota window the pace leaves unused#1341ozymandiashh wants to merge 2 commits into
ozymandiashh wants to merge 2 commits into
Conversation
…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
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.100 − projectedfrom the existingQuotaPaceprojection, 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 staysLasts 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 keepOn pace/in deficit/in reserve, and the Plan tab's captions are untouched.codeburn quotaprints no pace caption, so the CLI is unchanged.Refs #725
Testing
I have tested this locally against real data (not just unit tests)
npm testpassesnpm run buildsucceedscd mac && swift buildpasses.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 testcan't loadTestingon a Command Line Tools-only host, so the same cases ran in a standaloneswiftcharness against the real sources and real.stringstables. They all pass on this branch and 12 fail onmain. 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.