Skip to content

Add minimax admin functionality - #6293

Merged
intentionally-left-nil merged 4 commits into
mainfrom
minimax-username
Sep 18, 2026
Merged

intentionally-left-nil merged 4 commits into
mainfrom
minimax-username

Conversation

@intentionally-left-nil

@intentionally-left-nil intentionally-left-nil commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This adds two new buttons to the coding plan admin page:

  • The ability to swap out a key with another one (for the case when the upstream key is broken)
  • The ability to mark inventory as pending rotation in order to reduce the amount of subscriptions we carry

Verification

UI looks correct, will verify in prod once changes are deployed

Visual Changes

Screenshot 2026-09-18 at 10 29 58 AM

@intentionally-left-nil
intentionally-left-nil marked this pull request as ready for review September 18, 2026 16:50
@kilo-code-bot

kilo-code-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The test/signature mismatch flagged previously is fixed, but the reduce-inventory dialog copy still tells admins to use a "Pending Key Removal queue" while the UI tab and success toasts name it "Pending Key Rotation".

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/app/admin/coding-plans/coding-plan-operations.ts 117 Reduce-dialog copy references a "Pending Key Removal" queue; the UI and queue are named "Pending Key Rotation"
Files Reviewed (2 files)
  • apps/web/src/app/admin/coding-plans/coding-plan-operations.test.ts
  • apps/web/src/app/admin/coding-plans/coding-plan-operations.ts - 1 issue

Fix these issues in Kilo Cloud

Previous Review Summaries (2 snapshots, latest commit f39096b)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit f39096b)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The latest "linting" commit changed getReduceInventoryDialogCopy to drop its availableCount parameter and description text, but left the matching tests passing the old arguments and asserting the removed copy, so coding-plan-operations.test.ts now fails at compile/run time.

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
apps/web/src/app/admin/coding-plans/coding-plan-operations.test.ts 125 Tests still call getReduceInventoryDialogCopy with the removed availableCount argument and assert the old description

WARNING

File Line Issue
apps/web/src/app/admin/coding-plans/coding-plan-operations.ts 117 Reduce-dialog copy references a "Pending Key Removal" queue; the UI and queue are named "Pending Key Rotation"
Files Reviewed (8 files)
  • apps/web/src/app/admin/coding-plans/CodingPlansOperationsContent.tsx
  • apps/web/src/app/admin/coding-plans/coding-plan-operations.test.ts - 1 issue
  • apps/web/src/app/admin/coding-plans/coding-plan-operations.ts - 1 issue
  • apps/web/src/lib/coding-plans/index.ts
  • apps/web/src/lib/coding-plans/minimax-token-health.test.ts
  • apps/web/src/lib/coding-plans/minimax-token-health.ts
  • apps/web/src/routers/coding-plans-router.test.ts
  • apps/web/src/routers/coding-plans-router.ts

Fix these issues in Kilo Cloud

Previous review (commit 3a00397)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the new MiniMax admin swap/reduce flows end to end; the SQL is parameterized, row locking is consistent (subscription row locked before inventory rows in both terminateCodingPlanImmediately and reassignSubscriptionCredential), and the reduce claim uses FOR UPDATE SKIP LOCKED with a NOT EXISTS guard against live subscriptions, so I found no high-confidence blocking defects.

Files Reviewed (8 files)
  • apps/web/src/app/admin/coding-plans/CodingPlansOperationsContent.tsx
  • apps/web/src/app/admin/coding-plans/coding-plan-operations.test.ts
  • apps/web/src/app/admin/coding-plans/coding-plan-operations.ts
  • apps/web/src/lib/coding-plans/index.ts
  • apps/web/src/lib/coding-plans/minimax-token-health.test.ts
  • apps/web/src/lib/coding-plans/minimax-token-health.ts
  • apps/web/src/routers/coding-plans-router.test.ts
  • apps/web/src/routers/coding-plans-router.ts

Note: the kilocode-landing content/SEO rules and the markdown-image rule supplied in the review prompt do not apply to this PR, which touches no landing pages or .md files.


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@intentionally-left-nil
intentionally-left-nil force-pushed the minimax-username branch 2 times, most recently from 4fe9318 to 05d7438 Compare September 18, 2026 17:20

describe('reduce inventory copy', () => {
it('names the plan and available count, and explains the manual provider-side step', () => {
const dialog = getReduceInventoryDialogCopy('minimax-token-plan-plus', 5);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CRITICAL: Tests call getReduceInventoryDialogCopy with the removed availableCount argument

This PR changed getReduceInventoryDialogCopy(planId, availableCount) to getReduceInventoryDialogCopy(planId) and replaced the description, but this test was not updated. getReduceInventoryDialogCopy('minimax-token-plan-plus', 5) fails TypeScript with 'Expected 1 arguments, but got 2', and the assertions below (5 credentials are currently available, Pending Key Rotation, Kilo never contacts the provider) can no longer pass against the new copy. The same stale call and assertions appear at lines 133-134. Update these tests (or restore the richer description) so the suite passes.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread apps/web/src/app/admin/coding-plans/coding-plan-operations.ts
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