You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle permission/question/command-approval events for active session in global listener (#164)
Fixed permission/question/command-approval dialogs not appearing for the active session. The global listener (useOpenCodeGlobalListener) previously filtered these events to only process background sessions (sessionId !== activeId), which meant the active session could silently miss permission.asked, question.asked, and command.approval_needed events — causing dialogs to never appear.
Events are now processed for all sessions (active + background). The listener adds requests to the relevant stores (permission, question, command-approval) regardless of whether the session is active or background, ensuring dialogs always appear.
Status badge updates remain background-only.useWorktreeStatusStore.setSessionStatus() calls are still gated behind sessionId !== activeId so the active session's status isn't incorrectly overwritten.
Auto-approve for the active session is deferred to SessionView. Background sessions continue to auto-approve directly in the global listener, but the active session's auto-approve is left to SessionView which has access to the worktreePath context.
Fix slash command dropdown not clearing after selection (#162)
Fix slash command dropdown staying open after a command is selected. The dropdown condition value.startsWith('/') && value.length >= 1 kept the dropdown visible even after a slash command was chosen (e.g. /undo fix the bug). Changed to value.startsWith('/') && !value.includes(' ') so the dropdown dismisses once a space follows the command — indicating the user has made a selection and is now typing arguments or a message.
Refactor slash command input detection tests. Extracted the duplicated handleInputChange logic into a shared helper, reduced boilerplate across existing tests, and added two new test cases covering the space-based dismissal behavior (/command and /command text).