Skip to content

fix(cli): hide detached Windows spawns - #3478

Closed
kvnloo wants to merge 1 commit into
heygen-com:mainfrom
kvnloo:wt/t_c1baf6e5
Closed

kvnloo wants to merge 1 commit into
heygen-com:mainfrom
kvnloo:wt/t_c1baf6e5

Conversation

@kvnloo

@kvnloo kvnloo commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • pass windowsHide: true to telemetry exit flush, custom browser launch, and background preview detached spawns
  • cover each real spawn path with a behavior regression test
  • match the existing auto-update spawn behavior

Fixes #3476

Verification

  • bun run --filter @hyperframes/cli test -- src/telemetry/client.test.ts src/utils/openBrowser.test.ts src/commands/previewLifecycle.test.ts (61 passed)
  • bun run --filter @hyperframes/cli typecheck
  • bun run lint
  • bun run format:check
  • bun run build
  • git diff --check
  • sabotage check: removing windowsHide from openBrowser made its new regression test fail

The full bun run test is not clean in this environment. Studio has 97 failures caused primarily by unavailable localStorage, and the full CLI run has 3 unrelated skillsManifest.test.ts lock-pruning failures. The focused tests for all changed paths pass.

Windows real-device validation has not been performed.

Scope

This does not change ffmpeg handling from #3379 or chrome-headless-shell handling from #3430. It does not add a shared spawn helper or lint rule.

AI assistance

Implemented and verified with Hermes Agent using Codex. I reviewed the resulting diff and test evidence.

@Bortlesboat Bortlesboat left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked 89205665b1a70cea061c43705ffb44b234655ab1 on native Windows with Node 24.14.0 and Bun 1.3.14. All 61 focused tests pass: 55 across previewLifecycle.test.ts and openBrowser.test.ts, plus six in telemetry/client.test.ts. Oxlint and oxfmt also pass for all six changed files.

For a fresh checkout, the telemetry suite needs the parser/lint packages and core's generated runtime modules first. After building @hyperframes/parsers, @hyperframes/lint, and @hyperframes/core, it collects and passes without source edits. The initial missing-module errors were checkout preparation, not failures of this patch.

I checked all three modified spawn paths: the added option retains their detached behavior, stdio routing, and existing unref() calls, and the preview injection type includes the new option. No issue found within this change.

This supplies Windows test/build evidence, but the focused tests mock process spawning. Actual visible console behavior when launching a real preview or browser remains unverified; I did not repeat the full monorepo suite.

@miga-heygen

Copy link
Copy Markdown
Contributor

Closing — stale draft PR. Please reopen if still relevant.

@miga-heygen miga-heygen closed this Sep 8, 2026
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.

[Windows] Three detached: true spawns missing windowsHide — telemetry flushSync opens a console window on nearly every CLI exit

3 participants