GeezerVison is showing github.com — perf(server): skip the per-listing SSH probe once a host reports Android by only21mil · Pull Request #23748 · pingdotgg/t3code
Conversation
Problem
With an SSH device host that has Android, every device listing ran two SSH commands: a full platform probe, then emulator -list-avds. The probe is the same bootstrap the host already ran when it connected. It starts Node on the host, checks xcrun simctl and adb, and scans the tool directory. Its only use here is whether Android is available, which the host already reported.
Listings happen when the Device panel opens, on its refresh button, and in device setup. On a real SSH host on another Linux machine, each listing took about 600 ms on main. About half of that was the probe.
Change
SshDeviceHost passes androidAvailable to makeDeviceHubOperations, and list reads it on every call. It now answers from the host's last reported platforms when they already say Android is available, and probes only when they don't.
That last report is the host's summary. Main already updates it on connect, on every reconnect, on a tool inspection (inspect), and on each platformAvailability call, such as the check before opening a device.
Caching the connection's answer outright would miss an SDK installed after connecting until the tunnel dropped. That is the case #21502 fixes for the local host. With this change a host that has not reported Android is still probed on every listing, so a later SDK install is found on the next listing, as on main. After that probe reports Android, listings stop probing.
If the SDK is removed while the host stays connected, emulator -list-avds fails. Listing keeps the hub's devices and shows the existing "Could not list Android virtual devices" warning. Opening a device still runs the full availability check first and refreshes the summary, so the next listing probes again.
One production file, 8 lines added and 2 removed. The local and EAS hosts are unchanged.
Scope and approval
No issue. This is a small performance fix in one file: it drops a repeated SSH round trip whose answer the server already has, and it keeps main's behavior for an SDK installed later. The devices a listing returns are the same as before, so there are no app screenshots. The Device panel gets its list sooner. One side effect goes away: on main, each listing's probe also refreshed the host's platform availability that the panel shows. Once a host reports Android, that now refreshes on reconnect, on "Check versions" in Settings, and before a device opens, not on every listing.
Verification
Branch on main 05696c636e. The tests and checks ran on macOS with Node 26.12.1:
cd apps/server && vp test run src/device/SshDeviceHost.test.ts. The new case connects a host that reports no Android, then has the host report Android. The first listing must still probe, and a second listing must run only emulator -list-avds. Both listings must return the same AVD.
- The whole
src/device/ suite: 15 files, 148 passed. tsc-rs --noEmit in apps/server: exit 0. vp fmt --check and vp lint --report-unused-disable-directives on both changed files: clean. After merging current main 5ffe045931, the focused test and lint pass again.
With main's SshDeviceHost.ts the second listing probes again:
![Vitest with main's SshDeviceHost.ts: the new case fails with expected [ 'probe', '' ] to deeply equal [ '' ]](/api/image?u=https%3A%2F%2Fgist.githubusercontent.com%2Fonly21mil%2F98876d1f48f0c560cdbb0448682d0ba9%2Fraw%2Fc6d5cef5a48fdfd4e8c0e7208db8760237c9fd07%2Ftest-base.png)
On this branch both cases pass:

Real host: from Linux with Node 24.22.0, I ran the real SshDeviceHost from apps/server against an SSH device host on another Linux machine that has the Android SDK. This used real ssh processes and the host's real device hub. A wrapper around the Node process spawner recorded which SSH command each spawn was, then passed the same command and stdin through unchanged. After connecting, I timed five devices.list calls on main's file and on this branch.

Both runs connected with the same commands (probe, start, tunnel) and stopped with stop. The host had no AVDs, so both returned an empty Android list.
Not checked:
- macOS SSH hosts and an iOS-only host. An iOS-only host never reports Android, so it still probes on every listing, as on main.
- Installing or removing an SDK while connected, on a real host. The unit test covers the install path.
- The full app over WebSocket and a packaged desktop build. The real-host run called the host's
devices.list directly.
- Windows.
Prior PRs: #10856 and #21835 by @juliusmarminge added SSH device hosts and the androidAvailable hook that list reads. #21502 by @flamboh fixes finding an SDK installed after startup on the local host. Its concern is why this change keeps probing until Android is reported.
Production fix, tests, PR description and images written with Claude Opus 5.5 in T3 Code Nightly.
🤖 Generated with Claude Opus 5.5 in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Device listing asked an SSH host for its platforms on every call, an extra
SSH round trip each time. Answer from the last reported platforms when they
already include Android, and keep probing until they do so an SDK installed
after connecting is still found.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Oct 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 220eb73 and 9505537.
Files selected for processing: 2
-
apps/server/src/device/SshDeviceHost.test.ts
apps/server/src/device/SshDeviceHost.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Walkthrough
-
Android availability checks now use cached positive results and probe when Android is not available in the cached platform summary. New tests cover the probe sequence during SSH device listing and inspection.
Changes: Android availability probing
| Layer / File(s) |
Summary |
Availability checks and listing tests apps/server/src/device/SshDeviceHost.ts, apps/server/src/device/SshDeviceHost.test.ts |
androidAvailable returns true when the cached platform summary reports Android available. Otherwise, it probes Android availability. Tests cover probing while Android is unavailable, the first listing after Android becomes available, later listings, availability checks, and inspection. |
Priority: Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related PRs
- pingdotgg/t3code#24566: Changes how SSH platform probes detect a runnable Android SDK, which can affect the availability result used by Android listing behavior.
Suggested labels: size:S
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to 95055
-
The change is ready to merge after normal checks; no actionable risk remains in the supplied evidence.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly summarizes the main change: skipping repeated SSH probes after Android availability is reported. |
| Description check |
 |
The description includes all required sections and provides clear problem context, implementation details, scope justification, focused verification results, limitations, and agent attribution. |
| 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. |
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — The production change alters existing SSH-device listings by automatically suppressing the remote platform probe after Android is reported, which can defer platform-state refreshes and SDK-removal detection. The behavior is localized and tested, but the automatic gate over substantial remote work warrants human review.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
thanks @only21mil. the positive-only cache keeps late sdk discovery working without another cache or expiry mechanism. i kept your commits and production behavior, merged current main, shortened the explanatory comment, and extended your existing test to cover repeated negative probes, explicit availability refresh invalidating a positive report, and inspection restoring it.
verification at 95055375a01ae30f665be27cfae411f43e87386a:
- reproduced the regression with main's production file: the second listing issued an extra
probe.
- blacksmith
vp run check:changed 220eb73524ca7882d53b6a12c824ccbcd97ad279 passed format, lint, knip, graphql, server/scripts typecheck, and both focused tests.
- blacksmith
cd apps/server && vp test run src/device/ passed all 127 tests in 15 files.
unverified this run: real android ssh hardware, sdk install/removal on a real host, macos/windows, the app over websocket, and timing. no new latency claim. no visual change, so no ui captures. ci and final review are being checked on this head.
the existing tradeoff remains explicit for maria's review: positive platform reports refresh on reconnect, inspection, or a platform availability check rather than every listing. emulator listing failures still preserve hub devices and surface the existing warning.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
maria-rcks
commented
Oct 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
verified as-is at 95055375a01ae30f665be27cfae411f43e87386a. no source changes or pushes.
ran vp i and background vp run dev on github/main (0deb383709) and then the exact pr head, with one dev server at a time and isolated state. used the repo's playwright and /usr/bin/google-chrome, an app-created project/thread, real codex gpt-6.1-sol turns, and a real ssh device host on this vm's separate port 2222. the android sdk and PR23748_Pixel avd are real; no mocked commands or provider responses.
clicked device > refresh devices three times on each revision. observed remote subprocesses with strace and waited for each websocket device.list success:
platform probes emulator -list-avds ssh avd
main refreshes 1, 2, 3 1 each 1 each present
pr refreshes 1, 2, 3 0 each 1 each present
nearby behavior through the running server's authenticated websocket api:
device.list {inspectOnly:true} still performed a remote probe and refreshed availability.
- temporarily removed the real
adb executables and inspected: android became unavailable. two subsequent listings each probed again.
- restored
adb without reconnecting ssh: the next listing probed and rediscovered the avd; the following listing skipped the probe. all executable paths were restored.
- local avd discovery also worked on the pr.
in a fresh app thread after enabling agent device access, codex called device_list twice for the ssh host. both actual mcp calls returned PR23748_Pixel, stopped, host ready. the final reply was DEVICE_LIST_OK. the provider recovered from retries and completed in 3m43s. an older session created before enabling access retained its disabled capability, as expected for that setting.
blacksmith passed both focused SshDeviceHost tests and vp run check:changed 220eb73524ca7882d53b6a12c824ccbcd97ad279: format, lint, knip, graphql, affected typechecks, and focused tests. git.cafe reports 28 successful checks, none pending or failing.
command transcript and scope


Not verified
native desktop/mobile clients, macos/windows hosts, a physically separate ssh machine, relay/tunnel or reconnect recovery, device boot/stream/control, and sdk-removal failures before explicit inspection. this proves command elimination through the app, not a measured latency improvement. uploaded video playback and seeking were checked. git.cafe currently renders these external media embeds as links; both uploaded files were opened and inspected directly.
|
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:XS
0-9 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.
|