Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: Support custom network endpoints for desktop pairing #2086

Closedkendalled(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/2086/headopened View on GitHub

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](https://cursor.com/bugbot) for commit 4fccbbdab68e2038d07f1f20c91bed817d0ff4c7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

  • 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.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. 3rd commit is me merging main into this because this branch was a bit behind. no merge conflicts.

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

    6. 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.

    7. juliusmarminge closed this

Sign in to join this conversation.