[Feature]: Add an authenticated browser preview gateway for served web #6847
tastelessjolt
started this conversation in
Ideas
Replies: 3 comments
|
this would be lovely |
0 replies
|
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. |
0 replies
|
Would love this! Would solve a lot of my problems! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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