Skip to content

Split ports panel layers - #17194

Merged
nwparker merged 40 commits into
mainfrom
ra/max-lines-bottom-17-ports-panel
Aug 30, 2026
Merged

nwparker merged 40 commits into
mainfrom
ra/max-lines-bottom-17-ports-panel

Conversation

@nwparker

@nwparker nwparker commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1543 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1503 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​40

Summary

  • reduce PortsPanel.tsx from 1,520 lines to a 22-line public facade
  • split local scan/controller, local rows/details, SSH controller/rows, and forwarding dialog into focused modules no larger than 313 lines
  • preserve the public export surface, runtime/SSH routing, forwarding target fencing, port deduplication, and all existing UI behavior
  • retarget the hover-reveal source guard and remove the resolved max-lines baseline entry

Validation

  • pnpm tc
  • pnpm tc:web
  • pnpm test src/renderer/src/components/right-sidebar src/renderer/src/components/ports src/renderer/src/lib/workspace-port-groups.test.ts src/renderer/src/lib/workspace-port-scan-debounce.test.ts — 220 files, 1,919 passed
  • focused PortsPanel and hover-reveal tests — 24 passed
  • exact AST/source preservation audit — 95 function bodies, 101 initializers, 455 literals, 169 JSX elements, 26 comments, and facade exports
  • changed-file Oxlint and focused native code-quality audit
  • pnpm run check:code-quality:changed
  • pnpm check:max-lines-ratchet — 69 entries
  • max-lines ratchet tests — 15 passed
  • pnpm run check:runtime-electron-ratchet
  • changed-file formatting check
  • git diff --check
  • Electron/CDP: verified the rendered SSH Ports tab, deduplicated forwarded/detected rows, section collapse, and prefilled add/edit dialogs in this worktree

Stacked on #17188.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR splits the oversized Ports panel into focused local-port and SSH-port modules while retaining a small routing facade and its public exports.

  • Extracts local scanning, section, row, and details-dialog components.
  • Extracts SSH controller, forwarded/detected rows, and forwarding dialog.
  • Retargets hover-reveal coverage and removes the obsolete max-lines baseline entry.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/renderer/src/components/right-sidebar/PortsPanel.tsx Replaces the monolithic implementation with a routing facade while preserving the existing public exports.
src/renderer/src/components/right-sidebar/local-workspace-ports-panel.tsx Contains the behavior-preserving extraction of local scan state, refresh actions, section routing, and browser/stop handlers.
src/renderer/src/components/right-sidebar/ssh-ports-panel.tsx Contains the extracted SSH panel controller with preserved connection scoping, forwarding deduplication, and dialog routing.
src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.tsx Extracts add/edit forwarding form behavior while retaining target fencing, validation, and submission paths.
src/renderer/src/components/hover-reveal-touch-action-visibility.test.ts Retargets the touch-visibility source guard from the former monolith to the three extracted row components.
config/max-lines-baseline.txt Removes the now-obsolete PortsPanel max-lines exemption after the component split.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  P[PortsPanel facade] -->|Local repository| L[LocalWorkspacePortsPanel]
  L --> LS[LocalPortSection]
  LS --> LR[LocalPortRow]
  L --> LD[LocalPortDetailsDialog]
  P -->|SSH repository| S[SshPortsPanel]
  S --> SF[SshForwardedPortRow]
  S --> SD[SshDetectedPortRow]
  S --> D[SshPortForwardDialog]
Loading

Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@nwparker
nwparker changed the base branch from ra/max-lines-bottom-16-runtime-file-client to main August 30, 2026 03:17
@nwparker
nwparker merged commit e1166ec into main Aug 30, 2026
4 checks passed
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db071b94-32a4-4b79-8398-ba28671c0b86

📥 Commits

Reviewing files that changed from the base of the PR and between 9bdc146 and c8041b7.

📒 Files selected for processing (12)
  • config/max-lines-baseline.txt
  • src/renderer/src/components/hover-reveal-touch-action-visibility.test.ts
  • src/renderer/src/components/right-sidebar/PortsPanel.tsx
  • src/renderer/src/components/right-sidebar/local-port-details-dialog.tsx
  • src/renderer/src/components/right-sidebar/local-port-row.tsx
  • src/renderer/src/components/right-sidebar/local-port-section.tsx
  • src/renderer/src/components/right-sidebar/local-workspace-port-sections.ts
  • src/renderer/src/components/right-sidebar/local-workspace-ports-panel.tsx
  • src/renderer/src/components/right-sidebar/ssh-detected-port-row.tsx
  • src/renderer/src/components/right-sidebar/ssh-forwarded-port-row.tsx
  • src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.tsx
  • src/renderer/src/components/right-sidebar/ssh-ports-panel.tsx

📝 Walkthrough

Walkthrough

The ports panel was reduced to a dispatcher that selects the local workspace or SSH implementation. Local port grouping, rows, sections, details, scanning, stopping, and browser actions moved into dedicated modules. SSH detection, forwarding, editing, removal, and browser actions moved into dedicated modules. The touch-visibility test and max-lines baseline now reference the extracted components.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* 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

* Fix F3-speech for stablyai#17123

* Fix F1-cycle for stablyai#17131

* Fix F4-navtest for stablyai#17157

* Fix F2-allowlist for stablyai#17161
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