Found while fixing #5919 (PR #5922). PinCmd::execute calls window_control::toggle_pin() (crates/tui/src/tui/window_control.rs), which resolves the host terminal window (GetConsoleWindow, else GetForegroundWindow, else an EnumWindows/toolhelp walk of the parent chain) and drives it with synchronous SetWindowPos / ShowWindow. That HWND belongs to another process, so those calls are delivered to its window thread and block until it pumps messages. On a headless CI window station nothing pumps, which is how two dispatch-everything tests hung for 600 s; on a real desktop a busy or hung terminal host would stall the TUI's own thread the same way.
#5922 only skips /pin in the Windows dispatch-smoke tests and adds a per-command watchdog. The product fix is here:
- Use
SWP_ASYNCWINDOWPOS and ShowWindowAsync (or issue the calls from a dedicated thread with a bounded wait) so the TUI thread never blocks on another process's message pump.
- Keep the existing apply-verify-retry logic truthful under the async calls: verify the resulting window state after a bounded wait and report
pinned/not pinned from what was observed, never from the request.
- Re-enable
/pin in the Windows dispatch-smoke tests once the call cannot block.
Only checkable on windows-latest CI or a Windows host.
Found while fixing #5919 (PR #5922).
PinCmd::executecallswindow_control::toggle_pin()(crates/tui/src/tui/window_control.rs), which resolves the host terminal window (GetConsoleWindow, elseGetForegroundWindow, else anEnumWindows/toolhelp walk of the parent chain) and drives it with synchronousSetWindowPos/ShowWindow. That HWND belongs to another process, so those calls are delivered to its window thread and block until it pumps messages. On a headless CI window station nothing pumps, which is how two dispatch-everything tests hung for 600 s; on a real desktop a busy or hung terminal host would stall the TUI's own thread the same way.#5922 only skips
/pinin the Windows dispatch-smoke tests and adds a per-command watchdog. The product fix is here:SWP_ASYNCWINDOWPOSandShowWindowAsync(or issue the calls from a dedicated thread with a bounded wait) so the TUI thread never blocks on another process's message pump.pinned/not pinnedfrom what was observed, never from the request./pinin the Windows dispatch-smoke tests once the call cannot block.Only checkable on windows-latest CI or a Windows host.