Skip to content

feat: add k keybinding to kill selected session#47

Merged
robinojw merged 4 commits intomainfrom
feat/kill-session-keybinding
Mar 18, 2026
Merged

feat: add k keybinding to kill selected session#47
robinojw merged 4 commits intomainfrom
feat/kill-session-keybinding

Conversation

@robinojw
Copy link
Copy Markdown
Owner

Summary

  • Add k keybinding that kills and removes the selected agent session from the canvas
  • Stops PTY process, unpins from session panel, deletes from store, and clamps selection
  • Works in both grid and tree canvas modes
  • Adds ClampSelected() to CanvasModel for safe index adjustment after deletion
  • Adds kill keybinding entry to the help screen

Test plan

  • ClampSelected clamps index after deletion and handles empty store
  • k removes thread from store, stops PTY, unpins session, clamps selection
  • k with no threads is a no-op
  • k returns focus to canvas when last pinned session is killed
  • k works in tree mode via selectedThreadID() helper
  • Help screen shows kill keybinding
  • Full suite passes with race detector (go test ./... -v -race)
  • Lint clean (golangci-lint run — 0 issues)

@robinojw robinojw merged commit e0db425 into main Mar 18, 2026
1 check 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.

1 participant