feat(admin): add dev-only nuke all button to KiloClaw admin page#1321
Open
feat(admin): add dev-only nuke all button to KiloClaw admin page#1321
Conversation
Add a button (visible only in development mode) to destroy all active KiloClaw instances, tearing down Fly machines via the worker. Uses the same mark-then-revert pattern as single-instance destroy to keep DB and Fly state consistent on partial failures.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 137,263 tokens |
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
Add a "Nuke All" button to the KiloClaw admin instances page that destroys all active KiloClaw instances, including their Fly machines via the worker. The button and its backend endpoint are both gated to development mode only (
process.env.NODE_ENV !== 'development').devNukeAllmutation onadminKiloclawInstancesRouterthat iterates active instances, marks each destroyed in Postgres, then callsclient.destroy()on the worker. Uses the same mark-then-revert pattern as the existing single-instancedestroyendpoint — if the worker call fails, the DB row is restored so state stays consistent.DevNukeAllButtoncomponent rendersnulloutside development mode. Shows a destructive button with confirmation dialog. Reports results including any partial failures.Verification
pnpm typecheck— 28 packages pass, 0 failurespnpm format— no formatting issuesgit push— pre-push hooks (format:check, lint, typecheck) all passVisual Changes
N/A
Reviewer Notes
process.env.NODE_ENV !== 'development'early return. The server endpoint also hard-gates with the same check and returnsFORBIDDEN.