feat(desktop): simplify quit lifecycle with sync PID check and shutdown dialog

Replace the async daemon status resolution during quit with a synchronous
PID file check, avoiding races when the event loop is shutting down. Show
a blocking dialog so users know the daemon is stopping. Add --kill-timeout
to the CLI stop command for the desktop app to control SIGKILL wait time.
This commit is contained in:
Mohamed Boudra
2026-04-26 08:14:55 +07:00
parent f9fcd6e032
commit b7310b9e90
7 changed files with 137 additions and 74 deletions
@@ -27,6 +27,7 @@ export function createDaemonCommand(): Command {
.option("--home <path>", "Paseo home directory (default: ~/.paseo)")
.option("--timeout <seconds>", "Wait timeout before failing (default: 15)")
.option("--force", "Send SIGKILL if graceful stop times out")
.option("--kill-timeout <seconds>", "Wait after SIGKILL before failing (default: 3)")
.action(withOutput(runStopCommand));
addJsonOption(daemon.command("restart").description("Restart the local daemon"))