fix: harden restart_claude_desktop — Linux refusal, macOS quit-wait, Windows MSIX guard (#33) #43
Reference in New Issue
Block a user
Delete Branch "fix/33-restart-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #33.
restart_claude_desktop()now refuses outright. The old path ranpkill claude(substring match — could kill running Claude Code CLI sessions) and then spawned the CLI detached, which is not a desktop app. Newrestart_supported()gates the GUI button so it never appears on Linux.pkill -x Claude, pollpgrepfor actual process exit (≤5 s) beforeopen -a Claude—openagainst a dying instance can just re-activate it and the config is only re-read on a true relaunch. Because this can now block, the GUI runs it via a newRestartWorkerQThread (button shows "Restarting…").Claude.lnkexists beforetaskkill— an MSIX/Store install (which BCC now detects, #29) has no shortcut there, and the old order killed Claude with no way to relaunch it.Existing restart tests updated to the new semantics; 6 new tests (platform gating, refuse-before-kill, quit-wait timeout and success paths). 172 tests pass; ruff clean.
🤖 Generated with Claude Code