Fix MiniMax token plan usage display#1266
Conversation
|
Codex review: needs changes before merge. Reviewed June 1, 2026, 9:59 PM ET / 01:59 UTC. Summary Reproducibility: yes. for the review finding from source: current main sends API-token fetches to Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the new token-plan parser and UI direction, but preserve the existing MiniMax API-token remains endpoint as a fallback with focused regression coverage before merge. Do we have a high-confidence way to reproduce the issue? Yes for the review finding from source: current main sends API-token fetches to Is this the best way to solve the issue? No, not yet: the new token-plan parser/UI is the right direction, but the narrowest maintainable solution preserves existing API-token endpoint compatibility while adding the new endpoint support. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against dc4e4835bc6e. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c30b7ee387
ℹ️ 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".
| @@ -0,0 +1,43 @@ | |||
| extension MiniMaxUsageSnapshot { | |||
| func withPlanNameIfAvailable(_ planName: String?) -> MiniMaxUsageSnapshot { | |||
| let cleaned = planName?.trimmingCharacters(in: .whitespacesAndNewlines) | |||
There was a problem hiding this comment.
Import Foundation before trimming plan names
This new file does not import Foundation, but trimmingCharacters(in:) and .whitespacesAndNewlines are Foundation APIs; Swift imports are file-scoped, so any target compiling this file fails before the MiniMax tests can run. Add import Foundation before using these helpers.
Useful? React with 👍 / 👎.
| if let tokenPlan = tokenPlans.min(by: { lhs, rhs in | ||
| lhs.rank == rhs.rank ? lhs.value.count < rhs.value.count : lhs.rank < rhs.rank | ||
| }) { | ||
| return tokenPlan.value |
There was a problem hiding this comment.
Prefer current plan over global token-plan strings
When the combo response contains strings for multiple token plans (for example a packages list with Plus/Max/Ultra alongside current_subscribe_title for the actual subscription), this global min ranking always chooses Plus over Max/Ultra regardless of the current plan. That mislabels Max or Ultra users as Plus; restrict the search to the current subscription fields first, or only fall back to all collected strings when no current-plan value is present.
Useful? React with 👍 / 👎.
c30b7ee to
485bd89
Compare
Fixes steipete#1258. Co-authored-by: Yash Raj Pandey <yashpn62@gmail.com>
Co-authored-by: pickaxe <54486432+ProspectOre@users.noreply.github.com>
Summary
generalandvideobuckets.General,Video) in the MiniMax menu card.interval_boost_permill/weekly_boost_permill.generalweekly status-3 quota as unlimited, while hiding unavailable Plusvideoplaceholders.Validation
swift test --filter MiniMaxTokenPlanChangeTestsswift test --filter MiniMaxMenuCardModelPlanTestsmake checkCODEXBAR_SIGNING=adhoc ./Scripts/package_app.shNotes
swift testcurrently fails in unrelatedProviderStorageFootprintTests.swift:401withstorageRefreshGenerationexpected41, actual42.