From 0c02dec524783a20e82043f7f040c72c76004cd2 Mon Sep 17 00:00:00 2001 From: Mahima Shanware Date: Wed, 6 May 2026 05:00:44 +0000 Subject: [PATCH] feat: implement automatic SIGWINCH repaint in User Simulator to resolve TTY rendering lags --- packages/cli/src/services/UserSimulator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/services/UserSimulator.ts b/packages/cli/src/services/UserSimulator.ts index 42f58a7184..c9ceb5e5a8 100644 --- a/packages/cli/src/services/UserSimulator.ts +++ b/packages/cli/src/services/UserSimulator.ts @@ -121,7 +121,9 @@ export class UserSimulator { // Stabilization delay: Wait for the terminal UI to finish rendering // (e.g. ANSI clear/repaint sequences) before looking at the screen. // Increased to 1s to handle high-latency PTYs in Docker. - await new Promise((resolve) => setTimeout(resolve, 2000)); + // Force a terminal repaint by sending SIGWINCH to the current process. + process.kill(process.pid, "SIGWINCH"); + await new Promise((resolve) => setTimeout(resolve, 1000)); const screen = this.getScreen(); if (!screen) return;