Skip to content

feat(frontend): add kill button to worker session page#288

Merged
harshitsinghbhandari merged 1 commit into
mainfrom
session/aa-111-kill-button
Jun 17, 2026
Merged

feat(frontend): add kill button to worker session page#288
harshitsinghbhandari merged 1 commit into
mainfrom
session/aa-111-kill-button

Conversation

@harshitsinghbhandari

Copy link
Copy Markdown
Collaborator

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

  • New KillSessionButton in SessionInspector rendered in a "Danger zone" section of the Summary view.
  • Arms a one-step inline confirmation (Kill sessionConfirm kill / Cancel) so a stray click can't tear down a session.
  • On confirm, 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.
  • Only shown for active sessions (sessionIsActive) — hidden once terminated/merged.

Mirrors the existing mutation pattern in PullRequestsPage (useMutation + apiErrorMessage + workspaceQueryKey invalidation).

Tests

  • Added SessionInspector.test.tsx covering: confirm-then-kill posts to the endpoint, cancel backs out, daemon error surfaces, and the button is hidden for terminated sessions.
  • npm run typecheck clean; full renderer suite green (136 passed). Backend untouched.

Closes #287

🤖 Generated with Claude Code

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>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@harshitsinghbhandari harshitsinghbhandari merged commit 4bbcf9e into main Jun 17, 2026
3 checks passed
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.

no kill button on worker session page.

1 participant