refactor(web): the connections page's pure helpers live in ConnectionsSettings.logic#22683

merged1
main
refactor/settings-split-connections-logic
opened3d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

ConnectionsSettings.tsx was 4,025 lines. This layer moves its pure helpers (pairing URL parsing, SSH target parsing, sorting, endpoint selection, share hints) into the existing ConnectionsSettings.logic.ts, unchanged.

FileBeforeAfter
ConnectionsSettings.tsx40253767
ConnectionsSettings.logic.ts168443

Renders: pure move, no render change.

Tests run: tsc-rs --noEmit for apps/web, vp lint on changed files, vp test run src/reactCompilerCoverage.test.ts -t settings/ (0 bailouts), SettingsPanels.logic.test.ts, ConnectionsSettings.logic.test.ts.

🤖 Generated with Claude Code

Checks

Checks in progress
Synced from GitHub

Approvability

Verdict: Approved at f631093

Macroscope's review found this PR approvable — This PR moves existing Connections settings helpers into the dedicated logic module without changing their implementations, callers, defaults, schemas, or authentication behavior. The component change is limited to imports, making the runtime impact a low-risk code organization improvement.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 66a82859-4dbd-485a-a348-790eb12cb9fd
📥 Commits

Reviewing files that changed from the base of the PR and between f631093fe097a3a632ce85b064988fce46ec8b44 and a7a033c64d5a555dbc9ae12e78d30744b519986d.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 355e0f27-465f-4978-a02f-0ce7247bc8f6
📥 Commits

Reviewing files that changed from the base of the PR and between e1859aee96b2946d7262b9a67c8d229c2337bfe0 and f631093fe097a3a632ce85b064988fce46ec8b44.

📒 Files selected for processing: 2
  • apps/web/src/components/settings/ConnectionsSettings.logic.ts
  • apps/web/src/components/settings/ConnectionsSettings.tsx

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

The connection settings utilities now live in ConnectionsSettings.logic.ts. ConnectionsSettings.tsx imports the shared helpers instead of defining them locally.

Changes: Connections Settings

Layer / File(s)Summary
SSH and pairing input helpers
apps/web/src/components/settings/ConnectionsSettings.logic.ts, apps/web/src/components/settings/ConnectionsSettings.tsx
The logic module defines timestamp formatting, SSH target parsing and error formatting, and pairing field parsing. The component imports these helpers.
Client and pairing-link records
apps/web/src/components/settings/ConnectionsSettings.logic.ts, apps/web/src/components/settings/ConnectionsSettings.tsx
The logic module defines sorting, summary, and conversion helpers for client sessions and pairing links. The component no longer defines these helpers locally.
Pairing endpoint and URL helpers
apps/web/src/components/settings/ConnectionsSettings.logic.ts, apps/web/src/components/settings/ConnectionsSettings.tsx
The logic module defines endpoint selection, pairing URL generation, hosted URL detection, and sharing hints. The component imports these helpers.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Suggested reviewers: maria-rcks

Merge Risk: ⚪ Minimal · up to f6310

No specific connection-settings failure is identified; the change is mergeable after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description explains the refactor and lists verification commands, but it does not provide the required Problem, Change, or Scope and approval sections. It also does not link an approved issue or …Rewrite the description using the required headings. State the problem and expected behavior, explain the change, provide the triaged issue or explicit maintainer approval with scope justification, and retain the verification results. State…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly and concisely describes the main change: moving pure connection helpers into ConnectionsSettings.logic.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the refactor and lists verification commands, but it does not provide the required Problem, Change, or Scope and approval sections. It also does not link an approved issue or discussion.

Resolution

Rewrite the description using the required headings. State the problem and expected behavior, explain the change, provide the triaged issue or explicit maintainer approval with scope justification, and retain the verification results. State any checks that could not be performed.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Added 1 commit

  • refactor(web): the connections page's pure helpers live in ConnectionsSettings.logica7a033c
Synced from GitHub

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for a7a033c.

This comment will update automatically after the next completed run.

Synced from GitHub
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.