GeezerVison is showing github.com — fix(server): hide Android emulator consoles on Windows by gsrajeni · Pull Request #41971 · pingdotgg/t3code
Conversation
Problem
On Windows, starting an Android emulator from the Device panel opens a separate qemu/netsimd console. Closing that console terminates the emulator and disconnects the Device panel.
Change
Start the local Windows device hub with a Node preload that overrides only emulator.exe child launches to use detached: false and windowsHide: true. Synchronize the built-in ESM exports before the hub imports its launcher. Other child processes, emulator arguments, and macOS/Linux hub startup are preserved.
The launch happens inside the separately installed expo-device-hub dependency, whose pinned 0.26.1 bundle still uses detached: true without hiding the console. This keeps the workaround at T3's local hub boundary without modifying installed dependency files.
Scope
A focused fix for a reproducible Windows emulator bug encountered during normal use. No separate issue is needed for this small fix. Installing FFmpeg on the reporting machine resolved a separate missing system prerequisite and is not part of this PR.
Verification
- On the reporting Windows host, applying these spawn options to the installed hub and restarting it booted Pixel_10_API_37 without a Windows Terminal process. The Device panel connected and returned a screenshot of the emulator home screen.
- Both new regression tests pass. The subprocess fixture exercises the actual Node preload and named ESM
spawn import, covering an SDK path with spaces, case-insensitive executable matching, both spawn overloads, preserved child options, unchanged FFmpeg launches, and CLI argument forwarding. Non-Windows startup arguments remain unchanged.
vp run check:changed origin/main --concurrency 1: formatting, lint, both knip steps, GraphQL validation, and affected typechecks passed. The test step reported 27 passed and 7 failed. All 7 failures also reproduce with unchanged LocalDeviceHost.ts from origin/main on this Windows host (23 passed, 7 failed): five POSIX path assertions, one later-SDK environment assertion, and one Xcode availability assertion.
git diff --check passed. No frontend rendering changes.
Implemented with GPT-6.1 Sol through the Codex harness in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The device hub now uses platform-specific Node arguments. On Windows, a preload sets detached: false and windowsHide: true for matching emulator.exe spawns. A subprocess test checks these options and confirms other spawn data remains unchanged.
Changes: Windows emulator spawn options
| Layer / File(s) |
Summary |
Preload and hub launch apps/server/src/device/deviceHubNodeArgs.ts, apps/server/src/device/LocalDeviceHost.ts, apps/server/src/device/deviceHubNodeArgs.test.ts |
The helper adds a Windows preload that changes options for matching emulator spawns. LocalDeviceHost uses the helper to build the hub’s Node arguments. The subprocess test checks spawn options, preservation of other spawn data, and forwarded arguments. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
Suggested labels: bugfix
Suggested reviewers: juliusmarminge, macroscopeapp
Merge Risk: Minimal · up to 87997
-
On Windows, this change keeps the Android emulator console from appearing and keeps the Device panel connected. Other platforms are unaffected, and no merge-blocking risk was identified.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: hiding Android emulator consoles on Windows. It follows the conventional commit form used in the repository template. The changeset adds a Windows-only Node preload th… |
| Description check |
 |
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the Windows qemu/netsimd console behavior and the disconnect. The Change section exp… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: hiding Android emulator consoles on Windows. It follows the conventional commit form used in the repository template. The changeset adds a Windows-only Node preload that forces detached false and windowsHide true for emulator.exe spawns, which matches the title.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the Windows qemu/netsimd console behavior and the disconnect. The Change section explains the preload and its limits. The Scope section says no issue is needed for this small fix and names the separate FFmpeg prerequisite. The Verification section gives manual results and test counts, and it reports the 7 failing tests with their causes on origin/main. The template's agent-attribution line is present. The description does not link an issue, and the Scope section gives a reason for that. The description is mostly complete.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 4d461ad and 8799721.
Files selected for processing: 1
-
apps/server/src/device/deviceHubNodeArgs.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Windows Server 2025/WHPX; Android 15 Pixel_Test; Chromium 1280×800/light; native desktop 1920×1080. Both commits used fresh app data and the same restored, initialized, stopped AVD.
Steps: seeded thread → Device panel → Start Pixel_Test → wait for boot and reconnect video in Flat view → post WM_CLOSE to any visible qemu console → observe emulator and panel. Head additionally opened Gallery through streamed touch and resumed video after a browser reload.
Base: one qemu console closed; emulator.exe, qemu and netsimd disappeared, adb became empty, and video disconnected. Head: zero qemu consoles found; all three processes remained alive, sys.boot_completed was 1, and the interactive stream survived. Browser reload retained the same emulator process IDs and resumed video.

Driver, seed/reset/capture scripts, timestamps and process/adb snapshots.
Both runs showed Android ANR dialogs on this nested VM; these remain visible in the full recordings. Head took longer to settle, so this establishes console hiding and surviving connectivity, not equivalent boot performance. Brief PowerShell flashes in the desktop recording come from the screenshot helper.
Not shown:
- Boot latency and Android responsiveness are not established: head settled later, and Android System UI/Quickstep ANRs occurred on both commits. The captures establish a surviving interactive head stream, but do not attribute the performance difference to the fix or the nested VM.
- Emulator lifetime across device-hub or server shutdown/restart was not tested.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|