mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 08:03:28 +00:00
fix(codex): avoid detached restart size wait
This commit is contained in:
@@ -103,8 +103,8 @@ describe('codex detached pane restart executor', () => {
|
||||
|
||||
expect(window.api.pty.spawn).toHaveBeenCalledExactlyOnceWith(
|
||||
expect.objectContaining({
|
||||
cols: 120,
|
||||
rows: 30,
|
||||
cols: 80,
|
||||
rows: 24,
|
||||
cwd: '/Users/dev/code/orca',
|
||||
command: 'codex',
|
||||
startupCommandDelivery: 'shell-ready',
|
||||
@@ -115,6 +115,7 @@ describe('codex detached pane restart executor', () => {
|
||||
initiallyHidden: true
|
||||
})
|
||||
)
|
||||
expect(window.api.pty.getSize).not.toHaveBeenCalled()
|
||||
expect(vi.mocked(window.api.pty.spawn).mock.calls[0]?.[0]?.env).toEqual(
|
||||
expect.objectContaining({
|
||||
ORCA_PANE_KEY: `tab-1:${LEAF_ID}`,
|
||||
|
||||
@@ -171,7 +171,6 @@ async function executeDetachedCodexPaneRestart(
|
||||
}
|
||||
const { worktreeId, tab, leafId } = located
|
||||
|
||||
const size = await window.api.pty.getSize(ptyId).catch(() => null)
|
||||
const workspacePath = getWorkspacePath(state, worktreeId)
|
||||
const cwd = tab.startupCwd ?? workspacePath ?? undefined
|
||||
const capabilities = hasCachedWindowsTerminalCapabilities()
|
||||
@@ -194,9 +193,10 @@ async function executeDetachedCodexPaneRestart(
|
||||
return
|
||||
}
|
||||
|
||||
// Hidden replacements converge on mount; provider sizing must not delay ownership transfer.
|
||||
const spawned = await window.api.pty.spawn({
|
||||
cols: size?.cols ?? 80,
|
||||
rows: size?.rows ?? 24,
|
||||
cols: 80,
|
||||
rows: 24,
|
||||
...(cwd ? { cwd } : {}),
|
||||
cwdFallback: 'worktree',
|
||||
env: buildPaneIdentityEnv(state, worktreeId, tab.id, leafId),
|
||||
|
||||
Reference in New Issue
Block a user