Skip to content

refactor(renderer): remove the web-terminal-surface-id re-export - #27981

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-3-5e
Oct 12, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-3-5e

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17 0
Prod 26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31 $\color{#cf222e}{\Huge{\mathbf{−}}}$​32 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1

ELI5

src/renderer/src/runtime/web-terminal-surface-id.ts was a 7-line alias that re-exported src/shared/terminal-surface-id.ts. This PR imports the shared module directly and deletes the alias.

What Changed

Users see no difference.

  • 28 renderer files import isWebTerminalSurfaceTabId, toHostSessionTabId, toWebTerminalSurfaceTabId and related names from shared/terminal-surface-id.

  • Test mocks of the alias now mock the shared module with the same values. Nothing outside the renderer imports these names, so the mocks cover the same code they did before.

  • web-runtime-session-legacy-relay-bridged-activation.test.ts, added by fix(ssh): never start a hidden orcad shell for a tab the legacy relay bridge serves #27939 while the barrel PRs were in flight, imports the shared module. Its mock of the deleted web-session-tabs-sync barrel now targets web-session-tabs-sync/tracking-mappings, the module the activation code imports. Before this, the mock was inert.

Net: production −1, tests 0. This PR is about one import path per symbol, not line count.

Why

Phase 3.99 / AGENTS.md rule: no barrels and no re-export shims. With direct imports, each import line names the module a file really depends on, and each test mocks the module the code under test actually calls. One barrel per PR keeps every review mechanical.

Linked Issue

N/A, internal Phase 3.99 cleanup (PR 3.5e).

Visual Proof

N/A, no UI or behaviour change.

Testing

  • No reference to runtime/web-terminal-surface-id remains.

  • All 15 changed test files pass (158 tests).

  • pnpm tc, pnpm lint and pnpm run check:code-quality:changed (0 findings) pass on the whole barrel stack.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

P0/P1 review: my own review plus an independent reviewer.

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

Renderer-only import changes. SSH, wire, mobile and platforms are not affected.

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 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 029b7275-c1ca-4c7d-af80-a5df6d426b06

📥 Commits

Reviewing files that changed from the base of the PR and between 6be6090 and 7cf73a7.


📒 Files selected for processing (42)
  • src/renderer/src/components/tab-group/useTabGroupWorkspaceModel.focus.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/agent-idle-working-handlers.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-choice.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/components/terminal/terminal-close-confirm-keyboard-vs-mouse.test.ts
  • src/renderer/src/components/terminal/terminal-tab-actions-kill-all.test.ts
  • src/renderer/src/components/terminal/terminal-tab-actions-unified-close.test.ts
  • src/renderer/src/components/terminal/terminal-tab-actions-unrouted-close.test.ts
  • src/renderer/src/components/terminal/terminal-tab-actions.test.ts
  • src/renderer/src/components/terminal/terminal-tab-actions.ts
  • src/renderer/src/components/terminal/terminal-tab-close-running-confirm.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-host-resolution.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-web-runtime.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-windows-quoting.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.test.ts
  • src/renderer/src/lib/launch-agent-structured-chat-guard.test.ts
  • src/renderer/src/lib/launch-agent-web-host-tab.ts
  • src/renderer/src/lib/web-runtime-worktree-terminal-after-wake.ts
  • src/renderer/src/lib/worktree-creation-agent-seeds.ts
  • src/renderer/src/runtime/local-structured-session-tabs-host-isolation.test.ts
  • src/renderer/src/runtime/web-runtime-session-legacy-relay-bridged-activation.test.ts
  • src/renderer/src/runtime/web-runtime-session-tab-activate-close.test.ts
  • src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts
  • src/renderer/src/runtime/web-runtime-session-tab-move.ts
  • src/renderer/src/runtime/web-runtime-split-focus.ts
  • src/renderer/src/runtime/web-runtime-terminal-actions.ts
  • src/renderer/src/runtime/web-runtime-terminal-create-operation.ts
  • src/renderer/src/runtime/web-runtime-terminal-creation.ts
  • src/renderer/src/runtime/web-runtime-terminal-placement-settlement.ts
  • src/renderer/src/runtime/web-session-tabs-sync/agent-status-patch.ts
  • src/renderer/src/runtime/web-session-tabs-sync/agent-status-primitives.ts
  • src/renderer/src/runtime/web-session-tabs-sync/apply-preparation-base.ts
  • src/renderer/src/runtime/web-session-tabs-sync/apply-preparation-groups.ts
  • src/renderer/src/runtime/web-session-tabs-sync/apply-preparation-unified.ts
  • src/renderer/src/runtime/web-session-tabs-sync/layout-groups.ts
  • src/renderer/src/runtime/web-session-tabs-sync/mirrored-terminal-recovery-ledger.test.ts
  • src/renderer/src/runtime/web-session-tabs-sync/terminal-build.ts
  • src/renderer/src/runtime/web-session-tabs-sync/terminal-surfaces.ts
  • src/renderer/src/runtime/web-session-terminal-orphan-recovery-surface.ts
  • src/renderer/src/runtime/web-session-terminal-orphan-recovery.ts
  • src/renderer/src/runtime/web-session-terminal-orphan-topology.ts
  • src/renderer/src/runtime/web-terminal-surface-id.ts

💤 Files with no reviewable changes (1)
  • src/renderer/src/runtime/web-terminal-surface-id.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.



📝 Walkthrough
📝 Walkthrough

Walkthrough

Renderer production code and tests now import terminal surface ID helpers from the shared module instead of the renderer-local module. The renderer-local re-export module is deleted. Import behavior and test mock behavior remain unchanged. One test also targets the tracking-mappings submodule in its mock.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 7cf73

This removes a renderer-only import alias without changing the shared helpers or user-visible behavior. The imports and updated test mock resolve correctly, so no material merge risk is indicated.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 41 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: removing the renderer re-export module.
Description check Passed The description is complete and focused. It explains the change, rationale, testing, lack of user-facing impact, platform scope, and checklist status. The N/A linked issue is consistent with the state…

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

  • 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 0eaa04c into main Oct 12, 2026
45 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