Skip to content

feat: Support custom network endpoints for desktop pairing - #2086

Closed
kendalled wants to merge 3 commits into
pingdotgg:mainfrom
kendalled:fix/2031-multi-nic-ip-support
Closed

kendalled wants to merge 3 commits into
pingdotgg:mainfrom
kendalled:fix/2031-multi-nic-ip-support

Conversation

@kendalled

@kendalled kendalled commented Apr 16, 2026 •

Copy link
Copy Markdown

What Changed

Adds a small, scoped fix for multi-NIC setups in Settings → Manage local backend → Network access:

  • Added an optional Custom hostname or URL input when network access is enabled.
  • The input overrides the endpoint used for:
    • the “Reachable at …” text
    • generated/copyable pairing links
  • Kept behavior unchanged when no override is provided.
  • Added focused parsing/validation logic in a shared helper:
    • apps/web/src/components/settings/networkEndpointOverride.ts
  • Added unit tests for override behavior and validation:
    • apps/web/src/components/settings/networkEndpointOverride.test.ts
  • Added browser test coverage for the new UI flow:
    • apps/web/src/components/settings/SettingsPanels.browser.tsx

Why

On hosts with multiple interfaces/IPs (for example VPN/WireGuard + LAN), the auto-selected reachable address can be wrong for the user’s target device. That makes the displayed “Reachable at” value and copied pairing URL require manual edits.

This change provides a minimal, user-controlled override without changing backend exposure behavior or introducing persistent settings complexity.

UI Changes

Before:

  • “Reachable at …” always used the auto-detected endpoint.
  • Copying a pairing link used that same endpoint, even when it was not the desired NIC/IP.

After:

  • A new optional Custom hostname or URL field appears under Network access (when enabled).
    Screenshot:
image - Entering a value updates the displayed “Reachable at …” and copied pairing links for that app session. Screenshot: image - Invalid values show an inline validation error. Screenshot: image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • [n/a ] I included a video for animation/interaction changes

Fixes issue #2031


Note

Low Risk
Low risk: scoped UI-only change that rewrites the displayed/copy pairing endpoint via small parsing logic, with fallback + validation and added tests.

Overview
Adds an optional Custom hostname or URL override in ConnectionsSettings (shown only when desktop network access is enabled) to replace the auto-detected endpoint used in the “Reachable at …” label and in generated/copied pairing links.

Introduces resolveDesktopNetworkEndpointUrl to parse/validate host or full-URL overrides (with inline error + fallback to the default endpoint), and adds unit + browser tests to cover the override and copy-to-clipboard behavior.

Reviewed by Cursor Bugbot for commit 4fccbbd. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add custom network endpoint override for desktop pairing links

  • Adds a "Custom hostname or URL" input in ConnectionsSettings (visible when the desktop server is network-accessible) that overrides the displayed reachable URL and the endpoint used in copied pairing links.
  • Introduces resolveDesktopNetworkEndpointUrl to parse and validate the user-provided hostname or URL, returning an effective endpoint, a normalization flag, and an inline validation error when the input is invalid.
  • Invalid overrides surface an error in the settings row and fall back to the default endpoint URL.

Macroscope summarized 4fccbbd.

@coderabbitai

coderabbitai Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9c241be7-570f-464e-a2f1-57261cf7e41b

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 16, 2026
@macroscopeapp

macroscopeapp Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature allowing custom hostname/URL override for desktop pairing endpoints. While the implementation is well-tested and self-contained to the settings UI, new feature capabilities warrant human review to verify the intended behavior and UX are appropriate.

You can customize Macroscope's approvability policy. Learn more.

@kendalled

Copy link
Copy Markdown
Author

3rd commit is me merging main into this because this branch was a bit behind. no merge conflicts.

@kendalled

Copy link
Copy Markdown
Author

@juliusmarminge Not to spam but I think this fix is good, let me know

Copy link
Copy Markdown
Member

The connection catalog and current pairing endpoint-selection design supersede this custom-endpoint implementation, and its linked issue is closed.

This was closed as part of a large repo-wide maintenance sweep. If you think it's still relevant, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants