fix: Project action terminal lifecycle (#3287)
* fix(terminal): make command sessions own action lifecycle * fix(ui): reconcile project action terminal state * feat(ui): show running project actions in terminal tabs * feat(ui): run project actions from linked worktrees * fix(ui): guard project action reconciliation * fix(ui): scope project action preview fallback * fix(ui): default project actions to worktrees * fix(ui): reveal project action terminals * fix(ui): retain terminal output after snapshot replay * fix(ui): restore running action terminals on revisit
This commit is contained in:
@@ -969,8 +969,8 @@ export const ContextPanel: React.FC = () => {
|
||||
() => tabs.filter((tab) => tab.mode === 'diff'),
|
||||
[tabs],
|
||||
);
|
||||
const hasTerminalTab = React.useMemo(
|
||||
() => tabs.some((tab) => tab.mode === 'terminal'),
|
||||
const terminalTab = React.useMemo(
|
||||
() => tabs.find((tab) => tab.mode === 'terminal') ?? null,
|
||||
[tabs],
|
||||
);
|
||||
// Keep-alive: the walkthrough holds reading progress and scroll position that
|
||||
@@ -1283,9 +1283,9 @@ export const ContextPanel: React.FC = () => {
|
||||
</React.Suspense>
|
||||
</div>
|
||||
))}
|
||||
{hasTerminalTab ? (
|
||||
{terminalTab ? (
|
||||
<div className={cn('absolute inset-0', activeTab?.mode === 'terminal' ? 'block' : 'hidden')}>
|
||||
<TerminalView visible={isOpen && activeTab?.mode === 'terminal'} />
|
||||
<TerminalView visible={isOpen && activeTab?.mode === 'terminal'} directory={terminalTab.targetDirectory} />
|
||||
</div>
|
||||
) : null}
|
||||
{hasWalkthroughTab ? (
|
||||
|
||||
Reference in New Issue
Block a user