Skip to content

fix(report): show where each dispatch quota went - #258

Merged
aqua5230 merged 3 commits into
mainfrom
fix/report-ledger
Oct 22, 2026
Merged

aqua5230 merged 3 commits into
mainfrom
fix/report-ledger

Conversation

@aqua5230

@aqua5230 aqua5230 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Problem

A cold read of the HTML report, then the user, flagged the dispatch ledger:

  • The Antigravity column summed to 121% for one day and 166% for the table: Antigravity has one weekly quota per model group, and estimate_sessions() added the shares of different groups together.
  • Codex showed — for usage from before its early reset (2026-10-23 01:47), which read as missing data.
  • The project column used the cwd basename (戰情室) instead of the git project (election-desk).
  • Even with those fixed, the user could not tell what the 7-column table was trying to show.

Fix

  • estimate_sessions() keeps shares per (agent, session, group) and reports sessions whose usage is all before the window start. Top sessions keep the per-session sum.
  • Project names use resolve_project_name().
  • The section becomes Where your dispatch quota went: one block per quota (Codex, and each Antigravity group under a short name: Gemini, Claude/GPT, Argon). Each block shows how much of that quota is used this week, the conversations whose dispatched work used it (top five, then "N more"), and "Other (your own use, or no dispatch record found)". Codex usage that all came before its reset says so in one line.
  • Unused ledger i18n keys removed; Wrapped captions say "the past year" (the data is a rolling 53 weeks).
  • format_pct rounds before picking decimals (1%, not 1.0%).

Checked with real data (usage report --last7): each block's lines add up to its used percentage (Argon 45+23+9+9+6+4+1 = 97).

Checks

ruff, ruff format, mypy ., doc parity, site pages, file size, pytest (3107 passed) all green locally.

🤖 Generated with Claude Code

Antigravity has a separate weekly quota per model group, but the ledger
added the shares of different groups into one number, so a single day's
rows summed to 121% and the table to 166%. Each group is now listed on
its own line in the Antigravity cell.

Usage that happened before a tool's current window started (Codex reset
early on 2026-10-23) showed "—", which read as missing data; it now says
"Reset". The project column uses resolve_project_name() like the project
section, so a session in election-desk/戰情室 shows election-desk.

The note under the table states the sort order and ends the unowned
sentence properly. Wrapped captions say "the past year" instead of "this
year", since the data is a rolling 53 weeks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T18:15:46.024652Z 3eb9541 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3eb954195d

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"agy_groups": agy_groups,
"claude_reset": claude_pct is None and "claude-code" in reset_agents,
"codex_reset": codex_pct is None and "codex" in reset_agents,
"agy_reset": not agy_groups and "antigravity" in reset_agents,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve reset state per Antigravity group

When a ledger row has current-window usage in one Antigravity group and pre-window-only usage in another, agy_groups is nonempty, so this condition sets agy_reset to false and the reset group disappears entirely. This is possible because the groups have independent reset times; retain reset status keyed by group and render it alongside groups with percentages rather than collapsing it into one agent-level flag.

Useful? React with 👍 / 👎.

aqua5230 and others added 2 commits October 23, 2026 02:19
- A lead sentence says what a row is: one Claude conversation, its own
  weekly-quota share, and the share of the work it handed to Codex and
  Antigravity.
- Antigravity groups use short names (Gemini, Claude/GPT, Argon) so each
  fits on one line instead of wrapping the cell onto four.
- "Reset" becomes "Last week's quota", and the note says what "—" means.
- The unowned-conversation count is a footnote, so it moves below the
  table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… table

The 7-column table (one row per conversation, one column per tool) left
the reader to work out the answer. The section is now "Where your dispatch
quota went": one block per quota (Codex and each Antigravity group), with
how much of it is used this week, the conversations whose dispatched work
used it (top five, then "N more"), and the rest as "Other (your own use,
or no dispatch record found)". Codex usage that all came before its reset
says so in one line. The conversation's own Claude share is no longer
shown; it was about 1% per row and not what the section is about.

Blocks are picked from every owned conversation, and only displayed titles
are read. Unused ledger i18n keys are removed. format_pct rounds before
choosing decimals, so 0.95 reads "1%" rather than "1.0%".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aqua5230 aqua5230 changed the title fix(report): keep Antigravity quota groups apart in the dispatch ledger fix(report): show where each dispatch quota went Oct 22, 2026
@aqua5230
aqua5230 merged commit 30d1b78 into main Oct 22, 2026
7 checks passed
@aqua5230
aqua5230 deleted the fix/report-ledger branch October 22, 2026 18:40
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.

1 participant