Skip to content

feat(agents): All tab, period filters, more harnesses, and honest usage totals - #10400

Closed
LucasOl1337 wants to merge 5 commits into
omacom:quattrofrom
LucasOl1337:feat/agents-all-period-antigravity-hermes
Closed

LucasOl1337 wants to merge 5 commits into
omacom:quattrofrom
LucasOl1337:feat/agents-all-period-antigravity-hermes

Conversation

@LucasOl1337

@LucasOl1337 LucasOl1337 commented Sep 5, 2026 •

Copy link
Copy Markdown

Summary

Stock Omarchy's Agents panel charts Claude, Codex, and Fireworks over the last seven days. This PR is the rest of that panel: every harness that actually runs on an Omarchy machine, filters that match the calendar instead of a quota window, project and live inspection, and totals that do not lie.

It is the same work that ships today as lol.agents v1.4.1. The plugin id stays omarchy.agents. Refresh still goes through omarchy-agent-usage-update. Extra collectors are new bin/omarchy-agent-usage-* commands, so the stock updater picks them up.

What stock does today

  • One tab per record, no All
  • Last seven days only
  • Collectors: Claude, Codex, Fireworks
  • No project or live view

What this PR adds

Views

  • All — sums every enabled harness. Rate limits stay per-account and are never merged.
  • Day / Week / Month / Total — week is the default. Total is all-time (or the collector's window), not a quota reset.
  • Projetos / Tempo real — local sessions, compact rows, on-demand previews, no network. 25 records per page. 9Router stays in the filter but is excluded from the combined total so harness requests are not counted twice.

Collectors (stock updater discovers them)

Collector Limits Local stats
Antigravity agy session + weekly pools ~/.gemini/antigravity-cli
Hermes none ~/.hermes/state.db and profiles
Grok SuperGrok weekly pool ~/.grok/sessions
Cursor Cursor Models / Other Models from the same display sentences Settings shows billing-cycle tokens by model
OpenCode none completed assistant turns in opencode.db, dated by the message clock
Devin none local Devin CLI sessions.db

Accuracy (the part that bit us on a real desktop)

  • Stale today* is not today. A leftover OpenCode file from 6 Sep kept todayTotalTokens: 585147 with updatedAt: null. Day painted that as calendar today. The panel now trusts today* only when updatedAt or the history itself is from today.
  • Day / Week / Month never fall back to all-time modelUsage. That fallback is how a billion Grok Bot tokens from Cursor's billing-cycle map showed up under Day. Addresses the review on the earlier revision: bounded periods use per-day history only; Total still shows the cycle / all-time breakdown. Regression: tests/test_period_model_map.py.
  • Cursor meters match Settings. Plan & Usage on Ultra showed Cursor Models 1% / Other Models 0% / no on-demand pot. Reading autoPercentUsed and Ultra's includedAmountCents produced a fake 45% and a prepaid $400 wallet. Meters now parse the display sentences; a balance appears only when spendLimitUsage has a real remaining + limit.

Test plan

  • bash test/shell.d/agents-panel-test.sh
  • bash test/shell.d/agents-usage-accuracy-test.sh
  • bash test/shell.d/agents-usage-collectors-test.sh
  • bash test/shell.d/agents-tracking-test.sh
  • bash test/shell.d/agent-usage-update-test.sh
  • bash test/shell.d/agent-usage-hermes-scanner-test.sh
  • git diff --check

On a live Omarchy desktop the same collectors already run as lol.agents 1.4.1: OpenCode today is 0 when the last turn was last week; Cursor chips show 1% / 0% next to Settings.

Notes

  • Tracking is not a system-wide request monitor or a billing ledger. It reads default local paths only.
  • 9Router is listed separately so the same request is not counted once by the harness and again by the router.
  • Rebased onto current quattro.

@LucasOl1337 LucasOl1337 changed the title feat(agents): All tab, period filters, Antigravity and Hermes feat(agents): add aggregate, project and live usage views Sep 6, 2026
@Brams-s

Brams-s commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Sharing related work for coordination around the shared Agents panel: #9204 agrees a focused Codex follow-up after #8862, emitting optional UTC recentModelUsageByHour buckets (hourStart / tokensByModel) from the existing native, pi/omp, and OpenCode scan paths.

Today's local prototype audit found a concrete coverage failure: the daily total included native Codex while the hourly view only included OpenCode, leaving a false zero for an hour with about 15.0M native tokens. The useful invariant for both efforts is that totals for the same source scope, window, and token definition reconcile, or the UI makes incomplete attribution explicit.

I have submitted only the independent native repeated-notification correction so far (#10531). The hourly UI remains a separate follow-up. Linking the discussions here so the optional field/coverage semantics can stay compatible as your aggregate and live views evolve.

@LucasOl1337
LucasOl1337 force-pushed the feat/agents-all-period-antigravity-hermes branch from 9ed963b to d9902b0 Compare September 8, 2026 11:34
@LucasOl1337

Copy link
Copy Markdown
Author

Rebased onto current quattro (was 641 commits behind). Agent panel/tracking/Antigravity/Hermes tests still pass.

@Brams-s

Brams-s commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for the rebase update. I checked the period aggregation at d9902b0 and found a remaining time-window mismatch relevant to the coverage point above: periodModelMap() falls back to all-time modelUsage when the selected window lacks enough per-day model attribution. The All view then includes those all-time tokens while its footer labels them “this week”.

A small synthetic reproduction using the current helper functions gives 100 tokens in the weekly daily totals but 1,000 in All/week's model total when that provider has 1,000 all-time tokens and no per-day model breakdown. Could we keep the fallback explicitly labeled as all-time/incomplete, or show the selected-window model breakdown as unavailable rather than presenting it as a weekly total? A behavioral regression test for this case would also help keep the later optional hourly buckets consistent with these views.

LucasOl1337 and others added 4 commits September 12, 2026 09:55
The agents panel could only show Claude, Codex, and Fireworks, and its
token charts were stuck on the last seven days. Add collectors for
Antigravity quotas and Hermes tokens-by-model, then teach the panel an
All chip that sums every harness and Day / Week / Month / Total filters
that do not wait for a quota reset.
Co-authored-by: Cursor <cursoragent@cursor.com>
@LucasOl1337 LucasOl1337 changed the title feat(agents): add aggregate, project and live usage views feat(agents): All tab, period filters, more harnesses, and honest usage totals Sep 12, 2026
@LucasOl1337
LucasOl1337 force-pushed the feat/agents-all-period-antigravity-hermes branch from d9902b0 to 10184e1 Compare September 12, 2026 12:58
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@Brams-s

Brams-s commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Thanks for removing the all-time fallback. I checked 6ad89bd and found two remaining cases in the All/week footer:

  • A provider with 100 weekly tokens but no per-day model breakdown shows “0 tokens this week · every harness”.
  • Thirteen models with 10 tokens each show 120 rather than 130, because the footer sums the capped model rows.

Could the footer use the uncapped selected-period totals and label missing model attribution as incomplete? I reproduced both with the production Panel.qml helpers and synthetic records. The five Python tests pass, but they exercise a separate implementation; a regression against the QML helpers would catch these cases.

@dhh

dhh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for all the work here. Thanks for this! The agents panel was redesigned in #13770 into a single page with every agent and account at once, so the All tab and period filters don't apply anymore. Grok landed in #13992, and Cursor, OpenCode, Copilot, Hermes, and Antigravity collectors are being brought in from their dedicated PRs. Closing.

@dhh dhh closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants