refactor(web): simplify Render demo setup

This commit is contained in:
Shivam Sharma committed 2026-08-05 08:36:48 +05:30
1 parent 0ccd1c0ce8
commit d1784e4212
2 files changed
+20 -35

No files matched your search

@@ -25,9 +25,6 @@ import { searchableSetting } from "./settingsSearch";
const RENDER_DEPLOY_URL =
"https://dashboard.render.com/blueprint/new?repo=https%3A%2F%2Fgithub.com%2Fpingdotgg%2Ft3code&branch=feat%2Frender-cloud-environment";
const CODEX_LOGIN_COMMAND = "codex login --device-auth";
const GITHUB_LOGIN_COMMAND = "gh auth login --web --git-protocol https";
const SHARE_ACCESS_COMMAND =
'node /app/apps/server/dist/bin.mjs auth pairing create --base-dir /data/t3 --label "Shared Render access" --ttl 24h --json | T3CODE_PUBLIC_URL="$RENDER_EXTERNAL_URL" node /app/infra/render/pair-url.mjs';
function pairingInput(value: string): { readonly host: string; readonly pairingCode: string } {
const url = new URL(value.trim());
@@ -120,6 +117,9 @@ export function CloudEnvironmentsSettings() {
() => environments.filter((environment) => cloudEnvironmentProvider(environment) === "render"),
[environments],
);
const hasConnectedRenderEnvironment = renderEnvironments.some(
(environment) => environment.connection.phase === "connected",
);
const reportFailure = useCallback((title: string, description: string) => {
toastManager.add(stackedThreadToast({ type: "error", title, description }));
@@ -238,17 +238,18 @@ export function CloudEnvironmentsSettings() {
<CopyCommand command={CODEX_LOGIN_COMMAND} />
</SettingsRow>
<SettingsRow
title="Private GitHub repositories"
description="Run in the Render Shell, or set GH_TOKEN in Render. Public URLs need nothing."
>
<CopyCommand command={GITHUB_LOGIN_COMMAND} />
</SettingsRow>
<SettingsRow
title="Give someone access"
description="Run in the Render Shell and send the new one-time Pair URL to that person."
>
<CopyCommand command={SHARE_ACCESS_COMMAND} />
</SettingsRow>
title="Get the code"
description="Choose the Render environment and paste any public GitHub URL. It clones directly into the cloud workspace."
control={
<Button
size="sm"
disabled={!hasConnectedRenderEnvironment}
onClick={() => openCommandPalette({ open: "add-project" })}
>
Add project
</Button>
}
/>
</SettingsSection>
</SettingsPageContainer>
);
+5 -21
View File
@@ -4,9 +4,8 @@ This experimental setup runs one T3 Code environment as a Render web service. Th
the provider processes, repositories, worktrees, terminals, and T3 Code state. The web, desktop, and
mobile clients connect to it over Render's public HTTPS and WebSocket endpoint.
This is one shared environment, not a multi-tenant hosted service. Multiple trusted people can pair
to it and run agent threads concurrently. The attached persistent disk limits the service to one
instance.
This is a demo environment, not a multi-tenant hosted service. The attached persistent disk limits
the service to one instance. Multiple agent threads can still run concurrently inside that instance.
## What the Blueprint Creates
@@ -24,11 +23,10 @@ The root [`render.yaml`](../../render.yaml) creates:
4. Open the service logs and copy the `Pair URL` printed during startup. Treat this URL like a
password: it contains a one-time pairing credential.
5. Open the URL in a browser, or paste it under **Settings → Cloud environments → Pair URL**.
6. Authenticate a provider and source control as described below.
6. Authenticate Codex as described below.
7. Open the Command Palette and choose **Add Project → Cloud environments → Render cloud
environment**. Select a GitHub repository, another supported source-control repository, or any
Git URL. T3 Code clones it directly into the Render workspace; there is no local destination
picker.
environment**. Paste a public GitHub URL. T3 Code clones it directly into the Render workspace;
there is no local destination picker.
Repositories are selected after pairing rather than baked into the Blueprint. Each clone is stored
under `/data/workspace` and survives deploys. This keeps the public deployment configuration generic
@@ -54,18 +52,6 @@ Follow the printed link and enter the device code. `CODEX_HOME` points at the pe
provider session survives service restarts. Claude Code is installed too; use its normal subscription
login flow from a Render Shell. `CLAUDE_CONFIG_DIR` is persisted as well.
## Source-control Authentication
Public repositories can be cloned by URL without authentication. For private GitHub repositories,
add a short-lived, repository-scoped `GH_TOKEN` secret in the Render service environment. Grant only
the access needed for the workflow: read access to clone, or repository contents and pull-request
write access to push branches and open pull requests. The startup script configures Git to use the
token when the service restarts.
Open **Settings → Source Control** and rescan to confirm that GitHub is authenticated. Then use
**Add Project → GitHub repository** to choose the repository. Never commit a token to the Blueprint
or paste one into a project URL.
## T3 Connect
T3 Connect is not required for this deployment. Render already gives the environment a public HTTPS
@@ -77,8 +63,6 @@ machines that need its managed tunnel or account-level environment discovery.
- Each deploy prints a fresh pairing URL with a 24-hour lifetime. Existing paired browser sessions
remain authenticated until revoked with `t3 auth`.
- To share the environment, use the copyable command under **Settings → Cloud environments → Give
someone access** and send that person the new one-time Pair URL.
- Render terminates the previous instance before starting a new one because the service has a disk.
Expect a short interruption during deploys.
- Do not use this Blueprint for untrusted users or repositories. Coding agents can execute commands