Add a Show pace setting to hide the usage pace stripe and forecast text - #3055
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da9e427e84
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
da9e427 to
51cdb8a
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 7:33 PM ET / 23:33 UTC. ClawSweeper reviewWhat this changesThe PR adds a default-on Show pace setting that hides pace stripes and forecast text in usage cards and plain menus while preserving unrelated provider details. Merge readinessThe patch appears correct and resolves the earlier provider-detail regression; it remains open only for maintainer product sign-off because it adds a new synchronized preference. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherCodexBar converts provider usage snapshots into menu-card metrics and plain-menu entries. The new preference is persisted, observed for menu refreshes, synchronized between devices, and applied before those renderers produce their output. flowchart LR
A[Provider usage snapshots] --> B[Usage metric builder]
C[Show pace preference] --> B
C --> D[Plain menu renderer]
B --> E[Usage cards]
D --> F[Menu entries]
C --> G[Cloud preference sync]
Decision needed
Why: The implementation follows existing settings and sync patterns, but VISION.md requires sign-off for new features and only maintainers can choose the product scope of a synchronized display setting. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: If approved, keep the default-on, backward-compatible synced preference and its narrow pace-only rendering gate. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a display preference rather than fixing a reported failing behavior; direct before/after screenshots show the intended result. Is this the best way to solve the issue? Unclear pending product sign-off: the technical approach is narrow and preserves provider-owned details, but maintainers must choose whether the setting should synchronize across devices. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8637c5d65b9a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
51cdb8a to
c9a6dbc
Compare
ad6df3a to
665d967
Compare
|
The P1 finding is fixed in
Three types rather than two: the primary lane builds its Provider call sites are untouched, so no provider-specific code was added. Two One correction: Copilot is not actually affected. Its detail slot is overwritten Your live verification failed on an unrelated sandbox issue (a corepack/pnpm The PR description has been updated to describe the new behavior. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
665d967 to
4bbe066
Compare
CodexBar always drew the green and red pace stripe inside usage
progress bars, and the forecast text below them ("32% in reserve -
Lasts until reset"). No preference controlled either one.
Add a single paceVisible setting, on by default. Turning it off hides
both together, everywhere the usage card renders.
- Gate once in UsageMenuCardView.Model.make through paceGatedMetrics.
That covers both UsageProgressBar call sites and every metric lane,
including the primary lane, which builds from
PrimaryMetricPresentation rather than a PaceDetail.
- Guard the three plain-menu pace entries in MenuDescriptor, which
renders from UsagePaceText directly rather than from the gated model.
- Sync the flag as an optional Bool, matching the workdayTickAppearance
precedent, so payloads written by older builds still decode.
- Register the setting in menuObservationToken so an open menu redraws
without a restart.
Hiding pace also clears provider text that shares the same row: Kiro
bonus credits, the Copilot and Zenmux reset description, and Synthetic
regen labels. That is deliberate. Separating them needs per-provider
provenance, which is out of scope here.
Re-anchor 17 ProviderArchitectureGatekeeperTests catalog entries whose
pinned line numbers shifted.
4bbe066 to
47f182b
Compare
Summary
CodexBar draws a green or red stripe inside every usage progress bar,
and a line of forecast text below it. The stripe marks expected usage
against actual usage. Both were unconditional, with no preference
anywhere to turn them off.
This adds one setting, Show pace, on by default. Turning it off
hides the stripe and the forecast text together.
Settings > Menu > Usage, directly below "Show quota warning markers".
What changed
paceGatedMetricsruns insideUsageMenuCardView.Model.make, the single factory bothUsageProgressBarcall sites resolve through. It nullspacePercent,detailLeftText,detailRightText, andsessionEquivalentDetail.It copies all 16
Metricfields, so quota and workday tick markssurvive.
MenuDescriptorrenders pace fromUsagePaceTextdirectly rather than from the gated model, so its three pace entries
are guarded separately.
SyncedPreferences.paceVisibleis an optionalBoolwith anildefault, matching theworkdayTickAppearanceprecedent. Apayload from an older build still decodes, and an absent key leaves
the local value untouched.
CodexBarSyncSchema.currentVersionisdeliberately not bumped, since a bump trips
needsAppUpdateand haltssync on older builds.
menuObservationToken,without which the stored value changes but an open menu does not
redraw.
Provider details are preserved (review fix)
Review flagged that
detailLeftTextanddetailRightTextare shared slots:Kiro bonus credits and the Copilot/ZenMux reset description ride the same
fields as the pace forecast. An earlier revision of this PR cleared them
unconditionally, which hid provider data that is not pace output. That is
fixed.
PaceDetail,PrimaryMetricPresentation, andMetricnow carry anisPaceDerivedmarker. It defaults tofalse, and only the pace producerfunctions opt in, so anything unrecognised is preserved rather than hidden.
The gate clears the detail slots only when they hold a pace forecast:
The marker rides three types rather than two because the primary lane builds
its
MetricfromPrimaryMetricPresentationwith noPaceDetailin scope; atwo-type version silently fails on the primary bar of every non-Codex provider.
Provider call sites are untouched, so this adds no provider-specific code.
Two regression tests cover it: Kiro bonus credits survive, and ZenMux with no
reset date keeps its reset description, which was the worst case raised.
Synthetic regen labels are treated as pace-derived and still hide, by choice.
Synthetic's "Regenerates in 2h 15m" countdown is unaffected either way, since it
lives in
resetText, which the gate never touches.Out of scope
These pace surfaces are each separately opt-in, so this setting does not
reach them: predictive pace notifications, which have their own
preference; the
.pacemenu bar layout token and the menu bar Pacedisplay mode, both configured by hand in their own editor;
codexbar usageCLI output; and the Burn Down widget, which has an unrelated paceconcept.
Commands run
make check- clean, 0 violations across 1945 filesmake test- full suite green, 0 timed-out groupsswift test --filter PaceVisibilityswift test --filter ProviderArchitectureGatekeeperTestsTests
Ten tests in
PaceVisibilityTests.swiftandCloudSyncSettingsTests.swift,covering the default-on path, the cleared path, the primary metric specifically
(it builds from
PrimaryMetricPresentationrather than aPaceDetail, so ittakes a different code path), the interaction with Hide personal information,
survival of quota warning markers, decoding a sync payload that predates the
key, and the two provider-preservation regressions described above.
PaceVisibilityScreenshotRenderTests.swiftrenders the before/after imagesbelow. It is env-gated and skipped by default, matching the existing screenshot
render tests.
Screenshots
OFF:
ON: