MiniMax: Token Plan API usage, weekly-cap handling, collapsible menu & settings UI#742
MiniMax: Token Plan API usage, weekly-cap handling, collapsible menu & settings UI#742cskeleton wants to merge 7 commits intosteipete:mainfrom
Conversation
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
There was a problem hiding this comment.
💡 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)) |
There was a problem hiding this comment.
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
|
Addressed the P2 inline review on |
Remove .cursor/hooks/state and .specstory from the repo tree; add gitignore rules so IDE-local data is not committed again. Made-with: Cursor
Summary
upstream/mainto reduce conflicts.Implementation notes
MiniMaxMenuCardViews,MiniMaxSectionCollapseStore,MiniMaxUILayoutMetrics,UsageMenuCardViewModel+MiniMax;MiniMaxUsageFetcherextended accordingly.AppGroupSupportTestssnapshot paths isolated to temp dirs;ClickToCopyoverlay split toMenuCardClickToCopy.swiftfor SwiftLint file length.Verification
swift test./Scripts/lint.sh lintMade with Cursor