diff --git a/README.md b/README.md
index 78a6acc..e84be57 100644
--- a/README.md
+++ b/README.md
@@ -69,8 +69,8 @@ gh attestation verify "${VMBRIDGE_INSTALL_DIR:-$HOME/.local/bin}/vmbridge" --rep
1. Run `vmbridge` and open one of the setup links it prints.
2. Choose a dashboard password, add a provider, sign in your agents and choose whether to bring your
- skills and instructions. GitHub is under **Setup** in the dashboard.
-3. Under **Devices**, create a pairing link and paste it into T3 Code as a remote environment.
+ skills and instructions. GitHub is under **Accounts** in the dashboard.
+3. Under **Settings**, **Devices**, create a pairing link and paste it into T3 Code as a remote environment.
Start a thread in T3 Code and VM Bridge brings up a VM for it.
diff --git a/apps/landing/app/docs/page.tsx b/apps/landing/app/docs/page.tsx
index 199e4db..5fcdc8e 100644
--- a/apps/landing/app/docs/page.tsx
+++ b/apps/landing/app/docs/page.tsx
@@ -293,7 +293,7 @@ bun run compile # dist/vmbridge
- Open /dashboard on any address VM Bridge printed and log in with your password. Setup has three tabs.
+ Open /dashboard on any address VM Bridge printed and log in with your password. Accounts has three tabs.
- Under Devices, name the device and create a pairing link. In T3 Code, add a remote environment and paste the link.
+ Under Settings, Devices, name the device and create a pairing link. In T3 Code, add a remote environment and paste the link.
@@ -437,7 +437,7 @@ bun run compile # dist/vmbridge
- Agents and git sign in only with what you add in Setup, never with sign-ins from the VM provider. Each agent sign-in is a profile saved, encrypted, in{" "}
+ Agents and git sign in only with what you add in Accounts, never with sign-ins from the VM provider. Each agent sign-in is a profile saved, encrypted, in{" "}
~/.vmbridge/main.db. Each agent uses one profile at a time, and VMs get it when they start.
entry !== id);
settings.set("providers", remaining);
- // Its base snapshots are billed until deleted, so a failure stays on the provider in Setup.
+ // Its base snapshots are billed until deleted, so a failure stays on the provider in Accounts.
void fleet.bases.drop(id).catch((error) =>
this.deps.traffic.record({ kind: "provider", operation: "remove provider", provider: id, status: "error", reason: message(error) }),
);
diff --git a/apps/server/src/analytics.ts b/apps/server/src/analytics.ts
index 4f5cf57..1aec4e7 100644
--- a/apps/server/src/analytics.ts
+++ b/apps/server/src/analytics.ts
@@ -68,7 +68,7 @@ const add = (a: Estimate, b: Estimate): Estimate => ({ amount: a.amount + b.amou
/**
* VM time, spend, lifecycle, turns and errors from `from` to `until` (which ends at `now` at the latest), by day in
- * `timeZone` where it helps. Time and spend come from `usage`, so they match the Costs page.
+ * `timeZone` where it helps. Time and spend come from `usage`, so they match the Costs tab.
*/
export function analyticsReport(store: Store, usage: Usage, from: number, until: number, timeZone: string, now = Date.now()): AnalyticsReport {
const to = Math.min(until, now);
diff --git a/apps/server/src/budget.ts b/apps/server/src/budget.ts
index 78c44a0..69a7c20 100644
--- a/apps/server/src/budget.ts
+++ b/apps/server/src/budget.ts
@@ -20,7 +20,7 @@ const dollars = (amount: number) => `$${amount.toFixed(2)}`;
export class BudgetReached extends Error {}
/**
- * One monthly budget for all providers, checked against the same estimate the Costs page shows. It never stops or
+ * One monthly budget for all providers, checked against the same estimate the Usage page's Costs tab shows. It never stops or
* deletes anything: at the limit, early wakes stop, and with `stopAtLimit` on, new VMs and wakes are refused too.
*/
export class Budget {
@@ -53,7 +53,7 @@ export class Budget {
refusal(now = Date.now()): string | null {
const status = this.status(now);
if (status.level !== "over" || !status.stopAtLimit || status.monthlyUsd === null) return null;
- return `VM Bridge reached this month's budget of ${dollars(status.monthlyUsd)}, so it is not starting or waking VMs. Raise the budget on the Costs page of the VM Bridge dashboard.`;
+ return `VM Bridge reached this month's budget of ${dollars(status.monthlyUsd)}, so it is not starting or waking VMs. Raise the budget on the Usage page of the VM Bridge dashboard.`;
}
/** Early wakes are only a guess that a message follows, so they stop at the limit even without `stopAtLimit`. */
diff --git a/apps/server/src/fleet.ts b/apps/server/src/fleet.ts
index f9fed79..4e1054a 100644
--- a/apps/server/src/fleet.ts
+++ b/apps/server/src/fleet.ts
@@ -248,7 +248,7 @@ export class Fleet extends EventEmitter {
async create(choice: { provider?: ProviderId; size?: VmSize; discardOnError?: boolean } = {}): Promise {
this.refuse();
const provider = choice.provider ?? this.available();
- if (!this.settings.get("providers").includes(provider)) throw new Error(`Add ${providers[provider].label} in Setup first.`);
+ if (!this.settings.get("providers").includes(provider)) throw new Error(`Add ${providers[provider].label} in Accounts first.`);
if (this.settingUp(provider)) throw new SettingUp(provider);
const driver = this.driver(provider);
const id = shortId();
@@ -942,7 +942,7 @@ fi`,
)
.finally(() => {
this.reconciling.delete(provider);
- // The provider's flag in Setup comes with the overview.
+ // The provider's flag in Accounts comes with the overview.
this.emit("changed");
});
this.reconciling.set(provider, flight);
diff --git a/apps/server/src/settings.ts b/apps/server/src/settings.ts
index 5c261b4..93b23f1 100644
--- a/apps/server/src/settings.ts
+++ b/apps/server/src/settings.ts
@@ -15,7 +15,7 @@ interface SettingValues {
onboarded: boolean;
/** The name T3 shows for this machine. */
machineName: string;
- /** Providers added in Setup, in order. VMs on a removed provider keep running but get no new VMs beside them. */
+ /** Providers added in Accounts, in order. VMs on a removed provider keep running but get no new VMs beside them. */
providers: ProviderId[];
/** One of `providers`. New VMs go here unless a repository rule picks another. */
defaultProvider: ProviderId | null;
diff --git a/apps/server/src/vm/bases.ts b/apps/server/src/vm/bases.ts
index 561d866..d979913 100644
--- a/apps/server/src/vm/bases.ts
+++ b/apps/server/src/vm/bases.ts
@@ -270,7 +270,7 @@ const tookTooLong = `Setup took longer than ${baseSetupLimitMs / 60_000} minutes
/** Why a build failed, short enough to show next to a provider. */
function failureReason(provider: ProviderId, error: unknown) {
// A key that was rotated or revoked fails every build, and the provider's HTTP error does not say what to do.
- if (error instanceof SandboxError && error.code === "auth") return `${providers[provider].label} refused the API key. Enter a new one in Setup.`;
+ if (error instanceof SandboxError && error.code === "auth") return `${providers[provider].label} refused the API key. Enter a new one in Accounts.`;
const line = (error instanceof Error ? error.message : String(error)).trim().split("\n")[0] ?? "";
if (!line) return "The build failed.";
return line.length > 200 ? `${line.slice(0, 197)}...` : line;
diff --git a/apps/server/test/analytics.test.ts b/apps/server/test/analytics.test.ts
index 2701979..af978a3 100644
--- a/apps/server/test/analytics.test.ts
+++ b/apps/server/test/analytics.test.ts
@@ -80,7 +80,7 @@ describe("report", () => {
const boxd = pricing("boxd");
const boxdDay = (boxd.runningHourly.medium + 23 * boxd.asleepHourly.medium!) * eurUsd.rate;
expect(days[1]!.providers[1]!.estimate.amount).toBeCloseTo(boxdDay, 6);
- // Matches what the Costs page totals, in US dollars.
+ // Matches what the Costs tab totals, in US dollars.
expect(total.amount).toBeCloseTo(4 * 0.036 + boxdDay, 6);
});
diff --git a/apps/server/test/bases.test.ts b/apps/server/test/bases.test.ts
index 21fe770..5d3ebab 100644
--- a/apps/server/test/bases.test.ts
+++ b/apps/server/test/bases.test.ts
@@ -341,7 +341,7 @@ describe("setting up a provider", () => {
fleet.prepareBase("boxd");
await fleet.bases.settled();
// A rotated or revoked key: the reason says what to do, not the HTTP error.
- expect(fleet.setup("boxd")).toEqual({ state: "failed", reason: "boxd refused the API key. Enter a new one in Setup." });
+ expect(fleet.setup("boxd")).toEqual({ state: "failed", reason: "boxd refused the API key. Enter a new one in Accounts." });
driver.create = create;
fleet.prepareBase("boxd", true);
await fleet.bases.settled();
@@ -351,7 +351,7 @@ describe("setting up a provider", () => {
}
expect(logs).toEqual([
"[base boxd:medium] build started",
- expect.stringMatching(/^\[base boxd:medium\] build failed after \d+ s: boxd refused the API key\. Enter a new one in Setup\.$/),
+ expect.stringMatching(/^\[base boxd:medium\] build failed after \d+ s: boxd refused the API key\. Enter a new one in Accounts\.$/),
"[base boxd:medium] build started",
expect.stringMatching(/^\[base boxd:medium\] ready in \d+ s$/),
]);
diff --git a/apps/server/test/budget.test.ts b/apps/server/test/budget.test.ts
index cf3dafd..31e104a 100644
--- a/apps/server/test/budget.test.ts
+++ b/apps/server/test/budget.test.ts
@@ -57,7 +57,7 @@ describe("monthly budget", () => {
expect(setup(hoursFor(0.9), { monthlyUsd: 1, stopAtLimit: true }).budget.refusal(at)).toBeNull();
const refusal = setup(hoursFor(1.1), { monthlyUsd: 1, stopAtLimit: true }).budget.refusal(at);
expect(refusal).toContain("budget of $1.00");
- expect(refusal).toContain("Costs page of the VM Bridge dashboard");
+ expect(refusal).toContain("Usage page of the VM Bridge dashboard");
});
test("early wakes stop at 100% even with the setting off", () => {
diff --git a/apps/server/test/placement.test.ts b/apps/server/test/placement.test.ts
index 8da4219..fbc076c 100644
--- a/apps/server/test/placement.test.ts
+++ b/apps/server/test/placement.test.ts
@@ -47,7 +47,7 @@ describe("where a new VM goes", () => {
test("a VM can only be created on an added provider", async () => {
const { fleet } = setup();
- await expect(fleet.create({ provider: "daytona" })).rejects.toThrow("Add Daytona in Setup first.");
+ await expect(fleet.create({ provider: "daytona" })).rejects.toThrow("Add Daytona in Accounts first.");
});
});
diff --git a/apps/web/src/Setup.tsx b/apps/web/src/Accounts.tsx
similarity index 99%
rename from apps/web/src/Setup.tsx
rename to apps/web/src/Accounts.tsx
index 665e9aa..9337f7a 100644
--- a/apps/web/src/Setup.tsx
+++ b/apps/web/src/Accounts.tsx
@@ -18,20 +18,20 @@ import { CopyButton } from "./CopyButton.tsx";
import { Page, Section, type Tab } from "./Page.tsx";
import { Private } from "./Private.tsx";
-type SetupTab = "provider" | "github" | "agents";
+type AccountsTab = "provider" | "github" | "agents";
const sleepModes = { pause: "Pauses: memory and disk kept", stop: "Stops: disk kept", checkpoint: "Checkpoints: disk kept, new sandbox on wake" };
-export function Setup({ overview }: { overview: Overview }) {
- const tabs: Tab[] = [
+export function Accounts({ overview }: { overview: Overview }) {
+ const tabs: Tab[] = [
{ id: "provider", label: "Providers", icon: Plug01Icon, attention: !overview.setup.provider },
{ id: "github", label: "GitHub", icon: GithubIcon, attention: !overview.setup.github },
{ id: "agents", label: "Agent sign-in", icon: Robot01Icon, attention: !overview.setup.agents },
];
const [tab, setTab] = useQueryState("tab", parseAsStringLiteral(tabs.map((entry) => entry.id)).withDefault(overview.setup.provider ? "agents" : "provider"));
return (
-
+
{tab === "provider" && }
{tab === "github" && }
{tab === "agents" && }
diff --git a/apps/web/src/Analytics.tsx b/apps/web/src/Analytics.tsx
index 6c548b3..9de9021 100644
--- a/apps/web/src/Analytics.tsx
+++ b/apps/web/src/Analytics.tsx
@@ -2,15 +2,13 @@ import { useEffect, useState, type ReactNode } from "react";
import { HugeiconsIcon } from "@hugeicons/react";
import { Analytics01Icon } from "@hugeicons/core-free-icons";
import { agentKinds, providerIds, type AnalyticsDay, type AnalyticsReport, type Overview, type ProviderActivity, type ProviderId } from "@vmbridge/contracts";
-import { Button } from "@/components/ui/button";
-import { ButtonGroup } from "@/components/ui/button-group";
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty";
import { FieldError } from "@/components/ui/field";
import { cn } from "@/lib/utils";
import { api, useTick } from "./api.ts";
import { AgentLogo, ProviderLogo } from "./brand.tsx";
-import { Bars, days, hours, money, rangeStart, ranges, Rows, Tile, type Range } from "./Costs.tsx";
-import { Page, Section } from "./Page.tsx";
+import { Bars, days, hours, money, rangeStart, Rows, Tile, type Range } from "./Costs.tsx";
+import { Section } from "./Page.tsx";
/** One fixed color per provider, so a provider keeps its color in every chart and range. */
const providerColors: Record = {
@@ -26,8 +24,7 @@ const providerColors: Record = {
};
const otherColor = "#5c5c5c";
-export function Analytics({ overview }: { overview: Overview }) {
- const [range, setRange] = useState("month");
+export function Analytics({ overview, range }: { overview: Overview; range: Range }) {
const [report, setReport] = useState(null);
const [error, setError] = useState(null);
// Awake time adds up while the page is open, and a VM waking or sleeping changes it.
@@ -49,22 +46,10 @@ export function Analytics({ overview }: { overview: Overview }) {
const label = (id: ProviderId) => overview.providers.find((provider) => provider.id === id)?.label ?? id[0]!.toUpperCase() + id.slice(1);
return (
-
- {ranges.map((entry) => (
-
- ))}
-
- }
- >
+ <>
{error && {error}}
{report && }
-
+ >
);
}
diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx
index 2f93a96..b40e056 100644
--- a/apps/web/src/App.tsx
+++ b/apps/web/src/App.tsx
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { flushSync } from "react-dom";
import { parseAsString, parseAsStringLiteral, useQueryStates } from "nuqs";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
-import { Analytics01Icon, Coins01Icon, File01Icon, FlowConnectionIcon, LaptopIcon, Logout01Icon, MagicWand01Icon, Plug01Icon, Settings01Icon } from "@hugeicons/core-free-icons";
+import { Analytics01Icon, File01Icon, FlowConnectionIcon, Logout01Icon, MagicWand01Icon, Settings01Icon, UserAccountIcon } from "@hugeicons/core-free-icons";
import { Button } from "@/components/ui/button";
import { Field, FieldError, FieldGroup, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
@@ -13,35 +13,42 @@ import { failingDevices, sinceText } from "@/lib/devices";
import { cn } from "@/lib/utils";
import { api, onLoggedOut, useLive, useTick } from "./api.ts";
import { Logo } from "./brand.tsx";
-import { Analytics } from "./Analytics.tsx";
+import { Accounts } from "./Accounts.tsx";
import { Canvas } from "./Canvas.tsx";
import { BudgetBanner } from "./Budget.tsx";
-import { Costs } from "./Costs.tsx";
-import { Devices } from "./Devices.tsx";
import { Logs } from "./Logs.tsx";
import { boxStyle, NavIndicator, useSlidingNav } from "./nav.tsx";
import { Onboarding } from "./Onboarding.tsx";
-import { Settings } from "./Settings.tsx";
-import { Setup } from "./Setup.tsx";
+import { Settings, type SettingsTab } from "./Settings.tsx";
import { Skills } from "./Skills.tsx";
+import { Usage, type UsageTab } from "./Usage.tsx";
const views = [
{ id: "canvas", label: "Canvas", icon: FlowConnectionIcon },
{ id: "logs", label: "Logs", icon: File01Icon },
- { id: "costs", label: "Costs", icon: Coins01Icon },
- { id: "analytics", label: "Analytics", icon: Analytics01Icon },
- { id: "setup", label: "Setup", icon: Plug01Icon },
+ { id: "usage", label: "Usage", icon: Analytics01Icon },
+ { id: "accounts", label: "Accounts", icon: UserAccountIcon },
{ id: "skills", label: "Skills", icon: MagicWand01Icon },
- { id: "devices", label: "Devices", icon: LaptopIcon },
{ id: "settings", label: "Settings", icon: Settings01Icon },
] as const satisfies readonly { id: string; label: string; icon: IconSvgElement }[];
type View = (typeof views)[number]["id"];
-/** The view and its page's tab live in the URL so a reload keeps your place. A new view starts on its first tab. */
+/** Tabs that other pages link straight to. */
+interface ViewTabs {
+ usage: UsageTab;
+ settings: SettingsTab;
+}
+
+type Place = { [V in View]: { view: V; tab?: V extends keyof ViewTabs ? ViewTabs[V] : never } }[View];
+
+/**
+ * The view and its page's tab live in the URL so a reload keeps your place. A new view starts on its first tab unless the link names one.
+ * Links from before pages were merged are rewritten in main.tsx.
+ */
function useView() {
- const [{ view }, setUrl] = useQueryStates({ view: parseAsStringLiteral(views.map((entry) => entry.id)), tab: parseAsString });
- return [view, (next: View) => void setUrl({ view: next, tab: null })] as const;
+ const [{ view, tab }, setUrl] = useQueryStates({ view: parseAsStringLiteral(views.map((entry) => entry.id)), tab: parseAsString });
+ return [view, tab, (next: Place) => void setUrl({ view: next.view, tab: next.tab ?? null })] as const;
}
interface AuthState {
@@ -115,12 +122,12 @@ function Login({ onLoggedIn }: { onLoggedIn: () => void }) {
function Dashboard({ onLoggedOut }: { onLoggedOut: () => void }) {
const { overview, traffic, online } = useLive();
- const [chosen, go] = useView();
- const view: View = chosen ?? (overview && !overview.setup.provider ? "setup" : "canvas");
+ const [chosen, tab, go] = useView();
+ const view: View = chosen ?? (overview && !overview.setup.provider ? "accounts" : "canvas");
const setupDone = overview && overview.setup.provider && overview.setup.github && overview.setup.agents;
const current = views.find((entry) => entry.id === view)!;
const now = useTick(30_000);
- // Only failures: a device that is just away, such as a closed laptop, shows on the Devices page.
+ // Only failures: a device that is just away, such as a closed laptop, shows on the Devices tab.
const failing = overview ? failingDevices(overview.clients, traffic, now) : [];
const trouble = overview?.connectTrouble ?? null;
@@ -137,13 +144,13 @@ function Dashboard({ onLoggedOut }: { onLoggedOut: () => void }) {
{online ? "Live" : "Reconnecting"}
- {overview && go("costs")} />}
+ {overview && go({ view: "usage", tab: "costs" })} />}
go({ view: next })}
onLogOut={() => void api("/logout", { body: {} }).finally(onLoggedOut)}
/>
@@ -153,12 +160,12 @@ function Dashboard({ onLoggedOut }: { onLoggedOut: () => void }) {
T3 Code reached VM Bridge {trouble.reads} times since {sinceText(trouble.since, now)} but could not connect.
-