Repository navigation
refactor(rpc): name the terminal.subscribe modules - #27444
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 6 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 |
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
Six files that run the
terminal.subscribestream were namedterminal-legacy-*. "Legacy" made them look like dead code to remove, but they are live: every paired client that subscribes to a terminal goes through them. This PR only renames them so the names say what they do.What Changed
src/main/runtime/rpc/methods/terminal/:terminal-legacy-subscribe-binary.ts→terminal-subscribe-binary.tsterminal-legacy-subscribe-live.ts→terminal-subscribe-binary-live.tsterminal-legacy-subscribe-snapshot.ts→terminal-subscribe-binary-snapshot.tsterminal-legacy-binary-control-frames.ts→terminal-subscribe-binary-control-frames.tsterminal-legacy-simple-subscriptions.ts→terminal-subscribe-json-and-lease.tsterminal-legacy-subscription-types.ts→terminal-subscribe-types.tsLegacyBinarySubscriptionState→TerminalSubscribeBinaryState,LegacyBinaryControlState→TerminalSubscribeBinaryControlState, and the three*LegacyBinary*functions.terminal.subscribeinstead of "legacy".Nothing changes for users. The RPC method name, its params, frames and replies are untouched, so there is no wire change and mixed-version clients and hosts are unaffected.
Net lines: 0 production, 0 tests (30 changed lines, 6 git renames).
Why
Phase 3.99 is deleting a lot of leftover relay code. Names like
terminal-legacy-*invite a wrong deletion of a live path. Renaming is cheaper and safer than adding warning comments. The open PRs that work inrpc/methods/terminal/(#27299, #27312) do not touch or import these six files, so this does not conflict with them.Linked Issue
Maintainer PR, Phase 3.99 Wave 0 (PR 0.10). No issue.
Visual Proof
N/A: file and symbol renames only, no UI or behaviour change.
Testing
pnpm tcpasses.pnpm lintpasses (all ratchets at baseline).pnpm run check:code-quality:changedpasses.pnpm run build:orcadbundles the renamed modules (5877 modules, ok).Focused tests pass:
streaming,terminal-output-batching,terminal-subscribe-{lease-only,buffer,mounted-pane},terminal-subscription-registration,terminal-multiplex-input-write-rejection(48 tests).Proof no stale reference remains:
rg 'terminal-legacy-(binary|simple|subscri)|LegacyBinary(Sub|Control|Init)'oversrc config tests mobile packages scripts docs(including@ts-nocheckfiles) returns nothing. The only importer outside the six files wasterminal-subscribe-method.ts.I manually tested these changes locally
Automated tests added/updated, or explained why not below (renames only; existing tests cover the path)
Review
Agent skill upstream boundary
Notes
Security, Linux/Windows/macOS, SSH, mobile, compatibility and performance: no effect. Relative import renames only.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)