Skip to content

refactor: group workspace port scanning and assignment regression tests - #37250

Merged
nwparker merged 1 commit into
mainfrom
module-organization/d04-d08-port-scan-assignment-m0509a2d8
Nov 2, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-organization/d04-d08-port-scan-assignment-m0509a2d8

Conversation

@nwparker

@nwparker nwparker commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Keeps workspace port scanning and relay assignment tests beside the code they belong to.

What Changed

Groups 13 workspace-port modules under src/renderer/src/lib/workspace-ports/ and five relay assignment regression suites beside their store. Updates callers and metadata across 41 output files, combining two adjacent tracker tasks in one PR.

Uses concrete owners, including the existing assignment-invariants package subpath. Removes the addressForPort forwarding export and imports its defining URL module directly. Runtime bodies, JSX, hooks, and test assertions are preserved.

Why

Reduces flat-directory clutter while preserving explicit dependencies and avoiding barrel exports.

Linked Issue

N/A — internal module-organization tracker; no pre-existing linked issue.

Visual Proof

N/A — file organization and import paths only; no visual or interaction change.

Testing

  • Manual rendered-app testing (N/A: no rendered behavior changes).
  • Existing automated tests retargeted: 72 renderer tests and 41 relay tests passed locally on macOS.
  • Renderer/relay typechecks, scoped lint/format, changed-code quality, test routing, direct-link and flaky-pattern checks passed.
  • All four applicable CI workflows passed, including all 12 test shards, cloud verification and desktop packaging (including Windows).

Risk

Level: Low. An incorrect import or test path could break port scanning or omit regression coverage. Two independent source audits verify owners, module loading, mocks, metadata and preserved code; focused tests and CI passed. Revert the PR to undo it; no data migration.

AI Disclosure

Review

Two independent native Codex audits approved the exact commit. Refactor residue and current-parent preservation are checked separately before merge. Detailed evidence remains local.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer material is copied or translated.

Notes

Cross-platform paths, remote hosts, mobile consumers and folder workspaces retain their existing behavior. No wire contracts, data formats, process behavior or performance policies change.

Checklist

  • Focused scope: two adjacent tracker tasks in one PR.
  • Explained what changed and why.
  • Stated risk and rollback.
  • Visual proof N/A with reason.
  • Self-reviewed correctness, security and performance.
  • Cross-platform, SSH/remote and path impact considered.
  • Applicable local validation and CI passed.

@nwparker
nwparker requested a review from Jinwoo-H as a code owner November 2, 2026 00:30
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eb1d93cf-09d7-40bc-a4ae-a519b38d0597
Commits

Reviewing files that changed from the base of the PR and between 1c40f54 and e9349b2.

Files selected for processing: 41
  • cloud/apps/relay/src/assignment/assignment-placed-marker.test.ts
  • cloud/apps/relay/src/assignment/assignment-reserve-mode-evacuation.test.ts
  • cloud/apps/relay/src/assignment/assignment-reserve-mode.test.ts
  • cloud/apps/relay/src/assignment/assignment-reserve-spill.test.ts
  • cloud/apps/relay/src/assignment/assignment-roll-replaced-cell.test.ts
  • config/direct-link-open-baseline.txt
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/components/browser-pane/new-tab/browser-new-tab-server-row.tsx
  • src/renderer/src/components/browser-pane/new-tab/use-browser-new-tab-servers.ts
  • src/renderer/src/components/ports/WorkspacePortScanner.test.tsx
  • src/renderer/src/components/ports/WorkspacePortScanner.tsx
  • src/renderer/src/components/right-sidebar/PortsPanel.test.tsx
  • src/renderer/src/components/right-sidebar/PortsPanel.tsx
  • src/renderer/src/components/right-sidebar/host-scoped-ports-panel.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-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-forwarded-ports-section.tsx
  • src/renderer/src/components/right-sidebar/ssh-ports-panel.tsx
  • src/renderer/src/components/sidebar/WorktreeCardPorts.tsx
  • src/renderer/src/components/sidebar/use-worktree-card-foundation.ts
  • src/renderer/src/components/status-bar/PortsStatusSegment.host-routing.test.tsx
  • src/renderer/src/components/status-bar/PortsStatusSegment.tsx
  • src/renderer/src/components/status-bar/ports-status-popover-rows.test.tsx
  • src/renderer/src/components/status-bar/ports-status-popover-rows.tsx
  • src/renderer/src/components/worktree-jump-palette-document-index.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-actions.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-groups.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-groups.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-host-availability.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-host-scoped-scan.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-localhost-label-selector.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-localhost-label.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-client.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-debounce.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-debounce.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-publish.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-refresh.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-urls.ts

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

Walkthrough

Renderer components, workspace-port modules, tests, and configuration references now use updated workspace-port paths. The actions module no longer re-exports addressForPort. Relay assignment tests use updated assignment module and invariant imports.

Merge Risk: Minimal · up to e9349

The refactor’s reviewed import and path updates have no identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main change: grouping workspace port scanning and assignment regression tests. It is concise and relevant to the changeset.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Description check Passed The description is complete and follows the repository template. It explains the change and rationale, documents testing, risk, rollback, visual proof, AI disclosure, scope boundaries, and checklist s…
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 38 files. (2 skipped: 2 unsupported.)

Full details: Description check

Explanation

The description is complete and follows the repository template. It explains the change and rationale, documents testing, risk, rollback, visual proof, AI disclosure, scope boundaries, and checklist status. The lack of a linked issue is explained as an internal tracker change, which is consistent with the template's maintainer exception.

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

@nwparker
nwparker merged commit ecdbabe into main Nov 2, 2026
47 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