Skip to content

Conversation

@graysurf
Copy link
Owner

@graysurf graysurf commented Jan 22, 2026

Fix chrome-rdp wait-for-exit handling

Summary

Ensure the chrome-rdp launcher runs its wait-for-exit helper before deciding to force-kill Chrome, so clean quits don't trigger unnecessary kill paths.

Problem

  • Expected: After requesting Chrome to quit, chrome-rdp should only force-kill if the wait helper reports the process still exiting.
  • Actual: chrome-rdp always takes the force-kill path because the wait helper call is parsed as a missing command.
  • Impact: Unnecessary force-kills even when Chrome exits cleanly, which can interrupt sessions and risk profile lock issues.

Reproduction

  1. On macOS with Google Chrome installed, run chrome-rdp while Chrome is already open.
  2. Accept the prompt to quit Chrome.
  • Expected result: chrome-rdp waits for Chrome to exit and proceeds without force-killing.
  • Actual result: chrome-rdp logs the force-kill warning and kills processes even if Chrome has already exited.

Issues Found

Severity: medium
Confidence: high
Status: fixed

ID Severity Confidence Area Summary Evidence Status
PR-59-BUG-001 medium high scripts/chrome-devtools-rdp.zsh chrome-rdp always triggers force-kill because wait helper is parsed as a missing command scripts/chrome-devtools-rdp.zsh:414 fixed

Fix Approach

  • Add the missing whitespace so the negation operator correctly wraps _wait_for_browser_exit in both chrome-rdp branches.

Testing

  • not run (requires macOS Chrome runtime)

Risk / Notes

  • Low-risk change; only affects the control flow around the wait helper.

- Ensure the wait helper runs before force-kill fallback
@sonarqubecloud
Copy link

@graysurf graysurf merged commit 4aee3e5 into main Jan 22, 2026
5 checks passed
@graysurf graysurf deleted the fix/medium-chrome-rdp-wait-exit branch January 22, 2026 08:15
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.

2 participants