mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-10-30 19:32:39 +08:00
The setup-terminal gate introduced in #12703 changed the detail-stack predicate from !contextEmpty() && !history() to !history && selection !== null. An unassigned session has selection === null but a live session showing, so contextEmpty() is false there. The new gate dropped that case, blanking the content pane, leaving readOnly() dead code, and unmounting every live xterm on selection. showTerminalStack now takes contextEmpty and returns !history && (selection !== null || !contextEmpty), restoring the pre-#12703 semantics while keeping the provisioning worktree (empty context with a side Setup tab) rendering the stack. Adds a showTerminalStack regression suite covering the unassigned, history, selected-context, provisioning, and empty cases.