Skip to content

feat(admin): add KiloClaw subscription controls#1291

Merged
jeanduplessis merged 3 commits intomainfrom
kiloclaw-billing-admin
Mar 20, 2026
Merged

feat(admin): add KiloClaw subscription controls#1291
jeanduplessis merged 3 commits intomainfrom
kiloclaw-billing-admin

Conversation

@jeanduplessis
Copy link
Contributor

Summary

Add KiloClaw subscription management to the admin user detail page so admins can inspect a user's KiloClaw subscription state and edit the KiloClaw trial expiration date without leaving /admin/users/[id].

This adds admin tRPC read/write endpoints for KiloClaw subscription state, records trial-date edits in the KiloClaw admin audit log, and adds a dedicated KiloClaw card in the existing admin user dashboard. The trial date editor now preserves the admin's local calendar date when reopening and saving a value.

Verification

  • pnpm exec tsc -p tsconfig.json --noEmit --pretty false --incremental false
  • git push -u origin kiloclaw-billing-admin (pre-push hooks ran pnpm run format:check, pnpm run lint, and pnpm run typecheck successfully)
  • pnpm test -- src/routers/admin-kiloclaw-user-router.test.ts could not complete in this environment because the test Postgres setup was unavailable

Visual Changes

Before After
Not captured Not captured

Reviewer Notes

Admin trial-date editing is intentionally limited to existing trialing KiloClaw subscription rows. The organization trial editor appears to use the older UTC/local date pattern too, but this PR only fixes the KiloClaw admin flow.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 19, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • packages/db/src/schema-types.ts
  • src/app/admin/components/UserAdmin/UserAdminDashboard.tsx
  • src/app/admin/components/UserAdmin/UserAdminKiloClaw.tsx
  • src/routers/admin-kiloclaw-user-router.test.ts
  • src/routers/admin-router.ts

Reviewed by gpt-5.4-20260305 · 2,596,447 tokens

@jeanduplessis jeanduplessis force-pushed the kiloclaw-billing-admin branch from cf3a60e to 8d6cf9e Compare March 20, 2026 05:59
@jeanduplessis jeanduplessis merged commit e5b7d08 into main Mar 20, 2026
18 checks passed
@jeanduplessis jeanduplessis deleted the kiloclaw-billing-admin branch March 20, 2026 08:56
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