Skip to content

fix(windows): hide console windows for media and paste helpers#1232

Open
stantheman0128 wants to merge 1 commit into
OpenWhispr:mainfrom
stantheman0128:fix/win-media-player-hide
Open

fix(windows): hide console windows for media and paste helpers#1232
stantheman0128 wants to merge 1 commit into
OpenWhispr:mainfrom
stantheman0128:fix/win-media-player-hide

Conversation

@stantheman0128

Copy link
Copy Markdown

Summary

On Windows, media pause/resume and paste fallbacks spawn nircmd / PowerShell without windowsHide. That flashes console windows during dictation. runCommand in process.js had the same gap.

This PR passes windowsHide: true for those helper spawns and prefers powershell.exe for media key / GSMTC paths.

AI assistance

Assisted by Cursor / Grok. Human author: Stan Shih (stantheman0128). I reviewed the diff and verification output.

Verification / Evidence

npm run typecheck
# pass

npm run lint
# pass

# Live Win11 smoke:
node -e "const {spawnSync}=require('child_process'); const r=spawnSync('powershell.exe',['-NoProfile','-NonInteractive','-Command','Write-Output HIDE_OK'],{encoding:'utf8',windowsHide:true}); console.log(r.status, r.stdout.trim())"
# 0 HIDE_OK

Test plan

  • typecheck + lint
  • Live powershell.exe spawn with windowsHide
  • Manual: pause media during dictation and confirm no console flash; paste fallback still works

nircmd/powershell spawns during media pause and paste fallback flashed
console windows on Windows. Pass windowsHide and prefer powershell.exe.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant