feat(admin): add KiloClaw instance link on user profile page#1344
Merged
evanjacobson merged 4 commits intomainfrom Mar 23, 2026
Merged
feat(admin): add KiloClaw instance link on user profile page#1344evanjacobson merged 4 commits intomainfrom
evanjacobson merged 4 commits intomainfrom
Conversation
Contributor
Author
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)No new issues found in the incremental diff. Fix these issues in Kilo Cloud Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (8 files)
Reviewed by gpt-5.4-20260305 · 850,275 tokens |
jeanduplessis
approved these changes
Mar 23, 2026
Add a 'View KiloClaw' button to the admin user profile's KiloClaw section that links directly to the user's active KiloClaw instance admin page (/admin/kiloclaw/[id]). Extends getKiloClawState tRPC procedure to also fetch the user's active kiloclaw_instances record (where destroyed_at IS NULL) and return the activeInstanceId. The link appears in all card states (with subscription, earlybird-only, and no subscription) whenever the user has an active instance.
Add activeInstanceId to the exact-shape toEqual assertion and add two new test cases covering the active/destroyed instance scenarios.
9f5b297 to
cfec2d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/admin/kiloclaw/[id]).getKiloClawStatetRPC procedure to also querykiloclaw_instancesfor the user's active instance (wheredestroyed_at IS NULL) and return theactiveInstanceId.Button variant="outline"withExternalLinkicon).Verification
tsgo --noEmit --incremental false— passes with no errorsoxlint— passes with 0 warnings and 0 errorsVisual Changes
The "View KiloClaw" button appears in the KiloClaw card header on the admin user profile page, next to the existing "Edit Trial End" button (when applicable). It is only visible when the user has an active KiloClaw instance.
Reviewer Notes
activeInstanceIdquery filters ondestroyed_at IS NULLto only return the user's currently active instance. This aligns with the unique index onkiloclaw_instances(UQ_kiloclaw_instances_active).KiloclawInstanceDetail.tsx:1107).