03c638b2e1
The traces killed the previous discriminator: OnActivate fires constantly (WebView2 focus churn) and even right after the user clicks Maximize, so "resize followed by activate" wrongly classified a user maximise as a restore and dropped the intent. Windows itself knows: WPF_RESTORETOMAXIMIZED (or showCmd still SW_SHOWMINIMIZED) marks the resize of a window on its way back from minimised. That resize is now never recorded as intent, and triggers the re-maximise directly — no dependency on activate ordering. Activate is demoted to a guarded safety net. Log line now dumps zoomed/showCmd/flags so the next run confirms the flag is actually set on this machine. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>