feat(admin): add KiloClaw instance link on user profile page#1344
Open
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
Open
feat(admin): add KiloClaw instance link on user profile page#1344kilo-code-bot[bot] wants to merge 3 commits intomainfrom
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
Conversation
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.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 97,688 tokens |
Add activeInstanceId to the exact-shape toEqual assertion and add two new test cases covering the active/destroyed instance scenarios.
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).