Skip to content

MiniMax: Token Plan API usage, weekly-cap handling, collapsible menu & settings UI#742

Open
cskeleton wants to merge 7 commits intosteipete:mainfrom
cskeleton:cursor/minimax-multi-model-usage-ef73
Open

MiniMax: Token Plan API usage, weekly-cap handling, collapsible menu & settings UI#742
cskeleton wants to merge 7 commits intosteipete:mainfrom
cskeleton:cursor/minimax-multi-model-usage-ef73

Conversation

@cskeleton
Copy link
Copy Markdown

Summary

  • Usage: Show full MiniMax Token Plan API usage in the menu bar card and in provider settings. Legacy plans without a weekly cap omit weekly-limit rows.
  • UI: MiniMax menu card supports grouped section collapse and in-card scrolling; settings mirror grouped sections with scrolling.
  • Sync: Branch includes a merge of current upstream/main to reduce conflicts.

Implementation notes

  • New helpers: MiniMaxMenuCardViews, MiniMaxSectionCollapseStore, MiniMaxUILayoutMetrics, UsageMenuCardViewModel+MiniMax; MiniMaxUsageFetcher extended accordingly.
  • Post-merge: AppGroupSupportTests snapshot paths isolated to temp dirs; ClickToCopy overlay split to MenuCardClickToCopy.swift for SwiftLint file length.

Verification

  • swift test
  • ./Scripts/lint.sh lint

Made with Cursor

cursoragent and others added 5 commits April 18, 2026 19:19
Co-authored-by: c.skeleton <cskeleton@users.noreply.github.com>
- Show full MiniMax Token Plan API usage in menu bar card and provider settings; hide weekly cap rows when the plan has no weekly limit (legacy plans).\n- MiniMax menu card: section collapse defaults, in-card scrolling, layout metrics; Preferences mirrors grouped sections with scrolling.\n- Extend MiniMaxUsageFetcher parsing, tests, and docs/minimax.md; note behavior in AGENTS.md.

Made-with: Cursor
Resolve conflicts: keep upstream async URLSession challenge handlers; use waitForResult in OpenAIDashboardNavigationDelegateTests.

Made-with: Cursor
- AppGroupSupportTests: override snapshot URLs with temp paths so migration tests do not touch real Group Containers.\n- Move ClickToCopy overlay types to MenuCardClickToCopy.swift to satisfy SwiftLint file_length.

Made-with: Cursor
Copy link
Copy Markdown

@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.

Reviewed commit: 26d7044213

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


static func miniMaxDetailLine(model: MiniMaxModelUsage) -> String? {
guard let total = model.availablePrompts else { return nil }
let used = model.currentPrompts ?? max(0, total - (model.remainingPrompts ?? 0))
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 Avoid inferring full usage when remaining count is missing

In miniMaxDetailLine, the fallback model.remainingPrompts ?? 0 turns a missing remaining count into zero and reports used == total, which can render rows as fully consumed even when the API payload simply omitted current_interval_usage_count. This creates incorrect usage text (and disagrees with percent/reset fields that already treat missing counts as unknown), so rows with partial interval data should avoid deriving used from an assumed zero remaining value.

Useful? React with 👍 / 👎.

Avoid treating missing remaining as zero (full usage). Show em dash over total when neither current nor remaining is available. Adds XCTest coverage. Addresses Codex review on PR steipete#742.

Made-with: Cursor
@cskeleton
Copy link
Copy Markdown
Author

Addressed the P2 inline review on miniMaxDetailLine: we no longer treat missing remainingPrompts as 0 when deriving used count. If both currentPrompts and remainingPrompts are absent, the line shows —/<total> instead of implying full consumption. Pushed as f952a432.

Remove .cursor/hooks/state and .specstory from the repo tree; add gitignore rules so IDE-local data is not committed again.

Made-with: Cursor
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.

2 participants