Repository navigation
perf(ssh): a parked web-mirror reveal reads its pane alongside the activation - #29472
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9 tasks done
This was referenced Oct 16, 2026
This was referenced Oct 16, 2026
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.
ELI5
When you switch back to a remote terminal that Orca had put to sleep, Orca asks the host two questions before it reconnects: "wake this tab" and "which terminal is in this pane?" It used to wait for the first answer before asking the second. The second question doesn't need the first answer, so now both go out together. That saves one network round trip on every such reveal.
What Changed
terminal.resolvePanewas sent only aftersession.tabs.activateanswered. Subscribe waited behind both, one after the other. In the repro trace at 150 ms latency, this serial step cost about 220 ms.resolvePanegoes out together with the activation, and the reveal awaits both before subscribing. On the host,resolvePaneis a synchronous lookup keyed only by the pane, with no side effects, so it doesn't depend on the activation.method_not_foundstill turns the lookup off. An answer that has no pane now counts as unresolved instead of throwing.The change is client-only, with no wire change, so it's safe with older hosts.
Why
This is the smallest change that removes the serial round trip. The alternatives were to fold
resolvePaneinto the activation response, or to drop it. Both would need a host change and capability negotiation, and they'd lose the metadata check thatresolvePaneprovides. Reading early and re-reading only on a mismatch keeps the result identical to the old order in every case where the early answer could be stale.Linked Issue
N/A. This came from the parked-reveal perf trace (follow-up to #29269 / #29344).
Visual Proof
N/A. Nothing changes visually; the reveal starts one round trip sooner.
Testing
New
remote-runtime-pty-transport-mirror-resolve-overlap.test.tswith 3 cases, all failing without the change:56 remote transport test files (440 tests), run single-worker.
pnpm tc:webandcheck:code-quality:changedpass.Codex review (gpt-6.1-sol, high). Round 1 found the incarnation race, now fixed and covered by a test. Round 2 was clean.
Real-host A/B vs main a8f2c65 (same freshly built orcad): 150 ms netem — Subscribe 320–351 ms vs 371–509; settled 553–607 vs 585–751 (seq), 493–547 vs 599–681 (TUI). openclaw — Subscribe 49–73 vs 59–98; settled 81–167 vs 100–212. resolvePane fired once per reveal on all 12 reveals.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
SSH and remote: client-side ordering only, with no change to what the host publishes. Cross-platform: no platform-specific code.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)