Commit b28aa51
committed
Fix: scope terminal event handler to setup terminals only
The onEvent handler unconditionally called ensureTerminal and
setTerminalLaunchContext for every started/restarted terminal event,
not just server-initiated setup terminals. This caused the drawer to
force-open for all terminal events and set worktreePath: null for
non-setup terminals, creating stale launch context entries that the
ChatView cleanup effect could not clear.
Guard the handler to only fire for setup terminals (IDs starting with
'setup-'), and since we now know it's a setup terminal, always use
event.snapshot.cwd as the worktreePath instead of conditionally
returning null.1 parent 033be30 commit b28aa51
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
231 | | - | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
0 commit comments