From 0ce3d187d7020b6b657843791129dea7e9d21d35 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 11 Aug 2026 06:02:04 -0700 Subject: [PATCH] =?UTF-8?q?ci(windows):=20GUI=20E2E=20fully=20green=20?= =?UTF-8?q?=E2=80=94=20foreground=20relaunched=20window,=20drop=20temp=20t?= =?UTF-8?q?rigger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The real-user-flow job passed end to end (run 31492613931, 10m57s): website Hermes-Setup.exe installed headed (AHK Install+Launch, real app window), then TWO GUI updates driven by real Settings -> About -> 'Update now' clicks, each carried through the detached hand-off to a relaunched desktop on the target commit. Every assertion green on both legs (marker cleanup, checkout on target sha, working hermes, relaunch). Two finishing touches: * Foreground the relaunched Hermes window before the 99-relaunched proof screenshot — the full-desktop grab is z-order dependent and one run caught VS Code on top. The relaunch ASSERT already passed on the process signal; this is purely to make the proof image show Hermes. * Remove the temporary branch push trigger used for pre-merge validation; back to main + nightly + release tags + manual dispatch only. --- .github/workflows/desktop-windows-e2e.yml | 5 +---- tests/install/windows-desktop-gui-e2e.ps1 | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/desktop-windows-e2e.yml b/.github/workflows/desktop-windows-e2e.yml index 3d3c6a8ada..4d547a4ec9 100644 --- a/.github/workflows/desktop-windows-e2e.yml +++ b/.github/workflows/desktop-windows-e2e.yml @@ -30,10 +30,7 @@ on: # Nightly, off the hour to dodge the top-of-hour runner crunch. - cron: '40 6 * * *' push: - branches: - - main - # TEMPORARY pre-merge validation of the gui-e2e job: remove before merge. - - hermes/hermes-76e68435 + branches: [main] tags: - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9]+.[0-9]+.[0-9]+.[0-9]+' diff --git a/tests/install/windows-desktop-gui-e2e.ps1 b/tests/install/windows-desktop-gui-e2e.ps1 index 8d6f3b54bf..799ba5ea55 100644 --- a/tests/install/windows-desktop-gui-e2e.ps1 +++ b/tests/install/windows-desktop-gui-e2e.ps1 @@ -499,6 +499,22 @@ function Invoke-GuiUpdateLeg([string]$TargetSha, [string]$LegName, [string]$LegS } Assert-True ($null -ne $relaunched) "$LegName -- updater relaunched the desktop app" Start-Sleep -Seconds 12 # let the window paint for the screenshot + # Foreground the relaunched Hermes window so the proof screenshot + # captures IT, not whatever else is on top (the full-desktop grab is + # otherwise at the mercy of z-order -- an earlier run caught VS Code). + try { + $mainProc = Get-Process -Name "Hermes" -ErrorAction SilentlyContinue | + Where-Object { $_.MainWindowHandle -ne 0 } | Select-Object -First 1 + if ($mainProc) { + Add-Type -Namespace HdE2E -Name Win -MemberDefinition @' +[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool SetForegroundWindow(System.IntPtr h); +[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool ShowWindow(System.IntPtr h, int n); +'@ -ErrorAction SilentlyContinue + [HdE2E.Win]::ShowWindow($mainProc.MainWindowHandle, 9) | Out-Null # SW_RESTORE + [HdE2E.Win]::SetForegroundWindow($mainProc.MainWindowHandle) | Out-Null + Start-Sleep -Seconds 2 + } + } catch {} Save-DesktopScreenshot (Join-Path $proof "99-relaunched-desktop.png") } finally {