Skip to content

refactor(rpc): name the terminal.subscribe modules - #27444

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-10
Oct 11, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-10

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​30 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30 0

ELI5

Six files that run the terminal.subscribe stream were named terminal-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.ts
    • terminal-legacy-subscribe-live.ts → terminal-subscribe-binary-live.ts
    • terminal-legacy-subscribe-snapshot.ts → terminal-subscribe-binary-snapshot.ts
    • terminal-legacy-binary-control-frames.ts → terminal-subscribe-binary-control-frames.ts
    • terminal-legacy-simple-subscriptions.ts → terminal-subscribe-json-and-lease.ts
    • terminal-legacy-subscription-types.ts → terminal-subscribe-types.ts
  • Internal symbols renamed to match: LegacyBinarySubscriptionState → TerminalSubscribeBinaryState, LegacyBinaryControlState → TerminalSubscribeBinaryControlState, and the three *LegacyBinary* functions.
  • Four comments say terminal.subscribe instead 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 in rpc/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 tc passes.

  • pnpm lint passes (all ratchets at baseline).

  • pnpm run check:code-quality:changed passes.

  • pnpm run build:orcad bundles 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)' over src config tests mobile packages scripts docs (including @ts-nocheck files) returns nothing. The only importer outside the six files was terminal-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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security, Linux/Windows/macOS, SSH, mobile, compatibility and performance: no effect. Relative import renames only.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3187314-78ad-4cf0-88eb-dac31e987f4f

📥 Commits

Reviewing files that changed from the base of the PR and between 398cb84 and 074bf13.


📒 Files selected for processing (7)
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-binary-control-frames.ts
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-binary-live.ts
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-binary-snapshot.ts
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-binary.ts
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-json-and-lease.ts
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-method.ts
  • src/main/runtime/rpc/methods/terminal/terminal-subscribe-types.ts

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit 7263f49 into main Oct 11, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant