Repository navigation
v1.0.4 — fix Windows minimize/resize (#153)
Fixes
#153 — window minimize (and window resize) silently did nothing on Windows.
Root cause: the PowerShell those commands run is built as a single concatenated line and executed via powershell.exe -Command <string>, but it opened the Add-Type -MemberDefinition block with a here-string (@"…"@). A here-string header must be the last token on its line — on a single line PowerShell raises "No characters are allowed after a here-string header before the end of the line" and the entire script fails to parse, so the call produced no output and returned false. Reported for UWP apps (Calculator/Settings) but it affected every window.
Fix:
- Switched to a single-quoted
-MemberDefinition '…'(C# double-quotes are literal inside it; Node handles wire-escaping). Applied tosetWindowState(minimize/maximize/restore/close) andsetWindowBounds(resize). - Minimize now also drives the transition through the UIA
WindowPattern(SetWindowVisualState) with a title-first window lookup — the supported cross-process path for UWP / ApplicationFrameHost-hosted windows whose Win32ShowWindow(SW_MINIMIZE)no-ops — falling back toShowWindowAsyncfor plain Win32. - Added a static guard test so the single-line here-string can't return.
Verified live on Calculator: minimize / restore / maximize / restore all succeed. Full suite green (724 passed).
Security
- Pinned
brace-expansion→ 5.0.6 (GHSA-jxxr-4gwj-5jf2) via overrides.
npm i -g clawdcursor@1.0.4