Skip to content

fix: taking plan type from usage endpoint instead of thru auth token#7610

Merged
zhao-oai merged 1 commit intomainfrom
dev/zhao/plan-type-refactor
Dec 5, 2025
Merged

fix: taking plan type from usage endpoint instead of thru auth token#7610
zhao-oai merged 1 commit intomainfrom
dev/zhao/plan-type-refactor

Conversation

@zhao-oai
Copy link
Copy Markdown
Contributor

@zhao-oai zhao-oai commented Dec 4, 2025

pull plan type from the usage endpoint, persist it in session state / tui state, and propagate through rate limit snapshots

@zhao-oai zhao-oai force-pushed the dev/zhao/plan-type-refactor branch 2 times, most recently from d3aa9a5 to a8a2e64 Compare December 4, 2025 21:21
@zhao-oai
Copy link
Copy Markdown
Contributor Author

zhao-oai commented Dec 4, 2025

@codex review

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

💡 Codex Review

"windowDurationMins": 15,
"resetsAt": 123
},
"secondary": null,
"credits": null

P1 Badge Add planType to rate limit notification expectation

The RateLimitSnapshot type now includes a plan_type field, and serde will serialize it as "planType": null when it’s unset. In verify_account_rate_limits_notification_serialization the expected JSON still lists only primary, secondary, and credits, so serde_json::to_value will now produce an extra planType entry and the assertion will fail. Please update the expected payload (or skip-serialize plan_type) so the test matches the new wire format.

ℹ️ 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".

@zhao-oai zhao-oai force-pushed the dev/zhao/plan-type-refactor branch 5 times, most recently from 89d837e to f896d65 Compare December 4, 2025 23:07
@zhao-oai
Copy link
Copy Markdown
Contributor Author

zhao-oai commented Dec 4, 2025

@codex review

@zhao-oai zhao-oai force-pushed the dev/zhao/plan-type-refactor branch from f896d65 to 4ba709a Compare December 4, 2025 23:22
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ 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".

@zhao-oai zhao-oai force-pushed the dev/zhao/plan-type-refactor branch from 4ba709a to 0e24624 Compare December 4, 2025 23:37
@zhao-oai
Copy link
Copy Markdown
Contributor Author

zhao-oai commented Dec 4, 2025

@codex review

Copy link
Copy Markdown
Contributor

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

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.

ℹ️ 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".

Comment thread codex-rs/tui/src/status/helpers.rs
@zhao-oai
Copy link
Copy Markdown
Contributor Author

zhao-oai commented Dec 4, 2025

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai left a comment

Choose a reason for hiding this comment

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

I left one comment about removing some now-obsolete calls in the auth crate, but the rest looks good to me.

Comment thread codex-rs/tui/src/status/helpers.rs
@zhao-oai zhao-oai force-pushed the dev/zhao/plan-type-refactor branch from 0e24624 to ed80a67 Compare December 5, 2025 05:43
@zhao-oai zhao-oai merged commit b8eab7c into main Dec 5, 2025
26 checks passed
@zhao-oai zhao-oai deleted the dev/zhao/plan-type-refactor branch December 5, 2025 07:34
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants