Skip to content

fix(desktop): open Browser local servers on localhost - #71

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/browser-local-servers-localhost-96a9
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/browser-local-servers-localhost-96a9

Conversation

@macodev00

Copy link
Copy Markdown
Owner

Fixes pingdotgg#13444

What

Browser panel Local servers and Recently used entries for a desktop-local environment now open http://localhost:<port>/ when the listed server is a loopback service. That includes the WSL2 NAT backend, whose connection URL is the distro eth0 address (172.x).

Saved remote and LAN hosts stay as they are. A loopback discovery on a private-network environment that is not desktop-local still opens on that environment's host. A URL that is already a non-loopback host stays on that host.

Why

The desktop WSL backend advertises the distro eth0 IP so the T3 server, which binds 0.0.0.0, stays reachable when wslhost forwarding is flaky. The browser resolver treated every private connection host the same way and rewrote loopback picker URLs onto that IP. A dev server bound only to 127.0.0.1 never accepts http://172.x:<port>/. Windows localhost forwarding accepts http://localhost:<port>/, which is why typing the same URL in the address bar already worked.

Verification

vp test run apps/web/src/browser/browserTargetResolver.test.ts apps/web/src/components/preview/PreviewView.test.tsx

Observed: Test Files 2 passed (2). Tests 36 passed (36).

cd apps/web && vp run typecheck

Observed: tsc --noEmit exited 0.

vp lint apps/web/src/browser/browserTargetResolver.ts apps/web/src/browser/browserTargetResolver.test.ts apps/web/src/components/preview/PreviewView.test.tsx

Observed: exited 0.

Checklist

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

No UI chrome change; the navigation target for an existing list click is the only behavior change.

Grok 4.7 via Cursor cloud agent.

Open in Web Open in Cursor 

Discovered loopback servers on a desktop-local environment were rewritten
to the connection host. On WSL2 NAT that host is the distro eth0 address,
so a dev server bound to 127.0.0.1 never accepts the click. Keep those
targets on localhost. Saved remote hosts still open on their own address.

Fixes pingdotgg#13444
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 1, 2026
@macodev00

Copy link
Copy Markdown
Owner Author

Opened upstream.

@macodev00 macodev00 closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Browser panel: Local servers / Recently used open the server's IP instead of localhost, breaking loopback-only dev servers (WSL2)

1 participant