Skip to content

preview_open rejects about:blank as "Invalid preview URL (parse: https:)" #25641

Closed

Description

@juliusmarminge

What happened

preview_open({ url: "about:blank" }) fails with:

Invalid preview URL (parse: https:; input length 11)

Agents call it to get a blank tab before navigating, or to check that the browser works, and give up on browser work when it fails. In the fleet this ended two lead rounds early (https://git.cafe/pingdotgg/t3code/issues/25379 r1, https://git.cafe/pingdotgg/t3code/issues/24171 r26). Leads reported it 8 times between 2026-10-21 and 2026-10-25.

Cause

normalizePreviewUrl adds https:// to any input without ://. about:blank becomes https://about:blank, new URL rejects the non-numeric port, and the error reports parse with protocol https:. So the message names neither the real input nor the real problem. The address-bar path (resolveAddressBarInput) lists about: as a known non-web scheme, but preview_open goes through normalizePreviewUrl directly (apps/server/src/preview/ServerBrowser.ts:1408).

Expected

Either about:blank opens a blank tab, or it's rejected as unsupported-protocol: about: with a hint like "omit url to open a blank tab". In both cases a scheme without // isn't turned into https://<scheme>:<rest>.

Where

packages/shared/src/preview.ts:183-210, normalizePreviewUrl (origin/main fe507c5a1e), line 189.

Related: https://git.cafe/pingdotgg/t3code/issues/22402 (validation errors don't say what's wrong).

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions