Skip to content

fix(browser): restart stale ready daemon#1399

Merged
jackwener merged 1 commit intomainfrom
fix/daemon-stale-ready-restart
May 7, 2026
Merged

fix(browser): restart stale ready daemon#1399
jackwener merged 1 commit intomainfrom
fix/daemon-stale-ready-restart

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary\n- check daemon version before the ready fast path in BrowserBridge\n- restart stale daemons even when the extension is already connected\n- add regression coverage for a ready-but-stale daemon\n\n## Test plan\n- npm test -- --run src/browser.test.ts\n- npm run typecheck\n- npm run build\n- git diff --check

@jackwener jackwener merged commit 8d201ae into main May 7, 2026
11 of 13 checks passed
@jackwener
Copy link
Copy Markdown
Owner Author

LGTM. Ran browser.test.ts locally on this branch (20/20 pass). The relocated stale check correctly gates all fast-path branches with !staleDaemonReplaced and falls through to spawn when the port releases. Behavior change for stale + profile-required / profile-disconnected (now restarts instead of throwing) is desirable.

Nice-to-have (non-blocking): the new test only covers the failure path (shutdown returns false → throws). A happy-path test (shutdown succeeds → port released → fresh daemon spawns) would prove the actual user-visible fix end-to-end, but the existing tests already prove the stale check fires before the ready fast-path return, and the spawn path is shared with the existing no-extension+stale branch — regression risk is low.

Residual smoke gap: real-world npm install -g @jackwener/opencli@latest → next opencli grok status auto-replacing the daemon hasn't been validated in a live env. Worth a manual smoke before next release.

@jackwener jackwener deleted the fix/daemon-stale-ready-restart branch May 7, 2026 16:39
@jackwener jackwener mentioned this pull request May 7, 2026
2 tasks
jackwener added a commit that referenced this pull request May 7, 2026
- bump opencli to 1.7.14 (was 1.7.13)
- extension stays at 1.0.6 (no extension changes since v1.7.13)
- finalize CHANGELOG with the three landed PRs:
  * #1399 daemon restart on stale ready state for npm -g upgrade
  * #1400 twitter write-action symmetry (unlike/retweet/unretweet/quote)
  * #1401 agent-friendly adapter help (drop globally-shared option noise)
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