Skip to content

fix: allow browser:false commands to run without page after lazy-load#347

Merged
jackwener merged 1 commit intomainfrom
fix/ci-e2e-browser-false
Mar 24, 2026
Merged

fix: allow browser:false commands to run without page after lazy-load#347
jackwener merged 1 commit intomainfrom
fix/ci-e2e-browser-false

Conversation

@jackwener
Copy link
Owner

Summary

  • PR fix: resolve 6 critical bugs from deep code review (round 2) #337's C2 fix added an unconditional null-page guard in execution.ts after lazy-loading, breaking all browser: false commands (bloomberg, apple-podcasts, google, yollomi, weread, xiaoyuzhou) — 23 E2E failures
  • Fix: only throw when updated.browser !== false
  • Also handles apple-podcasts top timeout flake (empty stderr on killed process)

Changes

  • src/execution.ts: conditional browser check before throwing
  • tests/e2e/public-commands.test.ts: timeout-aware guard for apple-podcasts

Test plan

  • npm run typecheck — clean
  • npm test — 223 tests pass
  • Manual: bloomberg, yollomi, apple-podcasts commands work locally
  • Browser-requiring commands still get the guard

🤖 Generated with Claude Code

The C2 fix in PR #337 added a null-page guard after lazy-loading TS
modules, but it threw unconditionally — breaking all browser:false
commands (bloomberg, apple-podcasts, google, yollomi, etc.) that
use func() with a null page. Guard now checks updated.browser !== false.

Also fixes apple-podcasts top E2E flake: when the command times out on
CI, stderr is empty and the guard didn't catch it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jackwener jackwener merged commit fb562fa into main Mar 24, 2026
12 of 13 checks passed
@jackwener jackwener deleted the fix/ci-e2e-browser-false branch March 24, 2026 07:08
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