fix: sync run button state with terminal process via centralized exit tracking
Centralize terminal process lifecycle in terminal-context as single
source of truth. TerminalView reports exit/failure via callback,
context maintains exitedTerminals set, command-dropdown reacts to it.
Removes redundant polling and per-component exit event subscriptions
that raced with deferred spawn introduced in b2d10fa.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import { TerminalTabBar } from "./terminal-tab-bar"
|
||||
import { TerminalView } from "./terminal-view"
|
||||
|
||||
export function TerminalPanel() {
|
||||
const { isOpen, tabs, activeTabId } = useTerminalContext()
|
||||
const { isOpen, tabs, activeTabId, markTerminalExited } = useTerminalContext()
|
||||
|
||||
return (
|
||||
<section
|
||||
@@ -22,6 +22,7 @@ export function TerminalPanel() {
|
||||
initialCommand={tab.initialCommand}
|
||||
isActive={tab.id === activeTabId}
|
||||
isVisible={isOpen}
|
||||
onProcessExited={markTerminalExited}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user