feat(tui): reland token activity command#27925
Merged
Merged
Conversation
etraut-openai
approved these changes
Jun 12, 2026
etraut-openai
left a comment
Collaborator
There was a problem hiding this comment.
Confirmed that the branch is effectively unchanged from what I previously reviewed.
6654cae to
40447b6
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
#25345 was approved, green, and squash-merged into its stacked base branch,
fcoury/tokenmaxxing-api. Four minutes later, that base branch was force-pushed back to an API-only rebased head while preparing #25344 formain. As a result, the squash commit from #25345 was orphaned and the TUI command never reachedmainor a release.This PR relands the orphaned TUI change from
411410b8on currentmain.What changed
/usage,/usage daily,/usage weekly, and/usage cumulativefor account token activity.account/usage/readapp-server RPC./usagefrom completion when backend auth is unavailable while keeping typed-command guidance.Prior review
The original implementation was approved by Eric Traut in #25345 after testing multiple themes and light/dark terminals. This PR preserves that reviewed implementation while adapting it to current
mainand adding regression coverage for newer rollback and hook lifecycle behavior.Validation
just test -p codex-tui token_activity palette renderable usage_command— 37 passed.just fix -p codex-tui— passed.UV_CACHE_DIR=/private/tmp/codex-uv-cache just fmt— passed.cargo insta pending-snapshots— no pending snapshots.just test -p codex-tui— 2,870 passed; two unrelated guardian feature-flag tests failed because their expectedOverrideTurnContextevent was absent:update_feature_flags_disabling_guardian_clears_manual_review_policy_without_historyupdate_feature_flags_disabling_guardian_clears_review_policy_and_restores_defaultjust argument-comment-lintcould not complete because the local Bazel LLVMcompiler-rtrepository is missinginclude/sanitizer/*.h. The touched Rust diff was manually inspected and no missing opaque-literal argument comments were found.