Uh oh!
There was an error while loading. Please reload this page.
fix(web): preserve explicit preview navigation URLs - #8902
Conversation
Keep explicit browser URL targets unchanged, including loopback origins. Continue mapping only discovered local servers through the environment-port resolver. Verify with focused browser target resolver tests.
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This narrowly scoped web fix preserves explicitly requested preview URLs while retaining host mapping for discovered loopback servers and environment-port targets. The behavior is isolated to the resolver, clearly covered by tests, and does not change schemas, deployment, security-sensitive code, or product defaults. You can add or adjust custom eligibility rules. Learn more. |
nateEc
commented
Sep 2, 2026
@juliusmarminge All checks are green and Macroscope approved the latest commit. Could you take a human review when you have a moment? |
Uh oh!
There was an error while loading. Please reload this page.
## What's Changed * fix(web): send cited messages with Cmd+Enter by @extoci in pingdotgg/t3code#9307 * fix(web): preserve explicit preview navigation URLs by @nateEc in pingdotgg/t3code#8902 * fix(web): prevent loading ssh environments from overriding navigation by @flamboh in pingdotgg/t3code#9168 * fix(mobile): skip unsupported shared settings targets by @Lucenx9 in pingdotgg/t3code#9381 * fix(web): avoid duplicate Antigravity install status by @RakshithBhat03 in pingdotgg/t3code#9419 * fix(composer): mute fast icon when collapsed by @maria-rcks in pingdotgg/t3code#9451 * fix(web): unify skeleton loading animations on one pulse by @maria-rcks in pingdotgg/t3code#9448 * fix(web): prioritize authored pull requests by @maria-rcks in pingdotgg/t3code#9453 * fix(web): make project icons the default by @maria-rcks in pingdotgg/t3code#9457 * fix(server): reuse pr state when settling threads by @maria-rcks in pingdotgg/t3code#9459 * fix(web): keep agent images collapsed by @maria-rcks in pingdotgg/t3code#9460 * fix(web): banner buttons no longer expand the resting composer by @juliusmarminge in pingdotgg/t3code#9452 * fix(web): stop clipping the traits chevron on long Codex effort labels by @zortos293 in pingdotgg/t3code#9433 **Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1270...v0.0.39-nightly.20260903.1272 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1272
Fixes#8885.
Explicit preview URLs, including loopback URLs, were rewritten to the environment host before navigation. That can direct a valid client-local URL to an unreachable address and report misleading success.
Keep explicit URL targets unchanged; discovered local-server entries continue to use the explicit environment-port resolution path.
Verification: focused browser target resolver tests (19 passing). Web typecheck remains blocked by existing missing optional modules and unrelated Clerk type errors.
Model and harness: GPT-5 Codex via Codex CLI.
Note
Medium Risk
Splits URL resolution between user-entered navigation and discovered servers; a mistake in either path would break remote previews or reintroduce unreachable loopback rewrites.
Overview
Fixes incorrect rewriting of explicit preview navigation targets (loopback URLs, credentials, schemeless
localhost) to the remote environment host, which could send client-local addresses to unreachable hosts.resolveBrowserNavigationTargetnow returnskind: "url"targets unchanged withresolutionKind: "direct". Environment-port resolution and private-network mapping are unchanged.Loopback-to-remote-host mapping moves to
resolveDiscoveredServerUrlonly (server-picker / discovered dev servers), so pickinglocalhost:3000on a remote environment still resolves to that host’s IP while typed URLs stay as entered.Tests are updated to match; explicit
http://localhost:5173against a public relay base no longer throws the authenticated-gateway error.Reviewed by Cursor Bugbot for commit 49a7407. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve explicit loopback URLs in
resolveBrowserNavigationTargetresolveBrowserNavigationTargetnow returns allurl-kind targets unchanged withresolutionKind: 'direct', instead of remapping loopback hosts (e.g.localhost,127.0.0.1) to the environment host viaresolveEnvironmentPortTargetresolveDiscoveredServerUrlno longer delegates toresolveBrowserNavigationTarget; it independently normalizes the URL, maps loopback hosts to the environment host viaresolveEnvironmentPortTarget, and returns non-loopback URLs as-isresolveBrowserNavigationTargetin browserTargetResolver.ts for any remaining callers that relied on loopback remapping for explicit URLsMacroscope summarized 49a7407.