fix state load failing when no browser is running (#527)

`state load` always fails with "Cannot load state while browser is running" even when no browser is running, making the command completely unusable (#526).

The daemon's auto-launch logic starts a browser before `state_load` gets to handle the command. This adds `state_load` to the exclusion list alongside `launch` and `close`, so `handleStateLoad` can perform its own launch with the state file.
This commit is contained in:
Chris Tate
2026-02-23 00:56:48 -06:00
committed by GitHub
parent 4412899379
commit 467b830974
2 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -373,11 +373,12 @@ export async function startDaemon(options?: {
continue;
}
// Auto-launch if not already launched and this isn't a launch/close command
// Auto-launch if not already launched and this isn't a launch/close/state_load command
if (
!manager.isLaunched() &&
parseResult.command.action !== 'launch' &&
parseResult.command.action !== 'close'
parseResult.command.action !== 'close' &&
parseResult.command.action !== 'state_load'
) {
if (isIOS && manager instanceof IOSManager) {
// Auto-launch iOS Safari