test: capture nested SSH paired rename input and rendered result

This commit is contained in:
Neil
2026-09-06 16:43:17 -07:00
parent 9bcde0d677
commit c694c3225d
2 changed files with 2 additions and 0 deletions
@@ -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
@@ -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