Repository navigation
Split remote terminal multiplexer responsibilities - #17248
Conversation
Greptile SummaryThe PR decomposes the remote terminal multiplexer into focused modules while retaining a facade for existing consumers.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/renderer/src/runtime/remote-runtime-terminal-multiplexer.ts | Replaces the monolithic implementation with a compatibility facade, registry, exports, and test helpers. |
| src/renderer/src/runtime/remote-runtime-terminal-multiplexer-base.ts | Owns the shared stream and connection state plus transport connection, closure, and frame-sending lifecycle. |
| src/renderer/src/runtime/remote-runtime-terminal-multiplexer-implementation.ts | Defines terminal stream creation, capabilities, public stream operations, and subscription setup. |
| src/renderer/src/runtime/remote-runtime-terminal-binary-controller.ts | Handles binary frame validation, output delivery, sequence accounting, and deferred credits. |
| src/renderer/src/runtime/remote-runtime-terminal-binary-snapshots.ts | Handles snapshot assembly, application, request completion, recovery transitions, and stream errors. |
| src/renderer/src/runtime/remote-runtime-terminal-snapshot-controller.ts | Encapsulates snapshot requests, output-gap detection, resynchronization retries, and watchdog recovery. |
| src/renderer/src/runtime/remote-runtime-terminal-flow-controller.ts | Encapsulates input, pause negotiation, ACK batching, cumulative source acknowledgements, and E2E accessors. |
| src/renderer/src/runtime/remote-runtime-terminal-response-controller.ts | Dispatches control responses and stream lifecycle events. |
| src/renderer/src/runtime/remote-runtime-terminal-multiplexer-types.ts | Centralizes public contracts and shared mutable stream-state types. |
| src/renderer/src/runtime/remote-runtime-terminal-snapshot-state.ts | Centralizes snapshot constants, parsing, classification, and cleanup helpers. |
| src/renderer/src/runtime/remote-runtime-terminal-e2e-control.ts | Isolates E2E-only ACK gating, output dropping, counters, and test control APIs. |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
RemoteRuntimeTerminalMultiplexerBase <|-- RemoteRuntimeTerminalResponseController
RemoteRuntimeTerminalResponseController <|-- RemoteRuntimeTerminalSnapshotController
RemoteRuntimeTerminalSnapshotController <|-- RemoteRuntimeTerminalFlowController
RemoteRuntimeTerminalFlowController <|-- RemoteRuntimeTerminalBinarySnapshots
RemoteRuntimeTerminalBinarySnapshots <|-- RemoteRuntimeTerminalBinaryController
RemoteRuntimeTerminalBinaryController <|-- RemoteRuntimeTerminalMultiplexer
class RemoteRuntimeTerminalMultiplexerBase {
streams
ensureConnected()
sendFrame()
handleClose()
}
class RemoteRuntimeTerminalResponseController {
handleResponse()
}
class RemoteRuntimeTerminalSnapshotController {
requestSnapshot()
recoverStalledStream()
}
class RemoteRuntimeTerminalFlowController {
sendInput()
queueOutputAcknowledgement()
}
class RemoteRuntimeTerminalBinarySnapshots {
handleSnapshotOrErrorFrame()
}
class RemoteRuntimeTerminalBinaryController {
handleBinary()
handleOutputFrame()
}
class RemoteRuntimeTerminalMultiplexer {
subscribeTerminal()
}
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
…bottom-6-mobile-troubleshoot
…lines-bottom-7-external-manager
…es-bottom-8-attach-services
…s-bottom-9-hosted-review-creation
…ax-lines-bottom-10-automation-dispatch-events
… ra/max-lines-bottom-11-settings-navigation
…-lines-bottom-12-daemon-init
…ottom-13-gitlab-item-dialog
…lines-bottom-14-relay-dispatcher
…nes-bottom-15-mobile-host-screen
…lines-bottom-16-runtime-file-client
…-lines-bottom-17-ports-panel
…ottom-18-runtime-environments-pane
…ra/max-lines-bottom-19-local-pty-provider
…lines-bottom-20-cdp-bridge # Conflicts: # src/main/browser/cdp-bridge.ts
…ttom-21-git-handler
…ottom-22-linear-item-drawer
…lines-bottom-23-telemetry-events
…nes-bottom-24-resource-usage-status
…ax-lines-bottom-25-remote-terminal-multiplexer
…5-remote-terminal-multiplexer # Conflicts: # config/max-lines-baseline.txt # src/renderer/src/hooks/automation-dispatch-completion.ts
|
Warning Review limit reachedNext included review available in 13 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
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 |
* Split speech session lifecycle * Split terminal output scheduler pipeline * Split mobile browser pane modules * Prune resolved max-lines suppressions * Split pane tree equalization logic * Extract mobile troubleshoot screen styles * Split external automation manager * Split main window service attachments * Split hosted review creation checks * Split automation dispatch event handling * Split settings navigation metadata * Split daemon initialization lifecycle * Split GitLab item dialog * Split relay dispatcher layers * Split mobile host screen * Retarget mobile view settings source test * Split runtime file client layers * Split ports panel layers * Split runtime environments pane layers * Split local PTY provider responsibilities * Split CDP bridge responsibilities * Split relay Git handler responsibilities * Track moved relay Git fetch audit * Split Linear item drawer responsibilities * Split telemetry event schema responsibilities * Split resource usage status responsibilities * Split remote terminal multiplexer responsibilities * Fix F3-speech for stablyai#17123 * Fix F1-cycle for stablyai#17131 * Fix F4-navtest for stablyai#17157 * Fix F2-allowlist for stablyai#17161
Summary
Stacked on #17244.
Validation
pnpm tcpnpm tc:webv1.4.176): 5 tests / all client-host skew journeys passedpnpm run check:code-quality:changedpnpm check:max-lines-ratchet— 61 grandfathered suppressionspnpm run check:runtime-electron-ratchetgit diff --checkKnown inherited harness drift
The unpinned cross-version test now selects newly available stable tag
v1.4.192and fails only its assertion that an old host omitsterminalOwner. That release already contains the host publication commit and explicitly emitsterminalOwner/alternateScreen; this renderer-only diff changes no host, shared-protocol, harness, package, or lock input. The full suite passes when pinned to the intended pre-field releasev1.4.176.Visual proof is N/A because this is internal terminal transport decomposition with no intended rendered UI change.