Skip to content

feat(omarchy): show session quota, weekly quota and weekly pace in the bar - #3786

Closed
jsonMartin wants to merge 3 commits into
steipete:mainfrom
jsonMartin:pr3-bar-label
Closed

jsonMartin wants to merge 3 commits into
steipete:mainfrom
jsonMartin:pr3-bar-label

Conversation

@jsonMartin

Copy link
Copy Markdown
Contributor

Summary

The Omarchy bar showed one quota per provider and no pace, so the weekly burn rate was only visible by opening a window. This shows each provider's session quota, weekly quota and weekly pace, joined by the separator the popup already uses:

5H 37% · 7D 61% · +14%

Nothing here recomputes pace. The CLI already emits a signed delta per window, produced by Core, so the shared model carries it through and renders it in the compact form of MenuBarDisplayText.paceText. The pace shown is the weekly window's, never whichever lane is most constrained, and a pace Core cannot compute contributes no segment rather than a placeholder that reads like data.

Lanes resolve from the cadence a provider reports, the way Core's semantic windows do, so no provider name is hard-coded and a provider without a session window emits neither that segment nor its separator.

Three classification rules came out of testing this against real provider shapes:

  • A cadence resolves to the pool that binds hardest. Antigravity reports one pool per model family at one cadence (AntigravityStatusProbe.swift:201); taking the first hid an exhausted family behind an idle one.
  • Windows sharing a duration are not the same quota measured twice. Cursor bills its total, Auto/Composer and API usage over one cycle (CursorStatusProbe.swift:460); keeping only the tightest replaced the headline quota with an internal subquota.
  • A provider whose only lane at a cadence is a scoped one still gets that cadence, rather than showing the scoped lane by name. Antigravity publishes no general weekly at all.

Percentages run through the existing quota preference, so the bar follows the used-or-remaining setting without the adapter inverting anything. The existing Show pace preference now governs the bar as well as the native cards. Caps scoped to a single model are off by default behind a new Show scoped caps preference, since most providers that publish them restate a general lane.

The adapter also stopped reusing a previous poll's body, which let a backend that had gone away keep reporting the quota it last had.

Depends on

This builds on #3785. GitHub's native stacked pull requests do not support
cross-fork stacks, so this is stacked manually: its base is the previous branch and it
will be retargeted to main once that merges. Reviewing in order is easiest.

Screenshot

Four providers, scoped caps off (default):

CX 7D 83% · -4% · CL 5H 95% · 7D 19% · -11% · antigravity 5H 100% · 7D 94% · zai 5H 97% · 7D 94% · -6%

Commands run

node --test Integrations/Omarchy/test.mjs Integrations/Omarchy/notifications.test.mjs  # 52 pass
python3 Integrations/Linux/tests/test_desktop.py   # 14 tests, OK
python3 Integrations/Omarchy/test_install.py       # OK
python3 Integrations/Linux/tests/test_package.py   # OK
omarchy plugin validate Integrations/Omarchy       # exit 0

Known limitation

CI never loads Panel.qml — Quickshell is not installed in the workflow — so the adapter is verified by screenshot rather than by test. The label logic lives in the JS model, where it is tested; the QML is deliberately thin.

Note on size

This is the largest of the set at ~570 lines, and I could not find a smaller
shippable slice: the lane model, the classification rules, the backend wiring and
the adapter have to arrive together for the bar to render anything. The pieces
that can stand alone were split out — the installer fix (#3784), the extra rate
windows (#3785), the provider marks and the provider count are separate PRs.

Three of those classification rules came out of review rather than design, each
reproduced against real provider output before it was written:

  • Antigravity marks a per-family summary set with antigravity-quota-summary-*
    ids; its positional window is only whichever family represents them, so a
    tighter family was hidden behind it.
  • Kimi delivers a subscription-only account's entire quota through
    extraRateWindows, so treating every extra as an optional sub-cap dropped it.
  • Cursor bills total, Auto/Composer and API usage over one cycle, so keeping only
    the tightest of a duration replaced the headline quota with a subquota.

…ones

Claude reports a cap scoped to one model beside its general weekly quota, as an
entry in usage.extraRateWindows. The Linux shared model read only primary,
secondary and tertiary, so that lane never reached the snapshot, the Omarchy
popup or any other adapter: an account could sit at 96% of a scoped cap with
nothing on screen saying so, while macOS showed it through
standardSemanticWindows, which already treats extras as candidates.

Read the extras after the three standard lanes. The ordering matters, because a
scoped lane can share the 7-day cadence with the general weekly window and
consumers resolve a cadence by first match; a test pins it rather than leaving it
to the reading.

The same pass fixes what that exposed. A provider also describes windows it
cannot measure: Zed reports an overdue invoice and Antigravity a reset-only pool,
both carrying a full usedPercent with usageKnown false, and Claude emits a
synthetic placeholder when its web API returns no session. Core excludes both.
Read as quota they became a full or exhausted lane, so filter them where the
percentage is first trusted and every consumer inherits the boundary.

Titles are provider-controlled text exported over an IPC contract that excludes
account identity, so they are redacted regardless of the identity display
preference, which governs the native windows rather than this boundary. The count
is bounded like the other provider-controlled lists here, counting lanes that
render so a real one trailing unusable entries is not discarded.
…e bar

The bar showed one quota per provider and no pace, so the weekly burn rate was
only visible by opening a window. Show each provider's session quota, weekly
quota and weekly pace instead, joined by the separator the popup already uses.

Nothing here recomputes pace. The CLI already emits a signed delta per window,
produced by Core, so the shared model carries it through and renders it in the
compact form of MenuBarDisplayText.paceText. The pace shown is the weekly
window's, never whichever lane is most constrained, and a pace Core cannot
compute contributes no segment rather than a placeholder that reads like data.

Lanes are resolved from the cadence a provider reports, the way Core's semantic
windows do, so no provider name is hard-coded and a provider without a session
window emits neither that segment nor its separator. A cadence resolves to the
pool that binds hardest, because a provider can report several at one cadence and
taking the first would hide an exhausted pool behind an idle one. Windows sharing
a duration are not assumed to be the same quota measured twice; a provider lists
its own headline quota first. A provider whose only lane at a cadence is a scoped
one still gets that cadence rather than showing the scoped lane by name.

Percentages run through the existing quota preference, so the bar follows the
used or remaining setting without the adapter inverting anything, and the
existing Show pace preference now governs the bar as well as the native cards.
Caps scoped to a single model are off by default behind a new preference, since
most providers that publish them restate a general lane.

The adapter also stopped reusing a previous poll's body, which let a backend that
had gone away keep reporting the quota it last had.
@clawsweeper

clawsweeper Bot commented Sep 20, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed September 20, 2026, 5:42 PM ET / 21:42 UTC (Revision 2).

ClawSweeper review

What this changes

Adds session and weekly quotas, weekly pace, optional per-model caps, and all configured providers to the Omarchy bar through the Linux desktop backend.

Merge readiness

Blocked before merge - 6 items remain

Keep open: the richer bar remains absent from current main and v0.63.0. The prior cadence-truncation finding remains actionable; runtime proof and the expanded bar-width tradeoff also remain unresolved.

Priority: P2
Reviewed head: f9d9e985cd03bc07f605eadcf47fc1f4fe8325ee
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The shared implementation and focused tests provide useful signal, but cadence loss, unresolved width compatibility, and incomplete runtime evidence prevent readiness.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the four-provider text example now matches the branch's provider count, but it does not demonstrate the CLI-to-desktop-to-Panel.qml path or fresh and upgraded settings. Add redacted after-fix screenshots or a recording of the actual bar, or runtime logs/live output establishing those behaviors. Redact account details, keys, IP addresses, and private endpoints. Updating the PR body should trigger re-review; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the four-provider text example now matches the branch's provider count, but it does not demonstrate the CLI-to-desktop-to-Panel.qml path or fresh and upgraded settings. Add redacted after-fix screenshots or a recording of the actual bar, or runtime logs/live output establishing those behaviors. Redact account details, keys, IP addresses, and private endpoints. Updating the PR body should trigger re-review; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 10 items Repository policy applied: Read the complete root AGENTS.md. No nested AGENTS.md files were found under Integrations, and no maintainer-notes directory was present. Applied the guidance on focused changes, provider isolation, and UI evidence; no builds, tests, or credential probes were executed.
Verified introduced scope: Reviewed the merge-base-to-head delta across nine files. The test merge's raw parents are the pinned main SHA followed by the exact PR head, and its result changes only the same nine integration files.
Current main and release still lack the richer label: Current main retains one quota per provider and a two-provider summary. The integration subtree has no changes between the pinned merge base and fetched main. Supplied release provenance identifies that main SHA as v0.63.0; the releases endpoint independently confirms v0.63.0 as latest.
Findings 2 actionable findings [P2] Preserve cadence representatives before truncating extra windows
[P3] Move the logo documentation to the logo implementation
Security None None.

How this fits together

The Linux desktop backend converts CodexBar CLI usage results and display preferences into a private local snapshot. The Omarchy panel polls that snapshot to display quotas, pace, and refresh status.

flowchart LR
 A[Provider usage] --> B[CodexBar CLI]
 B --> C[Linux quota model]
 D[Display preferences] --> C
 C --> E[Private desktop snapshot]
 E --> F[Omarchy bar and popup]
Loading

Decision needed

Question Recommendation
Should the richer bar retain a bounded default with scoped caps opt-in, or intentionally show every configured provider regardless of available width? Keep a bounded default: Retain compact overflow behavior while adding quota and pace detail, with per-model caps remaining opt-in.

Why: The branch adds a persisted display option and now absorbs the all-provider behavior whose narrow-screen limitation was acknowledged in the related PR; no maintainer has accepted that expanded default.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the four-provider text example now matches the branch's provider count, but it does not demonstrate the CLI-to-desktop-to-Panel.qml path or fresh and upgraded settings. Add redacted after-fix screenshots or a recording of the actual bar, or runtime logs/live output establishing those behaviors. Redact account details, keys, IP addresses, and private endpoints. Updating the PR body should trigger re-review; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve cadence representatives before truncating extra windows (P2) - The prior finding remains: sorting all extras by remaining quota and then taking eight can discard an entire cadence. Antigravity accepts an unbounded bucket list and chooses positional representatives by maximum usage per family, so eight tighter weekly buckets can leave the only session bucket absent from both the bar and popup. Preserve cadence representatives before bounding optional rows and add a mixed-cadence regression; the existing nine-bucket test covers only one cadence.
  • Move the logo documentation to the logo implementation (P3) - This newly added paragraph promises provider logos, packaged marks, and barEntries, but this head only publishes barLabel and renders text. Those capabilities belong to feat(omarchy): mark each provider in the bar with its own logo #3787. Remove or defer this paragraph so users installing this branch are not told that unavailable behavior is supported.
  • Resolve merge risk (P1) - Showing every configured provider by default removes the existing compact overflow behavior; the author's related measurements already identify a narrow-screen overflow case, with no maintainer acceptance or demonstrated width constraint.
  • Complete next step (P2) - Repair cadence truncation and remove the premature logo documentation before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P2] Preserve cadence representatives before truncating extra windows — Integrations/Linux/Shared/Usage.js:47-50
  • [P3] Move the logo documentation to the logo implementation — Integrations/Omarchy/README.md:40-44
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +241/-18; tests +384/-0 The stated growth supports shared quota classification and backend wiring, with substantial model coverage but incomplete runtime proof.

Merge-risk options

Maintainer options:

  1. Preserve compact overflow (recommended)
    Keep a bounded default or constrain the label to available width so existing multi-provider setups remain usable.
  2. Accept narrow-screen limitations
    Explicitly approve the all-provider default with documented display limits and real narrow-screen evidence.

Technical review

Best possible solution:

Preserve every cadence before limiting optional rows, retain a bounded bar by default, and validate the richer display with existing preferences preserved.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the cadence-loss trigger: eight tighter weekly extras displace the only session extra before lane selection. This was not executed; runtime panel and upgrade behavior remain unproven.

Is this the best way to solve the issue?

Partly: reusing CLI pace and the shared Linux model is appropriate, but cadence selection must precede truncation and the expanded width default needs a compatibility decision.

Full review comments:

  • [P2] Preserve cadence representatives before truncating extra windows — Integrations/Linux/Shared/Usage.js:47-50
    The prior finding remains: sorting all extras by remaining quota and then taking eight can discard an entire cadence. Antigravity accepts an unbounded bucket list and chooses positional representatives by maximum usage per family, so eight tighter weekly buckets can leave the only session bucket absent from both the bar and popup. Preserve cadence representatives before bounding optional rows and add a mixed-cadence regression; the existing nine-bucket test covers only one cadence.
    Confidence: 0.98
  • [P3] Move the logo documentation to the logo implementation — Integrations/Omarchy/README.md:40-44
    This newly added paragraph promises provider logos, packaged marks, and barEntries, but this head only publishes barLabel and renders text. Those capabilities belong to feat(omarchy): mark each provider in the bar with its own logo #3787. Remove or defer this paragraph so users installing this branch are not told that unavailable behavior is supported.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f3e718c897d5.

Labels

Label justifications:

  • P2: This is a bounded Linux display improvement with a quota-selection defect and no demonstrated urgent core-runtime failure.
  • merge-risk: 🚨 compatibility: The new all-provider default can exceed existing users' bar width, and the contributor's acknowledged limitation has not been accepted by a maintainer.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the four-provider text example now matches the branch's provider count, but it does not demonstrate the CLI-to-desktop-to-Panel.qml path or fresh and upgraded settings. Add redacted after-fix screenshots or a recording of the actual bar, or runtime logs/live output establishing those behaviors. Redact account details, keys, IP addresses, and private endpoints. Updating the PR body should trigger re-review; otherwise ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Repository policy applied: Read the complete root AGENTS.md. No nested AGENTS.md files were found under Integrations, and no maintainer-notes directory was present. Applied the guidance on focused changes, provider isolation, and UI evidence; no builds, tests, or credential probes were executed. (AGENTS.md:1, f9d9e985cd03)
  • Verified introduced scope: Reviewed the merge-base-to-head delta across nine files. The test merge's raw parents are the pinned main SHA followed by the exact PR head, and its result changes only the same nine integration files. (2f2ee32ca69f)
  • Current main and release still lack the richer label: Current main retains one quota per provider and a two-provider summary. The integration subtree has no changes between the pinned merge base and fetched main. Supplied release provenance identifies that main SHA as v0.63.0; the releases endpoint independently confirms v0.63.0 as latest. (Integrations/Linux/Shared/Usage.js:115, f3e718c897d5)
  • Prior cadence-loss finding remains: The model still sorts all extra windows together and keeps only eight before resolving cadence representatives. Eight tighter weekly buckets can remove the only session bucket. The added regression covers nine buckets of one cadence, so it does not cover this mixed-cadence failure. (Integrations/Linux/Shared/Usage.js:47, f9d9e985cd03)
  • Production provider permits the failing shape: Antigravity publishes all parsed quota buckets as named windows and selects positional representatives by maximum usage per family, without preserving every cadence. Thus positional windows need not rescue a cadence discarded by the new global limit. (Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift:201, f9d9e985cd03)
  • Proof and review continuity: The complete supplied body contains a four-provider text example and test/validation claims, but no attached screenshot or runtime transcript demonstrating the panel and settings upgrade. The current head now renders all providers, resolving the earlier example-versus-two-provider mismatch. Local inspection of the earlier reviewed SHA failed because its object was unavailable; GitHub comparison confirmed the revised model and newly added logo documentation. The provided review projection supplies the prior cadence finding. (f9d9e985cd03)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Preserve mixed-cadence representatives across the eight-window limit and correct the premature logo documentation.
  • Provide redacted after-fix Omarchy evidence, including fresh settings and preservation of existing display preferences.
  • Resolve the all-provider width default with the Linux integration owner.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-20T20:53:16.236Z sha 653f7c8 :: needs real behavior proof before merge. :: [P2] Preserve cadence representatives before truncating extra windows

…e bar

The bar showed one quota per provider and no pace, so the weekly burn rate was
only visible by opening a window, and only the first two configured providers
appeared at all. Show each provider's session quota, weekly quota and weekly
pace, for every provider in the configured list.

Nothing here recomputes pace. The CLI already emits a signed delta per window,
produced by Core, so the shared model carries it through and renders it in the
compact form of MenuBarDisplayText.paceText. The pace shown is the weekly
window's, never whichever lane is most constrained, and a pace Core cannot
compute contributes no segment rather than a placeholder that reads like data.

Lanes are resolved from the cadence a provider reports, the way Core's semantic
windows do, so no provider name is hard-coded and a provider without a session
window emits neither that segment nor its separator. Three rules came out of
testing against real provider shapes rather than from design:

- Antigravity marks a per-family summary set with quota-summary ids, and its
  positional window is only whichever family represents them, so a tighter
  family was hidden behind it. Matching on that marker rather than on
  percentages matters: Claude's general weekly can coincide with one of its
  per-model caps, and reading that coincidence as a summary replaced the general
  quota with a cap scoped beneath it.
- Kimi delivers a subscription-only account's entire quota through
  extraRateWindows, so treating every extra as an optional sub-cap dropped it.
- Cursor bills its total, its Auto/Composer usage and its API usage over one
  cycle, so keeping only the tightest of a duration replaced the headline quota
  with a subquota.

Percentages run through the existing quota preference, so the bar follows the
used or remaining setting without the adapter inverting anything, and the
existing Show pace preference now governs the bar as well as the native cards.
Caps scoped to a single model are off by default behind a new preference, since
most providers that publish them restate a general lane.

The provider list is already the limit the user set, so the bar shows all of it
rather than collapsing the remainder into a count. At the default font each
character occupies roughly 7 logical pixels, so four providers each showing a
session lane, a weekly lane and a pace come to about 1500 logical pixels,
measured on a 2400-wide bar with 741 still clear: enough for a 1920-wide display
and more than a 1366-wide one has, which the README notes.

The adapter also stopped reusing a previous poll's body, which let a backend that
had gone away keep reporting the quota it last had.
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. label Sep 20, 2026
@jsonMartin

Copy link
Copy Markdown
Contributor Author

Reopened as #3794 with a conventional branch name (feat/omarchy-bar-quota-and-pace). Same commit, no content change — GitHub closes a PR when its head branch is renamed, so this is the mechanical consequence rather than a withdrawal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant