opencode
opencode copied to clipboard
Session list jumps to active session when confirming delete on non-current session
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
- Open OpenCode TUI
- Start a new session
- Open Sessions list (Ctrl+X, L)
- Navigate to a session that is not the currently active session
- Press Ctrl+D to mark it for deletion
- Expected: Confirmation text appears ("Press ctrl+d again to confirm") and selection stays on the intended session
- 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
@rekram1-node could you have a look at this, if this makes sense ? apologies if I'm rushing here
Oh right u have a pr ill look, have quite a few so just continue pinging me if I miss something
I noticed this a few days ago as well. I did accidentally delete my current session as well.