diff --git a/Sources/AppDelegate.swift b/Sources/AppDelegate.swift index 0aa385ef..e17b0209 100644 --- a/Sources/AppDelegate.swift +++ b/Sources/AppDelegate.swift @@ -2390,6 +2390,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent } self.moveUITestWindowToTargetDisplayIfNeeded() NSRunningApplication.current.activate(options: [.activateAllWindows, .activateIgnoringOtherApps]) + // On headless CI runners, activate() silently fails (no GUI session). + // Force windows visible so the terminal surface starts rendering. + for window in NSApp.windows { + window.orderFrontRegardless() + } self.writeUITestDiagnosticsIfNeeded(stage: "afterForceWindow") } if env["CMUX_UI_TEST_BROWSER_IMPORT_HINT_OPEN_BLANK_BROWSER"] == "1" {