diff --git a/src/renderer/src/components/terminal-pane/pty-connection/pty-input-forward.ts b/src/renderer/src/components/terminal-pane/pty-connection/pty-input-forward.ts index 1c53e318dab..4d0fb63c821 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection/pty-input-forward.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection/pty-input-forward.ts @@ -25,6 +25,7 @@ import type { ConnectPanePtySession } from './connect-pane-pty-session' export function installPtyInputForward(session: ConnectPanePtySession): void { session.forwardPtyInput = (data: string): void => { + console.info('[nested-input-receipt]', JSON.stringify({ data: data.slice(0, 600), tabId: session.deps.tabId, ptyId: session.transport.getPtyId(), replaying: isPaneReplaying(session.deps.replayingPanesRef, session.pane.id), locked: Boolean(session.transport.getPtyId() && isPtyLocked(session.transport.getPtyId()!)), activeTabId: useAppStore.getState().activeTabId, focusedOnPane: session.pane.terminal.textarea === document.activeElement })) // Why: xterm auto-replies to embedded query sequences (DA1, DECRQM, // OSC 10/11, focus, CPR) via onData. When we replay recorded PTY bytes // into xterm for scrollback/cold-restore/snapshot, those queries would diff --git a/tests/e2e/helpers/nested-runtime-ssh-terminal-creation.ts b/tests/e2e/helpers/nested-runtime-ssh-terminal-creation.ts index cd3fe54c68c..f7321918a6d 100644 --- a/tests/e2e/helpers/nested-runtime-ssh-terminal-creation.ts +++ b/tests/e2e/helpers/nested-runtime-ssh-terminal-creation.ts @@ -7,6 +7,7 @@ export async function assertPairedTerminalCreation( client: PairedElectronClient, marker: string ): Promise<{ ptyId: string; tabId: string }> { + client.page.on('console', (message) => { if (message.text().startsWith('[nested-input-')) console.log(message.text()) }) const before = await client.page.evaluate(() => { const state = window.__store?.getState() const worktreeId = state?.activeWorktreeId