feat(tui): add usage report command [4 of 4]#24124
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39857cdc08
ℹ️ 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".
| Line::from(USAGE_TITLE.bold()), | ||
| Line::from(USAGE_SUBTITLE.dim()), | ||
| Line::default(), | ||
| Line::from(format!(" Failed to load usage: {}", self.error)), |
There was a problem hiding this comment.
Wrap usage error text before drawing card
When /usage fails with a long app-server error (for example a backend/SQLite error string), this creates one unwrapped line and only clamps the requested inner width afterward. with_border_with_inner_width still expands to the widest provided line, so the error card can exceed the terminal width instead of wrapping like the normal usage messages; wrap the failure message before passing it to the bordered card.
Useful? React with 👍 / 👎.
94ed2da to
31de2a6
Compare
39857cd to
9e8de8f
Compare
31de2a6 to
6ddec49
Compare
9e8de8f to
667af1b
Compare
6ddec49 to
c9055e5
Compare
6a84e96 to
a84ff03
Compare
dbce2a4 to
26bdc40
Compare
a84ff03 to
5e15063
Compare
Why
Users need a local way to inspect which Codex features are consuming tokens over the current day or week.
What Changed
/usage,/usage week, and/usage weekly.How to Test
/usageand confirm the daily usage card appears./usage weekand confirm the weekly title/period appears.Targeted tests:
cargo test -p codex-tui usage_outputStack
/usagecommand (this PR)