Skip to content

[Bug]: Web clients can't open chat HTML/PDF file links in a browser #15929

Description

@saphid

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Have an agent reply in a chat with a markdown link to an HTML or PDF file in the project, for example [q3-summary.html](/abs/path/reports/q3-summary.html) or [architecture.pdf](/abs/path/reports/architecture.pdf).
  2. Open that thread in a web client: npx t3 / vp run dev in a browser, or a remote browser over LAN/Tailscale.
  3. Right-click the file chip.

Expected behavior

There is some way to view the file rendered, as there is for URL links in the same chat. Those offer Open in system browser (apps/web/src/components/chat/externalLinkContextMenu.ts) and follow the Open links in setting.

Actual behavior

No menu item opens the file in a browser.

  • Local web client: Open in Cursor, Reveal in Finder, Copy relative path, Copy full path.
  • Remote web client (Tailscale origin): Copy relative path, Copy full path.

Left-clicking the chip opens a Files panel tab instead of a rendered page; in this repro that tab stayed blank after 5 seconds, which I did not investigate further. A browser on another machine also can't reach the environment's filesystem, so on web there is no way to see the agent's HTML report or PDF rendered.

The rendered-view action is gated on the desktop integrated browser: ChatMarkdown.tsx L2797–2803 only sets onOpenInBrowser when isPreviewSupportedInRuntime(). Desktop has the same gap in a smaller form: file links can open only in the integrated browser, never in the OS browser.

Impact

Major degradation or frequent failure

Version or commit

main a1d9d72 (reproduced 2026-10-05)

Environment

macOS 26.5.2 (arm64), Google Chrome 154.0.8037.93, Node 24.21.0; vp run dev --share with isolated dev state. Local origin http://localhost:7720; remote origin is the dev runner's Tailscale Serve HTTPS URL (same Mac).

Screenshots, recordings, or supporting files

Local web, right-click on q3-summary.html:

Local web on main: right-click on q3-summary.html shows Open in Cursor, Reveal in Finder and copy-path items only

Local web, right-click on architecture.pdf:

Local web on main: right-click on architecture.pdf shows the same items, none opens the PDF

Remote web (Tailscale origin), right-click on q3-summary.html:

Remote web over Tailscale on main: right-click on q3-summary.html shows only Copy relative path and Copy full path

Local web, left-click on q3-summary.html (the Files panel opens, but no rendered page):

Local web on main: left-clicking q3-summary.html opens a Files panel tab that stayed blank

Not verified: hosted app.t3.codes, Safari/Firefox, a client on a separate machine.

Workaround

Copy the full path and open the file some other way on the machine that hosts the environment. That isn't possible from a remote browser.

A fix is proposed in #7641.

Activity

  1. juliusmarminge commented on Oct 5, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Triage

    Thanks @saphid for the thorough write-up and screenshots across local and remote web clients. Having both menus side by side made the gating easy to follow.

    What I found

    • The menus in your screenshots match current main (37de6cb; the file-link logic is unchanged since a1d9d72).
    • A chat file chip only gets a browser item when isPreviewSupportedInRuntime() is true (the onOpenInBrowser prop in apps/web/src/components/ChatMarkdown.tsx). That check is window.desktopBridge?.preview (apps/web/src/previewStateStore.ts), so browser clients never get it, and the item it adds today is Open in integrated browser, not the system browser.
    • Open in Cursor and Reveal in Finder sit behind a separate gate, canUseMarkdownFileShellActions, which requires a resolved local-exec environment. That's why a Tailscale origin shows only Copy relative path and Copy full path.
    • Open in system browser on URL links comes from a different menu (apps/web/src/components/chat/externalLinkContextMenu.ts). File chips don't use it.
    • On web, the intended rendered view for HTML/PDF links is the Files panel viewer: left-click calls openFileInPanel, which signs an asset URL and shows the file in a frame, and docs/user/composer.md describes these files opening as rendered pages on web and desktop. That viewer isn't gated on the desktop bridge, so it should work from a remote browser.
    • In your left-click capture, the q3-summary.html tab is open but the panel body is empty: no breadcrumbs, file tree, spinner, "Unable to load file preview", or document. That empty viewer is the clearest failure here; the screenshot doesn't show why the frame failed to load.
    • Related but different: [Bug]: Local HTML files open to a blank viewer in T3 Code Desktop #11191 (desktop viewer lands on chrome-error://chromewebdata/ while source view works) and fix(web): show an error when a file preview frame fails to load #11588 (adds an error state when a preview frame fails). fix(web): let web clients open chat HTML/PDF file links in the system browser #7641 is closed, so there's no open fix PR for this yet.

    Likely fix area

    The web file viewer path behind openFileInPanel (asset URL signing and the preview frame) for HTML/PDF on browser clients, especially over a remote origin. Separately, whether file chips on web should also offer an open-in-system-browser action is a product question. Any console or network errors from that blank panel would help narrow down why the frame doesn't render.

    A maintainer will decide on the fix direction.

  2. added
    bugSomething is broken or behaving incorrectly.
    via-triageFiled through npx t3 triage
    on Oct 5, 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.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions