Repository navigation
fix: make native window tab projection non-blocking and add runner WS liveness - #723
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
[High impact] The PR changes tab reads and liveness checks across Host Runner connections. Fix the two window-state bugs before merging. FindingsSummaryThis PR moves native window checks out of tab reads and adds Runner WebSocket liveness.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Tab read] --> B[Check local access and connection]
B --> C[Return cached window state]
B --> D[Start background probe when needed]
D --> E[Save observation]
F[View update] --> E
E --> G[Mark matching tab changed]
G --> H[Announce tab resource change]
Reviews (1) · Last reviewed commit: "fix: make native window tab projection n..." · Reviewed by Greptile |
… await integrations status in tabs test
…ce stale probes by revision
timjang3
added a commit
that referenced
this pull request
Nov 23, 2026
…-smokes One conflict, apps/host/src/server.ts: main moved the person's tab commands into TabService.executeCommand; this branch added tab.group.close beside tab.group.delete in the server's switch. Kept main's shape: tab.group.close is one more case forwarded to executeCommand, which now handles it with closeGroup. Aligned without a textual conflict, apps/host/src/tabs/tab-service.ts: main's tab mutations finish through tabMutationMeta and #applyCatalogMutation (a replay ends no viewers and answers with the current layout); closeGroup now does the same, as #close does. Auto-merged and checked: browser-service.ts keeps E1 (the page ends only on the tab's own not_found) and E2 (the witness is the row the bind wrote) beside main's #723 and #725; tab-store.ts keeps closeGroup and bindPage's row; tab-group.tsx keeps the selected title and the single tab.group.close; tab-closer.tsx is main's; app-shell.tsx keeps the wait for the complete tab list. The passwords package and the journey's policy fixture are unchanged by the merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Root Cause
When an enrolled secondary Mac's runner WebSocket went silently unresponsive (half-open TCP without a close frame), three Host behaviors compounded to stall local browser tab operations (
tab.open,tab.close,resources.detail.get) for >25s until clients aborted with"Couldn't confirm this change.":windowwas the only tab kind performing synchronous remote RPCs during tab projection:NativeTabTargets.windowState()awaited a livewindow.resolveRPC (10stimeout +6sgrace =16s) on every tab projection and everyresources.detail.get(holding a PostgreSQLwithPersonalSyncReadtransaction open the entire time).TabService.#catalog()starvation loop:do { ... } while (current.dirty === null || current.dirty.size)behind onecurrent.pendingpromise starved earlier callers indefinitely whenever a newchanged()arrived mid-pass.attachRunnerSocketandattachRunnerAuxiliarySocketdid not installinstallWebSocketLiveness(socket)(unlike client, personal sync, and display stream sockets), letting half-open dead runners linger for the full 120s stream lease. Additionally,onRunnerAttached/onRunnerDetached/onConnectionsChangeddid not clear cached native window state or invalidate/announce tab resources.Changes
NativeTabTargets.windowState()(apps/host/src/computer-use/native-tab-targets.ts,apps/host/src/tabs/ports.ts):row.windowApp), connectivity, active task users, and active owner views locally without awaiting remotequeryWindowRPCs.resolveWindow(),openOwnerView(), andobserveView().queryWindowprobes per(computerId, windowId)and notifiesonWindowStateChangedonly on state transitions.forgetComputer()to bump computer generation and discard stale/in-flight probes on disconnect/rebind.TabService.#catalog()& surgicalwindowChanged()(apps/host/src/tabs/tab-service.ts):do ... whileloop with versioned single-flight passes (version/projectedVersion) so earlier callers resolve as soon as their version finishes instead of starving behind later invalidations.windowChanged(ownerId, windowId)backed by a per-catalogwindowIdsmap for single-tab invalidation.apps/host/src/runtime/runtime.ts):onWindowStateChanged,computerViews.changed→nativeTabs.observeView, andforgetComputer+tabs.changed()+announceResources("tab")across runner attach/detach, device invalidate/remove, and connection changes.apps/host/src/server.ts):installWebSocketLiveness(socket)on bothattachRunnerSocketandattachRunnerAuxiliarySocket.apps/host/src/computer-use/computer-repl/native-tab-binding.test.tsapps/host/src/tabs/tab-service.test.tsapps/host/src/runtime/tabs.integration.test.tsVerification
pnpm --filter @opensteer/host typecheck— passedpnpm --filter @opensteer/host exec vitest run src/computer-use/computer-repl/native-tab-binding.test.ts src/tabs/tab-service.test.ts src/server/websocket-liveness.test.ts src/computer-apps/computer-app-hub.test.ts src/runtime/runtime-wiring.test.ts— 5 files, 75/75 passedpnpm test:integration:apps/host/src/runtime/idle-runtime.integration.test.ts— 1/1 passedapps/host/src/tabs/tab-authority.integration.test.ts— 6/6 passedapps/host/src/devices/computer-use-journey.integration.test.ts— 59/59 passedapps/host/src/runtime/tabs.integration.test.tslocally was blocked by the unrelatedtests/quarantine.jsonentry expiring at2026-11-23T02:10:51Z.