[Feature]: Add an authenticated browser preview gateway for served web #6847
Replies: 6 comments
|
this would be lovely |
|
I need this for my fleet.... How does everyone else maange previewing and testing changes on remote machines? Bored of remote'ing into the dev box to test.... very 80's. |
|
Would love this! Would solve a lot of my problems! |
|
Would be awesome, I would love to see my localhost deploys. |
|
This would be absolutely awesome. Would love to see this in T3 code |
|
+1, and one extra use case worth covering. I run T3 Desktop on my home machine and often work from a laptop through the served web client. Chat works well remotely, but the Browser panel is empty because it depends on the desktop's Electron webview. What I'd most like is to see the same Browser tab that's already open beside the chat on the desktop, with its logins, scroll position and unsaved form input, plus the page the agent is driving with the preview tools. Opening the same URL in a separate browser doesn't give me that: it's a different session. Things I tried without changing T3:
Two things would solve it, in order of preference:
Happy to test a nightly build. |
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/server
Problem or use case
The Browser surface is unavailable when T3 Code is used through the served web app. The current preview runtime depends on the desktop Electron webview, while the server owns preview discovery and state but does not expose project-local web servers to a remote web client.
This is especially limiting when the T3 server is on another machine: a preview target such as localhost:3000 refers to the environment machine, not the user's browser machine, and may be unreachable from app.t3.codes or a remotely served client.
Proposed solution
Add an authenticated, environment-scoped preview gateway to the T3 server. The web client could load a selected discovered preview target through a same-origin server route inside the existing Browser panel.
The gateway should proxy only an explicitly selected target belonging to the current environment and should reuse the existing preview target discovery and authorization model. This proposal is for displaying environment-hosted web apps; it does not require launching Chromium on the server or adding browser automation.
Why this matters
Remote-ready workflows are a core part of T3 Code. Users connected through served web currently lose a major feedback loop: they can run a development server through an agent but cannot view it in T3 unless they separately expose that port or switch to the desktop client.
Smallest useful scope
A first version only needs:
Alternatives considered
Risks or tradeoffs
A proxy can become an SSRF or credential-exposure boundary if targets are not tightly constrained. The design needs explicit rules for allowed hosts and ports, authentication, authorization per environment, redirects, cookies, origin and host rewriting, CSP and frame headers, WebSocket upgrades, response size limits, and cleanup when a target disappears.
Some applications assume a particular origin or use absolute URLs, so compatibility will not be universal without additional rewriting.
Examples or references
Contribution
All reactions