From 406509aeb8a33ec0227a9210ff30824940f290ea Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:50:43 +0900 Subject: [PATCH] fix(tui): align CI with supported platforms Wait for terminal setup before asserting signal cleanup on slower Intel runners. Do not advertise a Windows ARM64 sidecar while Bun lacks the FFI support OpenTUI requires there. Co-authored-by: Bingxi Zhao <150592536+pancacake@users.noreply.github.com> --- .github/workflows/ci.yml | 2 -- .github/workflows/tui-release.yml | 2 -- tui/src/app.test.ts | 19 +++++++++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e79c77009..1098845f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,8 +197,6 @@ jobs: os: windows-latest - name: Terminal UI (Linux arm64) os: ubuntu-24.04-arm - - name: Terminal UI (Windows arm64) - os: windows-11-arm steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/tui-release.yml b/.github/workflows/tui-release.yml index 72b0d5a15..6c13c3927 100644 --- a/.github/workflows/tui-release.yml +++ b/.github/workflows/tui-release.yml @@ -26,8 +26,6 @@ jobs: target: linux-arm64 - os: windows-latest target: win32-x64 - - os: windows-11-arm - target: win32-arm64 steps: - uses: actions/checkout@v4 diff --git a/tui/src/app.test.ts b/tui/src/app.test.ts index 67c6c1712..1d5b28f2f 100644 --- a/tui/src/app.test.ts +++ b/tui/src/app.test.ts @@ -641,10 +641,25 @@ if (process.platform !== "win32") { stdout: "pipe", stderr: "pipe", }) - await Bun.sleep(250) + const decoder = new TextDecoder() + let output = "" + const collectOutput = (async () => { + const reader = child.stdout.getReader() + while (true) { + const { done, value } = await reader.read() + if (done) break + output += decoder.decode(value, { stream: true }) + } + output += decoder.decode() + })() + + // Slow Intel runners can spend more than 250 ms importing OpenTUI. Wait + // for terminal setup, which happens after the signal handlers are + // registered, before exercising shutdown. + await waitUntil(() => output.includes("\x1b[?1049h"), 5_000) child.kill("SIGTERM") const exitCode = await child.exited - const output = await new Response(child.stdout).text() + await collectOutput const error = await new Response(child.stderr).text() expect(exitCode).toBe(0)