opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Session list jumps to active session when confirming delete on non-current session

Open nalin-singh opened this issue 2 weeks ago • 3 comments

Description

Problem

  • When a user presses Ctrl+D to delete a non-active session in the Sessions dialog (Ctrl+X, L), the selection/focus unexpectedly jumps to the currently active session. This prevents reliable deletion of the intended session and risks accidental deletion of the wrong session.

Impact

  • Accidental delete of the current working session and forces user to exit to the main screen to delete a session

OpenCode version

1.0.152

Steps to reproduce

  1. Open OpenCode TUI
  2. Start a new session
  3. Open Sessions list (Ctrl+X, L)
  4. Navigate to a session that is not the currently active session
  5. Press Ctrl+D to mark it for deletion
  6. Expected: Confirmation text appears ("Press ctrl+d again to confirm") and selection stays on the intended session
  7. Actual : Selection jumps to the active session; if user presses Ctrl+D again, the active session gets deleted instead

Screenshot and/or share link

https://github.com/user-attachments/assets/99faf437-5d94-4dc8-a3fb-0cca714b6fb6

Operating System

No response

Terminal

No response

nalin-singh avatar Dec 13 '25 03:12 nalin-singh

@rekram1-node could you have a look at this, if this makes sense ? apologies if I'm rushing here

nalin-singh avatar Dec 15 '25 12:12 nalin-singh

Oh right u have a pr ill look, have quite a few so just continue pinging me if I miss something

rekram1-node avatar Dec 16 '25 23:12 rekram1-node

I noticed this a few days ago as well. I did accidentally delete my current session as well.

zacharytamas avatar Dec 17 '25 01:12 zacharytamas