feat(frontend): add kill button to worker session page#288
Merged
Conversation
The worker session inspector had no way to stop a running session from
the UI. Add a "Kill session" action in the Summary view's Danger zone
that arms a one-step confirmation, then POSTs /sessions/{id}/kill and
invalidates the workspace query so the session moves to the terminated
group. The action is hidden for already-terminated/merged sessions.
Closes #287
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
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.
What
Adds a Kill session action to the worker session page (the inspector rail's Summary view), closing #287 — there was previously no way to stop a running worker session from the UI.
How
KillSessionButtoninSessionInspectorrendered in a "Danger zone" section of the Summary view.Kill session→Confirm kill/Cancel) so a stray click can't tear down a session.POST /api/v1/sessions/{sessionId}/kill, then invalidates the workspace query so the session drops into the board's terminated group. Daemon errors surface inline.sessionIsActive) — hidden once terminated/merged.Mirrors the existing mutation pattern in
PullRequestsPage(useMutation+apiErrorMessage+workspaceQueryKeyinvalidation).Tests
SessionInspector.test.tsxcovering: confirm-then-kill posts to the endpoint, cancel backs out, daemon error surfaces, and the button is hidden for terminated sessions.npm run typecheckclean; full renderer suite green (136 passed). Backend untouched.Closes #287
🤖 Generated with Claude Code