Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Settings: a Devices page with a map of every device, Add a device, and Tailscale on the map (#7150)

Milind Soni78b6e5e49786
diff --git a/apps/docs/content/docs/computers/index.mdx b/apps/docs/content/docs/computers/index.mdx
index 1def4ef3c3..ed1774582c 100644
--- a/apps/docs/content/docs/computers/index.mdx
+++ b/apps/docs/content/docs/computers/index.mdx
@@ -50,3 +50,47 @@ In the built-in browser (and in My Chrome) a bot can also sign in with a login y
<Callout type="warn" title="Preview is not permission">
Starting a screen preview does not grant the bot control. Local input requires a separate opt-in and remains subject to the computer-use safety boundary.
</Callout>
+
+## See all your devices
+
+**Settings → Devices** draws every device connected to the place you have open, on one small map. The place is at the top. Every other device hangs off a line named for how it connects:
+
+- **Same network**: a phone on the same Wi-Fi.
+- **Private network**: anything that reaches this computer over Tailscale. It is drawn as a group of its own, with Tailscale's state.
+- **Through MausBot**: a phone using the relay.
+- **MausBot Cloud**: the Cloud, or devices signed in to it.
+- **Internet**: a server of your own at a public address.
+- **Signed in**: a browser or device paired with a code.
+- **SSH**: a server your bots work on.
+
+Each device shows whether it is online, when it was last seen, or the one thing it needs: **Update it**, **Pair it again** or **Can't reach it**. Choose a device to see its details and the actions that already exist for it:
+
+- Switch to it.
+- Try now.
+- Pair again.
+- Copy its address.
+- Copy the update command for that install.
+- Remove it.
+- Manage it on its own settings page.
+
+**Add a device** takes each kind into the flow it already has:
+
+- **Phone** opens Pair a phone.
+- **Computer** makes a pairing link over your private network. It shows the link and code, and says when the other computer has connected. A Cloud's page says to sign in on the other computer instead.
+- **Your own server** gives you one line to run on that machine. `npx openmausbot account login && npx openmausbot serve --tunnel` makes it reachable from anywhere; `npx openmausbot serve --tailscale` keeps it on your private network. Then **Paste the link it shows**.
+- **Cloud** opens Get a Cloud.
+
+### Private network (Tailscale)
+
+MausBot only asks Tailscale about this computer when you press **Set up** or **Check again**. After that, it checks again each time you come back to the window. Each state has one next step:
+
+| Map says | Next step |
+|---|---|
+| Not set up | **Set up**: checks Tailscale and lets your other computers on it connect here |
+| Not installed | **Get Tailscale** for your system, then sign in |
+| Signed out, Not running | Open Tailscale and sign in, then **Check again** |
+| Waiting for approval | Approve this computer in the Tailscale admin console, then **Check again** |
+| Needs MagicDNS | Turn on MagicDNS in Tailscale, then **Check again** |
+| On | **Add a computer** |
+
+MausBot never installs Tailscale, signs you in, or changes your tailnet.
diff --git a/devices-preview.html b/devices-preview.html
new file mode 100644
index 0000000000..0c7b915bac
--- /dev/null
+++ b/devices-preview.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Devices Preview</title>
+ </head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="/src/devices-preview.tsx"></script>
+ </body>
+</html>
diff --git a/electron/preload.cjs b/electron/preload.cjs
index 2a399926ab..d078c66ba4 100644
--- a/electron/preload.cjs
+++ b/electron/preload.cjs
@@ -50,7 +50,7 @@ ipcRenderer.on("desktop-notifications:open", (_event, target) => {
// Only fixed actions are retained, never a destination supplied by a renderer.
const FIXED_SETTINGS_ACTIONS = new Set(["organization", "cloud", "cloud-settings", "cloud-add", "cloud-add-howto",
- "overview", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data", "people", "installations", "account", "plan", "app", "general", "appearance"]);
+ "overview", "devices", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data", "people", "installations", "account", "plan", "app", "general", "appearance"]);
let pendingSettingsAction = null;
const appSettingsListeners = new Set();
ipcRenderer.on("app:open-settings", (_event, section) => {
diff --git a/shared/settings-places.ts b/shared/settings-places.ts
index 93fc3d1385..4c649500eb 100644
--- a/shared/settings-places.ts
+++ b/shared/settings-places.ts
@@ -15,6 +15,7 @@ export const SETTINGS_HOW_TO_OPEN = "Settings opens from the menu under the pers
export const SETTINGS_PLACES = [
{"id":"page:overview","path":"Settings → (the place's own name, at the top)","words":["overview","place","status","version","domain","address","sidebar"]},
+ {"id":"page:devices","path":"Settings → Devices","words":["devices","my devices","all devices","device map","map","computers","laptops","servers","mac mini","vps","cloud","private network","tailnet","add a device","add device"]},
{"id":"page:phone","path":"Settings → Phone & devices","words":["phone","pair","pairing","qr","code","iphone","android","mobile","tablet","device","devices","wifi","wi-fi","anywhere","relay","remote","companion","tailscale","connect your phone","get the phone app","pair a device","this server","remote access"]},
{"id":"page:ai","path":"Settings → AI","words":["ai","models","model providers","providers","engines","api keys","keys","key","claude","codex","openai","anthropic","ollama","lm studio","local model"]},
{"id":"page:bots","path":"Settings → You and your bots","words":["all bots","bots","about you","about me","profile","new bots","defaults","effort","limits","rules"],"advanced":true},
@@ -30,6 +31,8 @@ export const SETTINGS_PLACES = [
{"id":"page:app","path":"Settings → This app","words":["this app","updates","update","version","help","about","servers","your computers","environments","diagnostics","logs","tour"]},
{"id":"page:general","path":"Settings → General","words":["general","language","typing","send","enter","notifications","sounds","startup","login","analytics","privacy","talk"],"advanced":true},
{"id":"page:appearance","path":"Settings → Appearance","words":["appearance","theme","skin","looks","dark mode","light mode","font","chat width","layout","threads","pins"]},
+ {"id":"add-device","path":"Settings → Devices → Add a device","words":["add a device","add device","new device","add a computer","add a server","add a phone","connect a device"]},
+ {"id":"private-network","path":"Settings → Devices → Private network","words":["tailscale","tailnet","private network","vpn"],"only":"the desktop app, on this computer's own page"},
{"id":"pair","path":"Settings → Phone & devices → Pair a phone","words":["phone","pair","pairing","qr","iphone","android","this server","pair a device","connect your phone","code","mobile","tablet","companion","get the phone app"]},
{"id":"paired","path":"Settings → Phone & devices → Paired","words":["devices","remove","revoke","pair again"]},
{"id":"wifi","path":"Settings → Phone & devices → How your phone reaches this computer → Same Wi-Fi","words":["wifi","wi-fi","lan","local network"],"only":"the desktop app, on this computer's own page"},
diff --git a/src/components/devices/AddDeviceDialog.tsx b/src/components/devices/AddDeviceDialog.tsx
new file mode 100644
index 0000000000..812e235e39
--- /dev/null
+++ b/src/components/devices/AddDeviceDialog.tsx
@@ -0,0 +1,272 @@
+import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
+import { QRCodeSVG } from "qrcode.react";
+import { Check, ChevronLeft, Cloud, Laptop, Loader2, Server, Smartphone } from "lucide-react";
+import { productName } from "@/lib/brand";
+import { cn } from "@/lib/cn";
+import { useCopyFeedback } from "@/lib/copy-text";
+import { t } from "@/lib/i18n";
+import { readMembership } from "@/lib/membership";
+import { codeUntil } from "@/lib/pairing-time";
+import type { PrivateNetwork } from "@/lib/devices";
+import type { SessionState } from "@/lib/session";
+import { readSharedSessionState } from "@/lib/shared-session";
+import { api } from "@/state/api";
+import { useStoreSelector } from "@/state/store-select";
+import { canPairDevices, computerLink, pairingBlockedReason, type PairingOffer } from "../ServerPairingCard";
+import { SettingsDialog } from "../settings/SettingsDialog";
+import { TeamPhoneCard } from "../TeamPhoneCard";
+import { networkLine } from "./device-words";
+import type { NetworkAction } from "./DeviceMap";
+
+export type AddKind = "phone" | "computer" | "server" | "cloud";
+
+/** One copyable line to run on a new server: the sign-in a tunnel needs, then the server, in one go. */
+export const SERVER_COMMANDS = {
+ anywhere: "npx openmausbot account login && npx openmausbot serve --tunnel",
+ tailscale: "npx openmausbot serve --tailscale",
+} as const;
+
+/** How often an open code checks whether a device has used it. */
+export const PAIR_WATCH_MS = 2_000;
+
+function CommandRow({ label, command }: { label: string; command: string }) {
+ const { state, copy } = useCopyFeedback(command);
+ return (
+ <div className="flex flex-col gap-1">
+ <span className="text-[12px] leading-4 text-ink-secondary">{label}</span>
+ <div className="flex min-w-0 items-center gap-2 rounded-lg bg-ink/[0.05] px-3 py-2">
+ <code data-server-command="" className="min-w-0 flex-1 select-text break-all font-mono text-[12px] leading-4 text-ink">{command}</code>
+ <button type="button" onClick={copy} className="shrink-0 cursor-pointer text-[12px] font-medium leading-4 text-accent-text hover:underline">
+ {t(state === "copied" ? "connect.copied" : "connect.copy")}
+ </button>
+ </div>
+ </div>
+ );
+}
+
+function Waiting({ connected }: { connected: string | null }) {
+ return connected
+ ? <p role="status" data-pair-state="connected" className="flex items-center gap-2 text-[13px] leading-[18px] text-ink"><Check size={14} aria-hidden="true" className="text-success" />{t("devicesPage.addFlow.connected", { name: connected })}</p>
+ : <p role="status" data-pair-state="waiting" className="flex items-center gap-2 text-[13px] leading-[18px] text-ink-secondary"><Loader2 size={14} aria-hidden="true" className="motion-safe:animate-spin" />{t("devicesPage.addFlow.waiting")}</p>;
+}
+
+/**
+ * A pairing code for another device, from the same endpoint and with the same gates as Phone & devices: only the owner
+ * or an admin may make one, never a chat-only session, a team member or a place whose organization turned remote access
+ * off. It watches the signed-in devices until one more appears, and cancels a code still unused when it closes.
+ */
+export function PairCodePanel({ kind, address, onConnected }: { kind: "phone" | "computer"; address: string | null; onConnected: () => void }) {
+ const config = useStoreSelector((state) => state.config);
+ const [session, setSession] = useState<SessionState | null>(null);
+ const [pairingCodes, setPairingCodes] = useState<boolean | null>(null);
+ const [offer, setOffer] = useState<PairingOffer | null>(null);
+ const [error, setError] = useState<string | null>(null);
+ const [connected, setConnected] = useState<string | null>(null);
+ const [now, setNow] = useState(() => Date.now());
+ const known = useRef<Set<string> | null>(null);
+ const open = useRef<PairingOffer | null>(null);
+ const policyBlocked = config?.managedPolicy?.remoteAccess === false ? t("policy.remoteBlocked", { organization: config.managedPolicy.organizationName }) : null;
+ const allowed = canPairDevices(session) && pairingCodes === true && !policyBlocked && !(session?.kind === "session" && session.team);
+
+ useEffect(() => {
+ let alive = true;
+ void readSharedSessionState().then((state) => {
+ if (!alive) return;
+ setSession(state);
+ if (canPairDevices(state)) void api("/api/config").then((body) => { if (alive) setPairingCodes(readMembership(body).pairingCodes); }).catch(() => { if (alive) setPairingCodes(false); });
+ });
+ return () => { alive = false; };
+ }, []);
+
+ const create = useCallback(async () => {
+ setError(null);
+ setConnected(null);
+ try {
+ const before = await api<{ sessions?: Array<{ id: string }> }>("/api/auth/sessions");
+ known.current = new Set((before.sessions ?? []).map((one) => one.id));
+ const body = await api<PairingOffer>("/api/auth/pairing", { method: "POST", body: JSON.stringify({ scopes: ["admin", "client"] }) });
+ open.current = body;
+ setOffer(body);
+ setNow(Date.now());
+ } catch (cause) {
+ setError(t("remote.serverPairing.error", { error: cause instanceof Error ? cause.message : String(cause) }));
+ }
+ }, []);
+
+ useEffect(() => {
+ if (allowed) void create();
+ }, [allowed, create]);
+
+ useEffect(() => {
+ if (!offer || connected) return;
+ const timer = window.setInterval(() => {
+ setNow(Date.now());
+ void Promise.all([
+ api<{ sessions?: Array<{ id: string; label: string; person?: string }> }>("/api/auth/sessions", { background: true }),
+ api<{ pairings?: Array<{ id: string }> }>("/api/auth/pairing", { background: true }),
+ ]).then(([body, codes]) => {
+ // Another device signing in meanwhile is not this one: while this code is still open, every session is known.
+ if ((codes.pairings ?? []).some((pairing) => pairing.id === offer.id)) {
+ known.current = new Set([...(known.current ?? []), ...(body.sessions ?? []).map((one) => one.id)]);
+ return;
+ }
+ const fresh = (body.sessions ?? []).find((one) => known.current && !known.current.has(one.id));
+ if (!fresh) return;
+ open.current = null;
+ setConnected(fresh.person ?? fresh.label);
+ onConnected();
+ }).catch(() => {});
+ }, PAIR_WATCH_MS);
+ return () => window.clearInterval(timer);
+ }, [offer, connected, onConnected]);
+
+ useEffect(() => () => {
+ const unused = open.current;
+ if (unused) void api(`/api/auth/pairing/${encodeURIComponent(unused.id)}`, { method: "DELETE" }).catch(() => {});
+ }, []);
+
+ const link = offer ? (kind === "computer" ? computerLink(offer, address) : offer.url ? { link: offer.url, address: "" } : null) : null;
+ const { state: copied, copy } = useCopyFeedback(link?.link ?? "");
+
+ if (session?.kind === "session" && session.team && config?.team?.name) return <TeamPhoneCard team={config.team.name} blocked={policyBlocked} />;
+ if (session && !canPairDevices(session)) {
+ return <p data-pair-blocked="" className="text-[13px] leading-[18px] text-ink-secondary">{t(pairingBlockedReason(session) === "chat-only" ? "remote.serverPairing.chatOnlyShort" : "devicesPage.addFlow.adminOnly")}</p>;
+ }
+ if (policyBlocked) return <p data-pair-blocked="" className="text-[13px] leading-[18px] text-ink-secondary">{policyBlocked}</p>;
+ if (pairingCodes === false) return <p data-pair-blocked="" className="text-[13px] leading-[18px] text-ink-secondary">{t("remote.serverPairing.portalShort")}</p>;
+ if (error) return <p role="alert" className="text-[13px] leading-[18px] text-danger">{error}</p>;
+ if (!offer) return <p className="flex items-center gap-2 text-[13px] leading-[18px] text-ink-secondary"><Loader2 size={14} aria-hidden="true" className="motion-safe:animate-spin" />{t("remote.serverPairing.creating")}</p>;
+ if (offer.expiresAt <= now && !connected) {
+ return <div className="flex flex-col items-start gap-3">
+ <p className="text-[13px] leading-[18px] text-ink-secondary">{t("remote.serverPairing.expired")}</p>
+ <button type="button" className="ui-button" onClick={() => void create()}>{t("remote.serverPairing.create")}</button>
+ </div>;
+ }
+ return (
+ <div className="flex flex-col gap-4" data-pair-panel={kind}>
+ {kind === "phone" && offer.url && (
+ <div data-pair-qr="" className="self-center rounded-xl bg-white p-3 shadow-[inset_0_0_0_0.5px_var(--settings-edge)]">
+ <QRCodeSVG value={offer.url} size={176} level="M" bgColor="#ffffff" fgColor="#111111" />
+ </div>
+ )}
+ <p className="text-[13px] leading-[18px] text-ink">
+ {kind === "phone" ? t("phone.code.installAndScan", { app: productName() }) : t("devicesPage.addFlow.computerPaste", { app: productName() })}
+ </p>
+ {kind === "computer" && link && (
+ <div className="flex min-w-0 items-center gap-2 rounded-lg bg-ink/[0.05] px-3 py-2">
+ <code data-pair-link="" className="min-w-0 flex-1 select-text break-all font-mono text-[12px] leading-4 text-ink">{link.link}</code>
+ <button type="button" onClick={copy} data-copy-link="" className="shrink-0 cursor-pointer text-[12px] font-medium leading-4 text-accent-text hover:underline">
+ {t(copied === "copied" ? "remote.serverPairing.copied" : copied === "failed" ? "common.copyFailed" : "remote.serverPairing.copyLink")}
+ </button>
+ </div>
+ )}
+ <div className="flex flex-wrap items-baseline gap-x-3 gap-y-1">
+ <span className="text-[12px] leading-4 text-ink-secondary">{t("connect.code")}</span>
+ <span data-pairing-code="" className="text-[16px] font-medium leading-6 tracking-[0.08em] text-ink tabular-nums">{offer.code}</span>
+ <span className="text-[12px] leading-4 text-ink-tertiary">{codeUntil(offer.expiresAt)}</span>
+ </div>
+ <Waiting connected={connected} />
+ </div>
+ );
+}
+
+function Option({ kind, icon, title, line, onChoose }: { kind: AddKind; icon: ReactNode; title: string; line: string; onChoose: (kind: AddKind) => void }) {
+ return (
+ <button type="button" data-add-kind={kind} onClick={() => onChoose(kind)}
+ className="flex w-full cursor-pointer items-center gap-3 rounded-xl bg-menu px-4 py-3 text-start shadow-[inset_0_0_0_0.5px_var(--settings-edge)] transition-colors hover:bg-ink/[0.06] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus">
+ <span aria-hidden="true" className="flex size-5 shrink-0 items-center justify-center text-ink-secondary">{icon}</span>
+ <span className="flex min-w-0 flex-col">
+ <span className="text-[14px] leading-5 text-ink">{title}</span>
+ <span className="text-[13px] leading-[18px] text-ink-secondary">{line}</span>
+ </span>
+ </button>
+ );
+}
+
+function NetworkStep({ network, action, waiting }: { network: PrivateNetwork; action: NetworkAction | null; waiting: boolean }) {
+ return (
+ <div data-add-network={waiting ? "waiting" : network.state} className="flex flex-col items-start gap-3 rounded-xl bg-menu px-4 py-3 shadow-[inset_0_0_0_0.5px_var(--settings-edge)]">
+ <span className="text-[13px] font-medium leading-[18px] text-ink">{t("devicesPage.addFlow.networkFirst")}</span>
+ <span className="text-[13px] leading-[18px] text-ink-secondary">{waiting ? t("devices.computers.waiting", { app: productName() }) : networkLine(network)}</span>
+ {action && (action.href
+ ? <a href={action.href} target="_blank" rel="noreferrer" className="ui-button" data-network-action="">{action.label}</a>
+ : <button type="button" className="ui-button" data-network-action="" disabled={action.busy} onClick={action.run}>{action.label}</button>)}
+ </div>
+ );
+}
+
+/**
+ * Add a device: what kind, then the existing way in for it with nothing extra. A phone on This computer opens Pair a
+ * phone; a computer gets a link over the private network; a server gets the one line to run there and Connect to a
+ * server for the link it prints; a Cloud opens Get a Cloud.
+ */
+export function AddDeviceDialog({ here, cloud, network, networkAction, tailnetAddress, places, onClose, onPairPhone, onConnectServer, onGetCloud, onConnected, onCheck, checking = false, start = null }: {
+ /** This computer's own page in the desktop app. */
+ here: boolean;
+ network: PrivateNetwork | null;
+ networkAction: NetworkAction | null;
+ /** Where another computer on the private network opens this one. */
+ tailnetAddress: string | null;
+ /** A MausBot Cloud's page: another computer opens it by signing in, with no code. */
+ cloud: boolean;
+ /** The places this app has saved: one not there when the dialog opened is the server that just connected. */
+ places: ReadonlyArray<{ id: string; name: string }>;
+ onClose: () => void;
+ onPairPhone: (() => void) | null;
+ onConnectServer: (() => void) | null;
+ onGetCloud: (() => void) | null;
+ onConnected: () => void;
+ /** Ask Tailscale again: while the private network is on but its address does not answer yet. */
+ onCheck?: () => void;
+ checking?: boolean;
+ start?: AddKind | null;
+}) {
+ const [kind, setKind] = useState<AddKind | null>(start);
+ const [placesBefore] = useState(() => new Set(places.map((place) => place.id)));
+ const choose = (next: AddKind) => {
+ if (next === "phone" && onPairPhone) { onPairPhone(); return; }
+ if (next === "cloud" && onGetCloud) { onGetCloud(); return; }
+ setKind(next);
+ };
+ const back = kind && !start ? <button type="button" onClick={() => setKind(null)} className="inline-flex cursor-pointer items-center gap-1 self-start text-[13px] leading-[18px] text-ink-secondary hover:text-ink">
+ <ChevronLeft size={14} aria-hidden="true" />{t("rail.back")}</button> : null;
+ const shared = network?.state === "ready" && network.shared;
+ const networkReady = shared && Boolean(tailnetAddress);
+ // On and shared, but nothing answers at the address yet: the step is to check again, never Add a computer again.
+ const stepAction: NetworkAction | null = shared && !tailnetAddress ? (onCheck ? { label: t("remote.checkAgain"), run: onCheck, busy: checking } : null) : networkAction;
+ const newServer = places.find((place) => !placesBefore.has(place.id))?.name ?? null;
+ const title = kind === "computer" ? t("devicesPage.add.computer") : kind === "server" ? t("devicesPage.add.server") : kind === "phone" ? t("devicesPage.add.phone") : t("devicesPage.add");
+ return (
+ <SettingsDialog title={title} onClose={onClose} footer={<button type="button" className={cn("ui-button", kind && "ui-button-primary")} onClick={onClose}>{t("devices.pair.done")}</button>}>
+ <div className="flex flex-col gap-3" data-add-step={kind ?? "choose"}>
+ {back}
+ {!kind && <>
+ <Option kind="phone" icon={<Smartphone size={16} />} title={t("devicesPage.add.phone")} line={t("devicesPage.add.phoneLine", { app: productName() })} onChoose={choose} />
+ <Option kind="computer" icon={<Laptop size={16} />} title={t("devicesPage.add.computer")} line={t("devicesPage.add.computerLine")} onChoose={choose} />
+ <Option kind="server" icon={<Server size={16} />} title={t("devicesPage.add.server")} line={t("devicesPage.add.serverLine")} onChoose={choose} />
+ {onGetCloud && <Option kind="cloud" icon={<Cloud size={16} />} title={t("devicesPage.add.cloud")} line={t("devicesPage.add.cloudLine")} onChoose={choose} />}
+ </>}
+ {kind === "phone" && !here && <PairCodePanel kind="phone" address={null} onConnected={onConnected} />}
+ {kind === "computer" && (cloud
+ ? <p className="text-[13px] leading-[18px] text-ink-secondary">{t("devicesPage.addFlow.computerCloud", { app: productName() })}</p>
+ : here && !networkReady
+ ? network && <NetworkStep network={network} action={stepAction} waiting={Boolean(shared && !tailnetAddress)} />
+ : <>
+ <p className="text-[13px] leading-[18px] text-ink-secondary">{t(here ? "devicesPage.addFlow.computerNeeds" : "devicesPage.addFlow.computerInstall", { app: productName() })}</p>
+ <PairCodePanel kind="computer" address={tailnetAddress} onConnected={onConnected} />
+ </>)}
+ {kind === "server" && <>
+ <CommandRow label={t("devicesPage.addFlow.serverAnywhere")} command={SERVER_COMMANDS.anywhere} />
+ <CommandRow label={t("devicesPage.addFlow.serverTailscale")} command={SERVER_COMMANDS.tailscale} />
+ <p className="text-[12px] leading-4 text-ink-secondary">{t("devicesPage.addFlow.serverNeeds")}</p>
+ {onConnectServer
+ ? <>
+ <div><button type="button" className="ui-button" data-connect-server="" onClick={onConnectServer}>{t("devicesPage.addFlow.pasteLink")}</button></div>
+ <Waiting connected={newServer} />
+ </>
+ : <p className="text-[12px] leading-4 text-ink-secondary">{t("devicesPage.addFlow.serverDesktop", { app: productName() })}</p>}
+ </>}
+ </div>
+ </SettingsDialog>
+ );
+}
diff --git a/src/components/devices/DeviceList.tsx b/src/components/devices/DeviceList.tsx
new file mode 100644
index 0000000000..ce5f2b1f1e
--- /dev/null
+++ b/src/components/devices/DeviceList.tsx
@@ -0,0 +1,135 @@
+import { useEffect, useRef } from "react";
+import { cn } from "@/lib/cn";
+import { t } from "@/lib/i18n";
+import { lastSeen } from "@/lib/pairing-time";
+import { deviceGroup, type Device, type DeviceAction, type DeviceGroup } from "@/lib/devices";
+import { SettingsGroup, SettingsRows } from "../SettingsPrimitives";
+import { DOT, KIND_ICON, groupLabel, kindLabel, routeLabel, statusText } from "./device-words";
+
+const GROUPS: readonly DeviceGroup[] = ["computers", "servers", "phones"];
+
+function actionLabel(action: DeviceAction, device: Device): string {
+ switch (action.type) {
+ case "switch": return t("servers.switch");
+ case "retry": return t("servers.tryNow");
+ case "pair-again": return t("servers.pairAgain");
+ case "copy-address": return t("servers.copyAddress");
+ case "copy-update": return t("devicesPage.action.copyUpdate");
+ case "manage": return t("devicesPage.action.manage");
+ case "remove":
+ if (device.sources.length > 1 && action.source.type === "phone-app") return t("devicesPage.action.removeApps");
+ if (device.sources.length > 1 && action.source.type === "session") return t("devicesPage.action.signOut");
+ return t("remote.devices.removeShort");
+ }
+}
+
+/** The row's one button beside its name: what it most needs, else Switch. The rest show once it is chosen. */
+const PRIMARY: ReadonlyArray<DeviceAction["type"]> = ["copy-update", "retry", "pair-again", "switch", "manage"];
+const primaryOf = (device: Device) => PRIMARY.map((type) => device.actions.find((action) => action.type === type)).find(Boolean);
+
+function Detail({ label, children }: { label: string; children: React.ReactNode }) {
+ return (
+ <div className="flex min-w-0 items-baseline gap-3">
+ <dt className="w-28 shrink-0 text-[12px] leading-4 text-ink-tertiary">{label}</dt>
+ <dd className="min-w-0 break-words text-[13px] leading-[18px] text-ink-secondary">{children}</dd>
+ </div>
+ );
+}
+
+function ActionButton({ device, action, quiet, onAction }: { device: Device; action: DeviceAction; quiet: boolean; onAction: (device: Device, action: DeviceAction) => void }) {
+ return (
+ <button type="button" data-device-action={action.type} data-danger={action.type === "remove" ? "" : undefined} onClick={() => onAction(device, action)}
+ aria-label={`${actionLabel(action, device)}: ${device.name}`}
+ className={quiet ? "settings-quiet shrink-0 cursor-pointer" : "ui-button shrink-0"}>{actionLabel(action, device)}</button>
+ );
+}
+const actionKey = (action: DeviceAction) => `${action.type}:${"source" in action ? action.source.id : ""}`;
+
+/** What a device is, how it connects and what bots can do with it, then its other actions. */
+export function DeviceDetails({ device, actions, onAction, now }: { device: Device; actions: readonly DeviceAction[]; onAction: (device: Device, action: DeviceAction) => void; now: number }) {
+ return <>
+ <dl className="flex flex-col gap-1.5">
+ <Detail label={t("devicesPage.detail.kind")}>{kindLabel(device.kind)}</Detail>
+ {!device.here && <Detail label={t("devicesPage.detail.reaches")}>{device.routes.map(routeLabel).join(", ")}</Detail>}
+ {device.address && <Detail label={t("devicesPage.detail.address")}><span className="select-text font-mono text-[12px]">{device.address}</span></Detail>}
+ {device.version && <Detail label={t("devicesPage.detail.version")}>{device.version}</Detail>}
+ {device.lastSeen && device.status !== "online" && <Detail label={t("devicesPage.detail.lastSeen")}>{lastSeen(device.lastSeen, now)}</Detail>}
+ <Detail label={t("devicesPage.detail.bots")}>
+ {device.canRunBots ? t("devicesPage.detail.runsBots") : device.canHostComputer ? t("devicesPage.detail.hostsComputer") : t("devicesPage.detail.reachesBots")}
+ {device.usesThisComputer && <span className="block">{t("servers.share.on", { name: device.name })}</span>}
+ </Detail>
+ </dl>
+ {actions.length > 0 && <div className="flex flex-wrap items-center gap-x-4 gap-y-2">{actions.map((action) => <ActionButton key={actionKey(action)} device={device} action={action} quiet onAction={onAction} />)}</div>}
+ </>;
+}
+
+/** A device chosen on the map: its line, its one button and its details, right under the map. */
+export function DeviceCard({ device, onAction, onClose, now = Date.now() }: { device: Device; onAction: (device: Device, action: DeviceAction) => void; onClose: () => void; now?: number }) {
+ const Icon = KIND_ICON[device.kind];
+ const primary = primaryOf(device);
+ const card = useRef<HTMLElement>(null);
+ useEffect(() => { card.current?.scrollIntoView?.({ block: "nearest" }); }, [device.id]);
+ return (
+ <section ref={card} data-device-card={device.id} aria-label={device.name} className="flex flex-col gap-3 rounded-xl bg-menu px-4 py-3 shadow-[inset_0_0_0_0.5px_var(--settings-edge)] motion-safe:animate-fade-in">
+ <div className="flex items-center gap-3">
+ <Icon size={16} aria-hidden="true" className="shrink-0 text-ink-secondary" />
+ <div className="flex min-w-0 flex-1 flex-col">
+ <span className="truncate text-[14px] font-medium leading-5 text-ink">{device.name}</span>
+ <span className={cn("truncate text-[13px] leading-[18px]", device.status === "attention" ? "text-warning" : "text-ink-secondary")}>{statusText(device, now)}</span>
+ </div>
+ {primary && <ActionButton device={device} action={primary} quiet={false} onAction={onAction} />}
+ <button type="button" onClick={onClose} className="settings-quiet shrink-0 cursor-pointer">{t("common.close")}</button>
+ </div>
+ <div className="flex flex-col gap-3 ps-7"><DeviceDetails device={device} actions={device.actions.filter((action) => action !== primary)} onAction={onAction} now={now} /></div>
+ </section>
+ );
+}
+
+function DeviceRow({ device, selected, onSelect, onAction, now }: { device: Device; selected: boolean; onSelect: (id: string | null) => void; onAction: (device: Device, action: DeviceAction) => void; now: number }) {
+ const Icon = KIND_ICON[device.kind];
+ const dot = DOT[device.status];
+ const primary = primaryOf(device);
+ const rest = device.actions.filter((action) => action !== primary);
+ return (
+ <div data-device-row={device.id} data-selected={selected ? "" : undefined} className={cn("flex flex-col scroll-mt-4", selected && "bg-ink/[0.04]")}>
+ <div className="flex min-h-14 items-center gap-3 px-4 py-2">
+ <span className="relative flex size-8 shrink-0 items-center justify-center text-ink-secondary">
+ <Icon size={16} aria-hidden="true" />
+ {dot && <span aria-hidden="true" className={cn("absolute bottom-1 end-1 size-2 rounded-full", dot)} />}
+ </span>
+ <button type="button" aria-expanded={selected} onClick={() => onSelect(selected ? null : device.id)}
+ className="flex min-w-0 flex-1 cursor-pointer flex-col text-start focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus">
+ <span className="truncate text-[14px] leading-5 text-ink">{device.name}</span>
+ <span className={cn("truncate text-[13px] leading-[18px]", device.status === "attention" ? "text-warning" : "text-ink-secondary")}>
+ {statusText(device, now)}{device.here ? "" : ` · ${routeLabel(device.route)}`}
+ </span>
+ </button>
+ {primary && <ActionButton device={device} action={primary} quiet={false} onAction={onAction} />}
+ </div>
+ {selected && (
+ <div className="flex flex-col gap-3 pb-3 pe-4 ps-[60px]" data-device-details="">
+ <DeviceDetails device={device} actions={rest} onAction={onAction} now={now} />
+ </div>
+ )}
+ </div>
+ );
+}
+
+/** Under the map: every device by what it is, with the actions that already exist for it. */
+export function DeviceList({ devices, selected, onSelect, onAction, now = Date.now() }: {
+ devices: readonly Device[]; selected: string | null; onSelect: (id: string | null) => void; onAction: (device: Device, action: DeviceAction) => void; now?: number;
+}) {
+ return <>
+ {GROUPS.map((group) => {
+ const listed = devices.filter((device) => deviceGroup(device) === group);
+ if (listed.length === 0) return null;
+ return (
+ <SettingsGroup key={group} label={groupLabel(group)} block={`devices-${group}`}>
+ <SettingsRows icons>
+ {listed.map((device) => <DeviceRow key={device.id} device={device} selected={selected === device.id} onSelect={onSelect} onAction={onAction} now={now} />)}
+ </SettingsRows>
+ </SettingsGroup>
+ );
+ })}
+ </>;
+}
diff --git a/src/components/devices/DeviceMap.tsx b/src/components/devices/DeviceMap.tsx
new file mode 100644
index 0000000000..7257907ebc
--- /dev/null
+++ b/src/components/devices/DeviceMap.tsx
@@ -0,0 +1,135 @@
+import { Plus } from "lucide-react";
+import type { ReactNode } from "react";
+import { cn } from "@/lib/cn";
+import { t } from "@/lib/i18n";
+import { groupByRoute, type Device, type DeviceRoute, type PrivateNetwork } from "@/lib/devices";
+import { DOT, KIND_ICON, kindLabel, networkShort, routeLabel, statusText } from "./device-words";
+
+const NODE = "relative flex w-48 min-w-0 cursor-pointer items-center gap-3 rounded-xl bg-menu px-3 py-2 text-start transition-colors hover:bg-ink/[0.06] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus motion-safe:animate-fade-in @max-[480px]/map:w-full";
+
+/** One device on the map: its mark with a status dot, its name and one line. Choosing it opens its row below. */
+export function DeviceNode({ device, selected, onSelect, now }: { device: Device; selected: boolean; onSelect: (id: string) => void; now: number }) {
+ const Icon = KIND_ICON[device.kind];
+ const dot = DOT[device.status];
+ const line = statusText(device, now);
+ return (
+ <button type="button" data-device-node={device.id} data-device-status={device.status} aria-pressed={selected} onClick={() => onSelect(device.id)}
+ aria-label={`${device.name}, ${kindLabel(device.kind)}, ${line}`} title={device.name}
+ className={cn(NODE, selected ? "shadow-[inset_0_0_0_1px_var(--color-ink)]" : "shadow-[inset_0_0_0_0.5px_var(--settings-edge)]")}>
+ <span className="relative flex size-5 shrink-0 items-center justify-center text-ink-secondary">
+ <Icon size={16} aria-hidden="true" />
+ {dot && <span aria-hidden="true" className={cn("absolute -bottom-0.5 -end-0.5 size-2 rounded-full ring-2 ring-(--color-menu)", dot)} />}
+ </span>
+ <span className="flex w-full min-w-0 flex-col">
+ <span className="truncate text-[13px] font-medium leading-[18px] text-ink">{device.name}</span>
+ <span className={cn("truncate text-[12px] leading-4", device.status === "attention" ? "text-warning" : "text-ink-secondary")}>{line}</span>
+ </span>
+ </button>
+ );
+}
+
+/** The root of the map: the place whose Settings these are, with the same mark as the rail and the nav. */
+export function HereNode({ device, mark, selected, onSelect }: { device: Device; mark: ReactNode; selected: boolean; onSelect: (id: string) => void }) {
+ return (
+ <button type="button" data-device-node="here" aria-pressed={selected} onClick={() => onSelect(device.id)} title={device.name}
+ aria-label={`${device.name}, ${statusText(device)}`}
+ className={cn("flex min-w-0 max-w-full cursor-pointer items-center gap-3 rounded-xl bg-menu px-3 py-2 text-start transition-colors hover:bg-ink/[0.06] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
+ selected ? "shadow-[inset_0_0_0_1px_var(--color-ink)]" : "shadow-[inset_0_0_0_0.5px_var(--settings-edge)]")}>
+ <span className="flex size-8 shrink-0 items-center justify-center text-ink-secondary">{mark}</span>
+ <span className="flex min-w-0 flex-col">
+ <span className="truncate text-[14px] font-medium leading-5 text-ink">{device.name}</span>
+ <span className="truncate text-[12px] leading-4 text-ink-secondary">{statusText(device)}</span>
+ </span>
+ </button>
+ );
+}
+
+/** A route's branch off the trunk: its name where the line meets it, then its devices. Dashed while none is online. */
+function Branch({ route, last, quiet, label, aside, children, boxed }: { route: DeviceRoute; last: boolean; quiet: boolean; label: ReactNode; aside?: ReactNode; children: ReactNode; boxed?: boolean }) {
+ // The stub meets the group's first row: the private network's header, or a plain group's devices (its name sits
+ // beside them when the map is wide, above them when it is narrow).
+ const stub = boxed ? "top-6" : "top-2 @min-[560px]/map:top-6";
+ return (
+ <li data-device-route={route} className="relative pb-3 ps-6">
+ <span aria-hidden="true" className={cn("absolute start-0 top-0 w-0 border-s border-(--settings-edge)", last ? (boxed ? "h-6" : "h-2 @min-[560px]/map:h-6") : "h-full", quiet && "border-dashed")} />
+ <span aria-hidden="true" className={cn("absolute start-0 w-5 border-t border-(--settings-edge)", stub, quiet && "border-dashed")} />
+ {boxed ? (
+ <div className="flex flex-col gap-2 rounded-xl border border-dashed border-(--settings-edge) px-3 py-3" data-private-network="">
+ <div className="flex min-h-6 flex-wrap items-center justify-between gap-x-3 gap-y-1">
+ <span className="text-[12px] font-medium leading-4 text-ink-secondary">{label}</span>
+ {aside}
+ </div>
+ {children}
+ </div>
+ ) : (
+ <div className="flex flex-col gap-2 @min-[560px]/map:flex-row @min-[560px]/map:items-start">
+ <span className="text-[12px] font-medium leading-4 text-ink-secondary @min-[560px]/map:mt-4 @min-[560px]/map:w-28 @min-[560px]/map:shrink-0">{label}</span>
+ {children}
+ </div>
+ )}
+ </li>
+ );
+}
+
+export interface NetworkAction {
+ label: string;
+ run?: () => void;
+ href?: string;
+ busy?: boolean;
+}
+
+/**
+ * The map: this place at the root, a trunk down its left, and one branch per way devices reach it, named where the line
+ * meets it. The private network (Tailscale) is a dashed group of its own, always drawn on This computer, with its state
+ * and the one next step. In a narrow window every device becomes a full-width row: the same tree, read as a list.
+ */
+export function DeviceMap({ devices, network, networkAction, selected, onSelect, onAdd, here, now = Date.now() }: {
+ devices: readonly Device[];
+ network: PrivateNetwork | null;
+ networkAction: NetworkAction | null;
+ selected: string | null;
+ onSelect: (id: string) => void;
+ onAdd: () => void;
+ here: ReactNode;
+ now?: number;
+}) {
+ const groups = groupByRoute(devices);
+ const shown = network && !groups.some((group) => group.route === "tailscale") ? [{ route: "tailscale" as const, devices: [] as Device[] }, ...groups] : groups;
+ const alone = groups.length === 0;
+ const action = networkAction && (networkAction.href
+ ? <a href={networkAction.href} target="_blank" rel="noreferrer" className="ui-button ui-button-sm" data-network-action="">{networkAction.label}</a>
+ : <button type="button" className="ui-button ui-button-sm" data-network-action="" disabled={networkAction.busy} onClick={networkAction.run}>{networkAction.label}</button>);
+ return (
+ <div data-settings-block="map" className="@container/map flex scroll-mt-4 flex-col" role="group" aria-label={t("devicesPage.mapLabel")}>
+ <div className="flex flex-wrap items-center justify-between gap-3 pb-2">
+ {here}
+ <button type="button" data-settings-block="add" data-add-device="" onClick={onAdd} className="ui-button ui-button-primary inline-flex scroll-mt-4 items-center gap-1.5">
+ <Plus size={14} aria-hidden="true" />{t("devicesPage.add")}
+ </button>
+ </div>
+ {shown.length > 0 && (
+ <ul className="ms-4 flex flex-col" data-device-tree="">
+ {shown.map((group, index) => {
+ const quiet = group.devices.every((device) => device.status !== "online");
+ const isNetwork = group.route === "tailscale" && network;
+ return (
+ <Branch key={group.route} route={group.route} last={index === shown.length - 1} quiet={quiet} boxed={Boolean(isNetwork)}
+ label={isNetwork ? <>{t("devicesPage.network.title")}<span className="font-normal text-ink-tertiary">{" · Tailscale"}</span></> : routeLabel(group.route)}
+ aside={isNetwork ? <span className="flex items-center gap-2">
+ <span data-network-state={network.state} className={cn("text-[12px] leading-4", network.state === "ready" ? "text-ink-secondary" : network.state === "unknown" ? "text-ink-tertiary" : "text-warning")}>{networkShort(network)}</span>
+ {action}
+ </span> : undefined}>
+ {group.devices.length > 0 && (
+ <div className="flex flex-wrap gap-2">
+ {group.devices.map((device) => <DeviceNode key={device.id} device={device} selected={selected === device.id} onSelect={onSelect} now={now} />)}
+ </div>
+ )}
+ </Branch>
+ );
+ })}
+ </ul>
+ )}
+ {alone && <p data-devices-empty="" className="ps-4 pt-1 text-[13px] leading-[18px] text-ink-secondary">{t("devicesPage.empty")}</p>}
+ </div>
+ );
+}
diff --git a/src/components/devices/device-words.ts b/src/components/devices/device-words.ts
new file mode 100644
index 0000000000..0ebb1c634f
--- /dev/null
+++ b/src/components/devices/device-words.ts
@@ -0,0 +1,67 @@
+import { Box, Cloud, Laptop, Monitor, Server, Smartphone, type LucideIcon } from "lucide-react";
+import type { LocaleKey } from "@/locales";
+import { t } from "@/lib/i18n";
+import { lastSeen } from "@/lib/pairing-time";
+import type { Device, DeviceGroup, DeviceKind, DeviceRoute, PrivateNetwork, PrivateNetworkState } from "@/lib/devices";
+import { productName } from "@/lib/brand";
+
+export const KIND_ICON: Record<DeviceKind, LucideIcon> = { laptop: Laptop, desktop: Monitor, server: Server, cloud: Cloud, phone: Smartphone, vm: Box };
+
+const KIND: Record<DeviceKind, LocaleKey> = {
+ laptop: "devicesPage.kind.laptop", desktop: "devicesPage.kind.desktop", server: "devicesPage.kind.server", cloud: "devicesPage.kind.cloud",
+ phone: "devicesPage.kind.phone", vm: "devicesPage.kind.vm",
+};
+export const kindLabel = (kind: DeviceKind): string => t(KIND[kind]);
+
+const ROUTE: Record<DeviceRoute, LocaleKey> = {
+ here: "devicesPage.route.here", local: "devicesPage.route.local", tailscale: "devicesPage.route.tailscale", relay: "devicesPage.route.relay",
+ cloud: "devicesPage.route.cloud", internet: "devicesPage.route.internet", paired: "devicesPage.route.paired", ssh: "devicesPage.route.ssh",
+};
+export const routeLabel = (route: DeviceRoute): string => t(ROUTE[route], { app: productName() });
+
+const GROUP: Record<DeviceGroup, LocaleKey> = { computers: "devicesPage.group.computers", servers: "devicesPage.group.servers", phones: "devicesPage.group.phones" };
+export const groupLabel = (group: DeviceGroup): string => t(GROUP[group]);
+
+/** One short line: how it is, or the one thing it needs. */
+export function statusText(device: Device, now = Date.now()): string {
+ if (device.here) return t("devicesPage.status.here");
+ if (device.note === "update") return t("devicesPage.note.update");
+ if (device.note === "signed-out") return t("devicesPage.note.signedOut");
+ if (device.note === "insecure") return t("devicesPage.note.insecure");
+ if (device.note === "unreachable") return t("devicesPage.note.unreachable");
+ if (device.note === "reconnecting") return t("devicesPage.note.reconnecting");
+ if (device.status === "online") return t("devicesPage.status.online");
+ if (device.status === "offline") return device.lastSeen ? t("devicesPage.status.seen", { when: lastSeen(device.lastSeen, now) }) : t("devicesPage.status.offline");
+ if (device.route === "ssh") return t("devicesPage.status.ssh");
+ if (device.kind === "cloud") return device.home ? `${t("servers.homeTag")} · ${t("servers.managed")}` : t("servers.managed");
+ return device.home ? t("servers.homeTag") : t("devicesPage.status.unknown");
+}
+
+/** The dot's colour by status; none while nothing says how it is. */
+export const DOT: Record<Device["status"], string | null> = { online: "bg-success", attention: "bg-warning", offline: "bg-ink-tertiary", unknown: null };
+
+const NETWORK_SHORT: Record<PrivateNetworkState, LocaleKey> = {
+ unknown: "devicesPage.network.short.unknown", "not-installed": "devicesPage.network.short.notInstalled", "no-cli": "devicesPage.network.short.noCli",
+ "signed-out": "devicesPage.network.short.signedOut", "not-running": "devicesPage.network.short.notRunning", "needs-approval": "devicesPage.network.short.needsApproval",
+ "needs-permission": "devicesPage.network.short.needsPermission", magicdns: "devicesPage.network.short.magicdns", ready: "devicesPage.network.short.ready",
+};
+/** Two or three words for the map. */
+export const networkShort = (network: PrivateNetwork): string => t(NETWORK_SHORT[network.state]);
+
+/** The whole next step, in the Tailscale check's own words where it has them. */
+export function networkLine(network: PrivateNetwork): string {
+ switch (network.state) {
+ case "unknown": return t("devicesPage.network.line.unknown");
+ case "not-installed": return t("devicesPage.network.line.notInstalled");
+ case "no-cli": return t("remote.tailscale.noCli");
+ case "signed-out": return t("remote.tailscale.signIn");
+ case "not-running": return t("remote.tailscale.notRunning");
+ case "needs-approval": return t("remote.tailscale.needsApproval");
+ case "needs-permission": return t("remote.tailscale.needsPermission", { app: productName() });
+ case "magicdns": return `${t("remote.tailscale.magicDns")}. ${t("remote.tailscale.magicDnsDetail")}`;
+ case "ready": return network.shared ? t("devicesPage.network.line.ready", { name: network.name ?? "" }) : t("devicesPage.network.line.notShared", { name: network.name ?? "" });
+ }
+}
+
+/** Where to get Tailscale for this computer's system. */
+export const TAILSCALE_DOWNLOAD = "https://tailscale.com/download";
diff --git a/src/components/settings/SettingsNav.tsx b/src/components/settings/SettingsNav.tsx
index 69f5c636b7..b569a74ecc 100644
--- a/src/components/settings/SettingsNav.tsx
+++ b/src/components/settings/SettingsNav.tsx
@@ -320,12 +320,12 @@ function HitRow({ ctx, place, hit, query, onHit }: { ctx: SettingsContext; place
}
const PAGE_OWNER: Record<SettingsPageId, SettingsOwner> = {
- overview: "place", phone: "place", ai: "place", bots: "place", desktops: "place", vault: "place", usage: "place", transfer: "place", data: "place",
+ overview: "place", devices: "place", phone: "place", ai: "place", bots: "place", desktops: "place", vault: "place", usage: "place", transfer: "place", data: "place",
people: "place", installations: "place", account: "account", plan: "account", app: "app", general: "app", appearance: "app",
};
const PAGE_KEY: Partial<Record<SettingsPageId, Parameters<typeof t>[0]>> = {
- phone: "settings.section.phoneDevices", ai: "settings.group.ai", bots: "settings.page.bots", desktops: "settings.page.desktops",
+ devices: "settings.page.devices", phone: "settings.section.phoneDevices", ai: "settings.group.ai", bots: "settings.page.bots", desktops: "settings.page.desktops",
vault: "settings.section.vault", usage: "settings.page.spending", transfer: "settings.page.importExport", data: "settings.page.data", people: "settings.section.people",
installations: "settings.section.workspaces", plan: "settings.page.plan", general: "settings.section.general", appearance: "settings.section.appearance",
};
diff --git a/src/components/settings/SettingsWindow.test.ts b/src/components/settings/SettingsWindow.test.ts
index 8fea7b63f4..b8e95d684f 100644
--- a/src/components/settings/SettingsWindow.test.ts
+++ b/src/components/settings/SettingsWindow.test.ts
@@ -55,7 +55,7 @@ describe("the Settings window", () => {
it("opens with the place, Your account and This app, each headed by an identity row", () => {
fixture.advanced = true;
const html = render();
- expect(navPages(html)).toEqual(["overview", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data", "account", "app", "general", "appearance"]);
+ expect(navPages(html)).toEqual(["overview", "devices", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data", "account", "app", "general", "appearance"]);
expect(html).toContain("This computer");
expect(html).toContain("Your account");
expect(html).toContain("This app");
@@ -77,14 +77,14 @@ describe("the Settings window", () => {
expect(render("appearance")).toContain("MausBot on this device");
});
- const SIMPLE_NAV = ["overview", "phone", "ai", "vault", "usage", "transfer", "account", "plan", "app", "appearance"];
+ const SIMPLE_NAV = ["overview", "devices", "phone", "ai", "vault", "usage", "transfer", "account", "plan", "app", "appearance"];
const SIMPLE_PEOPLE: Array<[string, () => void]> = [
["a person with only this computer", () => vi.stubGlobal("window", desktopHere({ cloudAccount: { state: () => new Promise(() => {}), onState: () => () => {} } }))],
["This computer's rail, with My Cloud", () => vi.stubGlobal("window", desktopHere({ cloudAccount: { state: () => new Promise(() => {}), onState: () => () => {} }, workspaces: { state: () => new Promise(() => {}), places: () => new Promise(() => {}) } }))],
["My Cloud's rail in the desktop window", () => { vi.stubGlobal("window", { ogb: { platform: "darwin", cloudPlan: { state: () => new Promise(() => {}) }, workspaces: { state: () => new Promise(() => {}), places: () => new Promise(() => {}) } } }); fixture.config = { cloudHome: true }; }],
["My Cloud in a browser", () => { vi.stubGlobal("window", {}); fixture.config = { cloudHome: true }; }],
];
- it.each(SIMPLE_PEOPLE)("shows Simple's ten entries for %s", (_who, set) => {
+ it.each(SIMPLE_PEOPLE)("shows Simple's eleven entries for %s", (_who, set) => {
set();
fixture.advanced = false;
expect(navPages(render("overview"))).toEqual(SIMPLE_NAV);
diff --git a/src/components/settings/pages/DevicesPage.dom.test.ts b/src/components/settings/pages/DevicesPage.dom.test.ts
new file mode 100644
index 0000000000..482f5f9a8d
--- /dev/null
+++ b/src/components/settings/pages/DevicesPage.dom.test.ts
@@ -0,0 +1,273 @@
+// @vitest-environment happy-dom
+// The Devices page over a fake desktop bridge and a fake server: what the map draws, what its buttons call, the private
+// network's states and Add a device's pairing link, with nothing reaching a real server or Tailscale.
+import { act, createElement } from "react";
+import { createRoot, type Root } from "react-dom/client";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import type { CompanionState } from "@/lib/companion-types";
+import { setLocale } from "@/lib/i18n";
+import { forgetSharedSession } from "@/lib/session-reuse";
+import { initialState, StoreContext } from "@/state/store";
+import { fullContext } from "../settings-index";
+import { SettingsShellContext, type SettingsShell } from "../settings-shell";
+import { DevicesPage, nextNetworkStep, tailscaleDownload } from "./DevicesPage";
+
+(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
+const NOW = Date.now();
+const off = { on: false, since: null };
+
+let host: HTMLDivElement;
+let root: Root;
+let companion: CompanionState;
+let session: unknown;
+let sessions: Array<{ id: string; label: string; scopes: string[]; lastSeenAt: number }>;
+let openCodes: string[];
+let requests: string[];
+let bridge: Record<string, ReturnType<typeof vi.fn>>;
+let environments: Record<string, ReturnType<typeof vi.fn>>;
+let go: ReturnType<typeof vi.fn<SettingsShell["go"]>>;
+
+const reply = async () => companion;
+function install(tailscaleProblem?: CompanionState["tailscaleProblem"]) {
+ bridge = {
+ state: vi.fn(reply), start: vi.fn(reply), stop: vi.fn(reply), keepAwake: vi.fn(reply), refreshTailscale: vi.fn(reply), pairing: vi.fn(reply),
+ cloudDesktop: vi.fn(reply), browserControl: vi.fn(reply),
+ revoke: vi.fn(async (id: string) => { companion = { ...companion, devices: companion.devices.filter((device) => device.id !== id) }; return companion; }),
+ setTailscaleComputers: vi.fn(async () => {
+ if (tailscaleProblem) return { ...companion, tailscaleProblem };
+ companion = { ...companion, routes: { ...companion.routes!, tailscale: { on: true, since: NOW, name: "ada.tail1.ts.net", computers: true } }, tailnetShare: { on: true, origin: "http://ada.tail1.ts.net:8799", https: false, problem: null } };
+ return companion;
+ }),
+ };
+ environments = {
+ state: vi.fn(async () => ({ localOrigin: "http://127.0.0.1:8799", remote: false, packaged: true, activeId: "local", environments: [
+ { id: "local", kind: "local", name: "This computer" },
+ { id: "home", kind: "remote", name: "Ada’s Cloud", origin: "https://ada.mausbot.cloud", home: true },
+ { id: "vps", kind: "remote", name: "Hetzner box", origin: "https://maus.example.com" },
+ ] })),
+ status: vi.fn(async () => [{ id: "vps", state: "cantReach", since: NOW, version: "0.1.180", behind: false, install: "docker" }]),
+ switch: vi.fn(async () => {}), forget: vi.fn(async () => {}), retry: vi.fn(async () => {}),
+ };
+ vi.stubGlobal("ogb", undefined);
+ (window as unknown as { ogb: unknown }).ogb = {
+ platform: "darwin", app: { version: "0.1.180" }, companion: bridge, environments,
+ companionAccount: { state: async () => ({ available: true, status: "ready", email: "[email protected]" }) },
+ };
+}
+
+beforeEach(() => {
+ setLocale("en");
+ forgetSharedSession();
+ requests = [];
+ session = { kind: "loopback", trust: "owner" };
+ sessions = [];
+ openCodes = ["p1"];
+ companion = {
+ enabled: true, keepAwake: false, port: 8810, pairing: null,
+ devices: [
+ { id: "iphone", name: "Ada’s iPhone", createdAt: NOW, lastSeenAt: NOW, cloudDesktopAccess: false, route: "wifi" },
+ { id: "pixel", name: "Pixel 9", createdAt: NOW, lastSeenAt: NOW - 86_400_000, cloudDesktopAccess: false, route: null },
+ ],
+ connectedDeviceIds: ["iphone"],
+ routes: { wifi: { on: true, since: NOW }, relay: off, tailscale: off, https: off },
+ };
+ install();
+ vi.stubGlobal("fetch", vi.fn(async (input: string, init?: RequestInit) => {
+ const path = new URL(input, "http://127.0.0.1").pathname;
+ requests.push(`${init?.method ?? "GET"} ${path}`);
+ if (path === "/api/auth/session") return Response.json(session);
+ if (path === "/api/auth/sessions") return Response.json({ sessions, current: null });
+ if (path === "/api/auth/pairing" && init?.method === "POST") return Response.json({ id: "p1", code: "7KQ2-M9XD-H4TP", expiresAt: NOW + 600_000, url: null, hint: null });
+ if (path === "/api/auth/pairing") return Response.json({ pairings: openCodes.map((id) => ({ id })) });
+ if (path === "/api/phones") return Response.json({ phones: [] });
+ if (path === "/api/config") return Response.json({ membership: { authority: "local", pairingCodes: true } });
+ return Response.json({ error: "no route" }, { status: 404 });
+ }));
+ host = document.createElement("div");
+ document.body.append(host);
+ root = createRoot(host);
+ go = vi.fn<SettingsShell["go"]>();
+});
+
+afterEach(() => {
+ act(() => root.unmount());
+ host.remove();
+ document.body.innerHTML = "";
+ delete (window as unknown as { ogb?: unknown }).ogb;
+ vi.unstubAllGlobals();
+});
+
+const settle = async () => { for (let i = 0; i < 12; i++) await act(async () => { await new Promise((resolve) => setTimeout(resolve, 0)); }); };
+const $ = <T extends Element = HTMLElement>(selector: string) => document.body.querySelector<T & HTMLElement>(selector);
+const click = async (selector: string) => { await act(async () => $(selector)!.click()); await settle(); };
+
+async function render(over: Partial<SettingsShell["ctx"]> = {}) {
+ const shell: SettingsShell = { ctx: fullContext({ advanced: false, ...over }), place: { name: "This computer", kind: "computer", color: null, named: false }, page: "devices", anchor: null, go };
+ const state = { ...initialState, config: { profile: { email: "[email protected]" }, managedPolicy: null } as never };
+ act(() => root.render(createElement(StoreContext.Provider, { value: { state, dispatch: vi.fn() } as never },
+ createElement(SettingsShellContext.Provider, { value: shell }, createElement(DevicesPage)))));
+ await settle();
+}
+
+describe("the Devices page", () => {
+ it("draws this computer at the root and one branch per way in, each device with its state", async () => {
+ await render();
+ expect($("[data-device-node=here]")?.textContent).toContain("This computer");
+ expect([...document.querySelectorAll("[data-device-route]")].map((branch) => branch.getAttribute("data-device-route"))).toEqual(["tailscale", "local", "cloud", "internet"]);
+ expect($("[data-device-route=local] [data-device-node='phone:iphone']")?.getAttribute("data-device-status")).toBe("online");
+ expect($("[data-device-route=internet] [data-device-node='place:vps']")?.textContent).toContain("Can’t reach it");
+ expect($("[data-device-route=cloud] [data-device-node='place:home']")?.textContent).toContain("Home");
+ expect($("[data-device-row='phone:pixel']")?.textContent).toContain("Seen");
+ });
+
+ it("opens a chosen device's card, whose buttons call the actions that already exist", async () => {
+ await render();
+ await click("[data-device-node='place:vps']");
+ expect($("[data-device-card='place:vps']")).not.toBeNull();
+ await click("[data-device-card='place:vps'] [data-device-action=retry]");
+ expect(environments.retry).toHaveBeenCalledWith("vps");
+ await click("[data-device-card='place:vps'] [data-device-action=remove]");
+ expect(environments.forget).toHaveBeenCalledWith("vps");
+ await click("[data-device-node='phone:pixel']");
+ await click("[data-device-card='phone:pixel'] [data-device-action=remove]");
+ expect(bridge.revoke).toHaveBeenCalledWith("pixel");
+ expect($("[data-device-node='phone:pixel']")).toBeNull();
+ await click("[data-device-node='phone:iphone']");
+ await click("[data-device-card='phone:iphone'] [data-device-action=manage]");
+ expect(go).toHaveBeenCalledWith("phone", "paired");
+ });
+
+ it("never asks Tailscale on its own, and shows the check's answer and its next step after Set up", async () => {
+ install("not-installed");
+ await render();
+ expect($("[data-network-state]")?.getAttribute("data-network-state")).toBe("unknown");
+ expect(bridge.setTailscaleComputers).not.toHaveBeenCalled();
+ expect(bridge.refreshTailscale).not.toHaveBeenCalled();
+ await click("[data-network-action]");
+ expect(bridge.setTailscaleComputers).toHaveBeenCalledWith(true);
+ expect($("[data-network-state]")?.textContent).toBe("Not installed");
+ expect($<HTMLAnchorElement>("a[data-network-action]")?.href).toBe("https://tailscale.com/download/mac");
+ expect($("[data-network-line]")?.textContent).toContain("Install Tailscale");
+ });
+
+ it("puts devices reached over Tailscale inside the private network once it is ready", async () => {
+ companion = {
+ ...companion, routes: { ...companion.routes!, tailscale: { on: true, since: NOW, name: "ada.tail1.ts.net", computers: true } },
+ devices: [...companion.devices, { id: "tab", name: "Tablet", createdAt: NOW, lastSeenAt: NOW, cloudDesktopAccess: false, route: "tailscale" }], connectedDeviceIds: ["iphone", "tab"],
+ };
+ await render();
+ expect($("[data-network-state]")?.textContent).toBe("On");
+ expect($("[data-private-network] [data-device-node='phone:tab']")).not.toBeNull();
+ expect($("[data-network-line]")?.textContent).toContain("ada.tail1.ts.net");
+ expect(bridge.setTailscaleComputers).not.toHaveBeenCalled();
+ });
+
+ it("gives another computer a pairing link over the private network and says when it connected", async () => {
+ await render();
+ await click("[data-network-action]");
+ await click("[data-add-device]");
+ await click("[data-add-kind=computer]");
+ expect(requests).toContain("POST /api/auth/pairing");
+ expect($("[data-pair-link]")?.textContent).toBe("http://ada.tail1.ts.net:8799/pair#code=7KQ2-M9XD-H4TP");
+ expect($("[data-pair-state]")?.getAttribute("data-pair-state")).toBe("waiting");
+ sessions = [{ id: "s-other", label: "Chrome on Windows", scopes: ["admin", "client"], lastSeenAt: NOW }];
+ await act(async () => { await new Promise((resolve) => setTimeout(resolve, 2_300)); });
+ await settle();
+ expect($("[data-pair-state]")?.getAttribute("data-pair-state")).toBe("waiting");
+ sessions = [...sessions, { id: "s-new", label: "Studio Mac mini", scopes: ["admin", "client"], lastSeenAt: NOW }];
+ openCodes = [];
+ await act(async () => { await new Promise((resolve) => setTimeout(resolve, 2_300)); });
+ await settle();
+ expect($("[data-pair-state]")?.textContent).toBe("Studio Mac mini is connected");
+ await click("[data-dialog-title] button");
+ expect(requests).not.toContain("DELETE /api/auth/pairing/p1");
+ }, 15_000);
+
+ it("cancels a code nobody used when the dialog closes", async () => {
+ await render();
+ await click("[data-network-action]");
+ await click("[data-add-device]");
+ await click("[data-add-kind=computer]");
+ await click("[data-dialog-title] button");
+ expect(requests).toContain("DELETE /api/auth/pairing/p1");
+ });
+
+ it("asks Tailscale again, rather than sharing again, once its route is on", async () => {
+ companion = { ...companion, routes: { ...companion.routes!, tailscale: { on: true, since: NOW, name: null, computers: true } } };
+ await render();
+ expect($("[data-network-state]")?.getAttribute("data-network-state")).toBe("magicdns");
+ await click("[data-network-action]");
+ expect(bridge.refreshTailscale).toHaveBeenCalled();
+ expect(bridge.setTailscaleComputers).not.toHaveBeenCalled();
+ });
+
+ it("says the private network is still starting, with Check again, when it is on but nothing answers yet", async () => {
+ companion = { ...companion, routes: { ...companion.routes!, tailscale: { on: true, since: NOW, name: "ada.tail1.ts.net", computers: true } }, tailnetShare: { on: true, origin: null, https: false, problem: "not-listening" } };
+ await render();
+ await click("[data-add-device]");
+ await click("[data-add-kind=computer]");
+ expect($("[data-add-network]")?.getAttribute("data-add-network")).toBe("waiting");
+ expect($("[data-add-network] [data-network-action]")?.textContent).toBe("Check again");
+ expect(requests).not.toContain("POST /api/auth/pairing");
+ });
+
+ it("pairs a phone on This computer only through Pair a phone, never a server code", async () => {
+ await render();
+ await click("[data-add-device]");
+ await click("[data-add-kind=phone]");
+ expect($("[data-pair-dialog]")).not.toBeNull();
+ expect($("[data-pair-panel]")).toBeNull();
+ expect(requests).not.toContain("POST /api/auth/pairing");
+ });
+
+ it("asks for the private network first when Add a computer comes before it", async () => {
+ install("signed-out");
+ await render();
+ await click("[data-add-device]");
+ await click("[data-add-kind=computer]");
+ expect($("[data-add-network]")?.getAttribute("data-add-network")).toBe("unknown");
+ expect(requests).not.toContain("POST /api/auth/pairing");
+ });
+
+ it("offers a chat-only session no code at all", async () => {
+ delete (window as unknown as { ogb?: unknown }).ogb;
+ session = { kind: "session", id: "s1", label: "Chrome on Mac", scopes: ["client"], expiresAt: 0 };
+ await render({ here: false, desktop: false, home: false });
+ await click("[data-add-device]");
+ await click("[data-add-kind=phone]");
+ expect($("[data-pair-blocked]")).not.toBeNull();
+ expect(requests.filter((request) => request.startsWith("POST"))).toEqual([]);
+ expect(requests).not.toContain("GET /api/auth/sessions");
+ expect(requests).not.toContain("GET /api/phones");
+ expect(document.querySelector("[data-device-action=remove]")).toBeNull();
+ });
+
+ it("gives a new server one line to run, the sign-in included", async () => {
+ await render();
+ await click("[data-add-device]");
+ await click("[data-add-kind=server]");
+ expect([...document.querySelectorAll("[data-server-command]")].map((line) => line.textContent)).toEqual([
+ "npx openmausbot account login && npx openmausbot serve --tunnel", "npx openmausbot serve --tailscale",
+ ]);
+ });
+
+ it("reads as a list in a narrow window: every device a full-width row", async () => {
+ await render();
+ expect($("[data-device-tree]")?.tagName).toBe("UL");
+ expect($("[data-device-node='phone:iphone']")?.className).toContain("@max-[480px]/map:w-full");
+ });
+});
+
+describe("the private network's next step", () => {
+ const run = { check: vi.fn(), addComputer: vi.fn() };
+ it("is one button per state, and none where an organization turned remote access off", () => {
+ const step = (state: Parameters<typeof nextNetworkStep>[0], blocked = false) => nextNetworkStep(state, run, { busy: false, blocked, platform: "win32" });
+ expect(step({ state: "unknown", name: null, shared: false })?.label).toBe("Set up");
+ expect(step({ state: "not-installed", name: null, shared: false })?.href).toBe("https://tailscale.com/download/windows");
+ expect(step({ state: "needs-approval", name: null, shared: false })?.label).toBe("Check again");
+ expect(step({ state: "ready", name: "a", shared: false })?.label).toBe("Let your computers in");
+ expect(step({ state: "ready", name: "a", shared: true })?.label).toBe("Add a computer");
+ expect(step({ state: "unknown", name: null, shared: false }, true)).toBeNull();
+ expect(tailscaleDownload("linux")).toBe("https://tailscale.com/download/linux");
+ });
+});
diff --git a/src/components/settings/pages/DevicesPage.tsx b/src/components/settings/pages/DevicesPage.tsx
new file mode 100644
index 0000000000..9289a68d7e
--- /dev/null
+++ b/src/components/settings/pages/DevicesPage.tsx
@@ -0,0 +1,155 @@
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { Laptop } from "lucide-react";
+import { copyText } from "@/lib/copy-text";
+import { privateNetwork, type Device, type DeviceAction, type PrivateNetwork } from "@/lib/devices";
+import { t } from "@/lib/i18n";
+import { phoneRemovePath } from "@/lib/phones";
+import { useDevices } from "@/lib/use-devices";
+import type { CompanionState } from "@/lib/companion-types";
+import { api } from "@/state/api";
+import { useStoreDispatch, useStoreSelector } from "@/state/store-select";
+import { AddDeviceDialog, type AddKind } from "../../devices/AddDeviceDialog";
+import { DeviceCard, DeviceList } from "../../devices/DeviceList";
+import { DeviceMap, HereNode, type NetworkAction } from "../../devices/DeviceMap";
+import { networkLine } from "../../devices/device-words";
+import { PairDeviceDialog } from "../../PhoneDevicesSection";
+import { usePhoneSetupController } from "../../PhoneSetupFlow";
+import { OwnServerLink, RailSheet } from "../../PlaceAddSheet";
+import { updateCommand } from "../../ServerList";
+import { SettingRow, SettingsGroup, SettingsRows } from "../../SettingsPrimitives";
+import { PlaceBadge } from "../SettingsNav";
+import { useSettingsShell } from "../settings-shell";
+
+type Sheet = { address: string; locked: boolean; title: string } | null;
+
+/** Tailscale's download page for this computer's system. */
+export function tailscaleDownload(platform: string | undefined): string {
+ if (platform === "darwin") return "https://tailscale.com/download/mac";
+ if (platform === "win32") return "https://tailscale.com/download/windows";
+ if (platform === "linux") return "https://tailscale.com/download/linux";
+ return "https://tailscale.com/download";
+}
+
+/** The private network's one next step, for the map and the Add flow. Null while an organization turned remote access off. */
+export function nextNetworkStep(network: PrivateNetwork | null, run: { check: () => void; addComputer: () => void }, opts: { busy: boolean; blocked: boolean; platform?: string }): NetworkAction | null {
+ if (!network || opts.blocked) return null;
+ switch (network.state) {
+ case "unknown": return { label: t("devicesPage.network.setUp"), run: run.check, busy: opts.busy };
+ case "not-installed": return { label: t("remote.tailscale.getIt"), href: tailscaleDownload(opts.platform) };
+ case "ready": return network.shared ? { label: t("devicesPage.network.addComputer"), run: run.addComputer } : { label: t("devicesPage.network.share"), run: run.check, busy: opts.busy };
+ default: return { label: t("remote.checkAgain"), run: run.check, busy: opts.busy };
+ }
+}
+
+/** A recheck when the person comes back to the window: at most this often, and only after they asked once here. */
+const RECHECK_MS = 5_000;
+
+export function DevicesPage() {
+ const { ctx, place, go } = useSettingsShell();
+ const dispatch = useStoreDispatch();
+ const config = useStoreSelector((state) => state.config);
+ const { devices, companion, loaded, refresh } = useDevices({ here: ctx.here, client: ctx.client, name: place.name, kind: place.kind });
+ const c = usePhoneSetupController(config?.profile?.email);
+ const [selected, setSelected] = useState<{ id: string; from: "map" | "list" } | null>(null);
+ const [adding, setAdding] = useState<AddKind | null | false>(false);
+ const [pairingPhone, setPairingPhone] = useState(false);
+ const [sheet, setSheet] = useState<Sheet>(null);
+ const [problem, setProblem] = useState<CompanionState["tailscaleProblem"] | null>(null);
+ const [failure, setFailure] = useState<string | null>(null);
+ const asked = useRef(0);
+ const blocked = config?.managedPolicy?.remoteAccess === false ? t("policy.managedBy", { organization: config.managedPolicy.organizationName }) : null;
+ const network = ctx.here ? privateNetwork(companion, problem) : null;
+
+ // The Tailscale checks Phone & devices already has, on a click only, never on load or in a poll: with its route off,
+ // Your other computers' switch (it checks, then lets this computer's other computers open it); with it on, Check
+ // again, which asks Tailscale again; ready but not shared, the switch alone.
+ const check = useCallback(async () => {
+ asked.current = Date.now();
+ const route = companion?.routes?.tailscale;
+ const ask = route?.on && (!route.name || route.computers || problem) ? "refresh" : "share";
+ const next = await c.act((bridge) => (ask === "refresh" ? bridge.refreshTailscale() : bridge.setTailscaleComputers?.(true) ?? bridge.refreshTailscale()));
+ if (next) setProblem(next.tailscaleProblem ?? null);
+ refresh();
+ }, [c, refresh, companion, problem]);
+
+ useEffect(() => {
+ if (!problem) return;
+ const onFocus = () => { if (asked.current && Date.now() - asked.current > RECHECK_MS) void check(); };
+ window.addEventListener("focus", onFocus);
+ return () => window.removeEventListener("focus", onFocus);
+ }, [problem, check]);
+
+ const networkAction = nextNetworkStep(network, { check: () => void check(), addComputer: () => setAdding("computer") },
+ { busy: c.busy, blocked: Boolean(blocked), platform: window.ogb?.platform });
+
+ const environments = ctx.here ? window.ogb?.environments : undefined;
+ const places = useMemo(() => devices.filter((device) => device.sources[0]?.type === "place").map((device) => ({ id: device.sources[0]!.id, name: device.name })), [devices]);
+
+ const act = async (device: Device, action: DeviceAction) => {
+ setFailure(null);
+ try {
+ switch (action.type) {
+ case "switch": await environments?.switch(action.placeId); return;
+ case "retry": await environments?.retry?.(action.placeId); break;
+ case "pair-again": setSheet({ address: action.address, locked: true, title: t("servers.pairAgainTitle", { name: device.name }) }); return;
+ case "copy-address": await copyText(action.address); return;
+ case "copy-update": await copyText(updateCommand(action.install, window.ogb?.app?.version ?? "")); return;
+ case "manage": go(action.page, action.anchor); return;
+ case "remove": {
+ const { source } = action;
+ if (source.type === "place") await environments?.forget(source.id);
+ else if (source.type === "phone") await c.act((bridge) => bridge.revoke(source.id));
+ else if (source.type === "phone-app") await api(phoneRemovePath(source.id), { method: "DELETE" });
+ else if (source.type === "session") await api(`/api/auth/sessions/${encodeURIComponent(source.id)}`, { method: "DELETE" });
+ if (selected?.id === device.id) setSelected(null);
+ break;
+ }
+ }
+ } catch (error) {
+ setFailure(error instanceof Error ? error.message : String(error));
+ }
+ refresh();
+ };
+
+ const here = devices[0]!;
+ const workspaces = ctx.here ? window.ogb?.workspaces : undefined;
+ const mark = place.kind === "computer" ? <Laptop size={20} aria-hidden="true" /> : <PlaceBadge place={place} size={24} />;
+ const others = devices.length > 1;
+ const pick = (id: string) => setSelected((now) => (now?.id === id && now.from === "map" ? null : { id, from: "map" }));
+ const chosen = selected?.from === "map" ? devices.find((device) => device.id === selected.id) : undefined;
+
+ return <>
+ <DeviceMap devices={devices} network={network} networkAction={networkAction} selected={selected?.from === "map" ? selected.id : null} onSelect={pick}
+ onAdd={() => setAdding(null)} here={<HereNode device={here} mark={mark} selected={chosen?.id === here.id} onSelect={pick} />} />
+ {chosen && <DeviceCard device={chosen} onAction={(device, action) => void act(device, action)} onClose={() => setSelected(null)} />}
+ {failure && <p role="alert" className="px-4 text-[12px] leading-4 text-danger">{failure}</p>}
+ {network && (
+ <SettingsGroup label={t("devicesPage.network.title")} block="network">
+ <SettingsRows>
+ <SettingRow title="Tailscale" subtitle={<span data-network-line={network.state} aria-live="polite">{blocked ?? networkLine(network)}</span>}>
+ {networkAction?.href && <>
+ <button type="button" className="settings-quiet cursor-pointer" disabled={c.busy} onClick={() => void check()}>{c.busy ? t("common.checking") : t("remote.checkAgain")}</button>
+ <a href={networkAction.href} target="_blank" rel="noreferrer" className="ui-button">{networkAction.label}</a>
+ </>}
+ {networkAction?.run && !(network.state === "ready" && network.shared) && <button type="button" className="ui-button" disabled={networkAction.busy} onClick={networkAction.run}>{networkAction.label}</button>}
+ {network.state === "ready" && network.shared && <button type="button" className="ui-button" onClick={() => go("phone", "computers")}>{t("devicesPage.action.manage")}</button>}
+ </SettingRow>
+ </SettingsRows>
+ </SettingsGroup>
+ )}
+ {loaded && others && <DeviceList devices={devices} selected={selected?.from === "list" ? selected.id : null} onSelect={(id) => setSelected(id ? { id, from: "list" } : null)} onAction={(device, action) => void act(device, action)} />}
+ {adding !== false && (
+ <AddDeviceDialog here={ctx.here} cloud={ctx.cloud} network={network} networkAction={networkAction} tailnetAddress={companion?.tailnetShare?.origin ?? null} places={places} start={adding}
+ onClose={() => { setAdding(false); refresh(); }} onConnected={refresh}
+ onPairPhone={ctx.here ? () => { setAdding(false); setPairingPhone(true); } : null} onCheck={() => void check()} checking={c.busy}
+ onConnectServer={workspaces?.add ? () => setSheet({ address: "", locked: false, title: t("connect.title") }) : null}
+ onGetCloud={workspaces?.add ? () => { setAdding(false); dispatch({ type: "toggleAppSettings", open: false }); void workspaces.add?.("cloud"); } : null} />
+ )}
+ {pairingPhone && c.state && <PairDeviceDialog c={c} state={c.state} placeName={place.name} onClose={() => { setPairingPhone(false); refresh(); }} />}
+ {sheet && (
+ <RailSheet focusKey={sheet.locked ? "pair-again" : "connect"} onClose={() => setSheet(null)}>
+ <OwnServerLink onBack={null} onConnected={() => { setSheet(null); refresh(); }} start={sheet.address || sheet.locked ? sheet : null} />
+ </RailSheet>
+ )}
+ </>;
+}
diff --git a/src/components/settings/pages/SettingsPageBody.tsx b/src/components/settings/pages/SettingsPageBody.tsx
index 8efb7abded..a8af16360c 100644
--- a/src/components/settings/pages/SettingsPageBody.tsx
+++ b/src/components/settings/pages/SettingsPageBody.tsx
@@ -2,11 +2,13 @@ import type { SettingsPageId } from "../settings-index";
import { AccountPage, PlanPage } from "./AccountPages";
import { AppPage, AppearancePage, GeneralPage } from "./AppPages";
import { DataPage, ImportExportPage, InstallationsPage, PeoplePage, SpendingPage, VaultPage } from "./DataPages";
+import { DevicesPage } from "./DevicesPage";
import { PhonePage } from "./PhonePage";
import { AiPage, BotsPage, DesktopsPage, OverviewPage } from "./PlacePages";
const PAGES: Record<SettingsPageId, () => React.ReactNode> = {
overview: OverviewPage,
+ devices: DevicesPage,
phone: PhonePage,
ai: AiPage,
bots: BotsPage,
diff --git a/src/components/settings/settings-index.test.ts b/src/components/settings/settings-index.test.ts
index 3c4abae477..f07c2c3d5e 100644
--- a/src/components/settings/settings-index.test.ts
+++ b/src/components/settings/settings-index.test.ts
@@ -10,7 +10,7 @@ import {
beforeEach(() => setLocale("en"));
const ids = (ctx: SettingsContext) => visiblePages(ctx).map((page) => page.id);
-const PLACE_PAGES = ["overview", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data"];
+const PLACE_PAGES = ["overview", "devices", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data"];
const find = (query: string, ctx: SettingsContext = fullContext()) => searchSettings(query, ctx, (entry) => t(entry.labelKey), (page) => t(page.labelKey));
const first = (query: string, ctx?: SettingsContext) => find(query, ctx)[0]?.entry;
@@ -35,8 +35,8 @@ describe("the pages", () => {
});
it.each(["local only", "This computer, with My Cloud", "My Cloud's page in the desktop window", "My Cloud in a browser (owner)"] as const)(
- "shows Simple's ten entries for %s", (who) => {
- expect(ids({ ...PEOPLE[who], advanced: false })).toEqual(["overview", "phone", "ai", "vault", "usage", "transfer", "account", "plan", "app", "appearance"]);
+ "shows Simple's eleven entries for %s", (who) => {
+ expect(ids({ ...PEOPLE[who], advanced: false })).toEqual(["overview", "devices", "phone", "ai", "vault", "usage", "transfer", "account", "plan", "app", "appearance"]);
});
it("is shorter in Simple: the four Advanced pages come back in Advanced, in place", () => {
diff --git a/src/components/settings/settings-index.ts b/src/components/settings/settings-index.ts
index a7841ada50..9856fc783d 100644
--- a/src/components/settings/settings-index.ts
+++ b/src/components/settings/settings-index.ts
@@ -1,5 +1,5 @@
import {
- Archive, ArrowLeftRight, Bot, Coins, CreditCard, LockKeyhole, Monitor, Palette, Server, SlidersHorizontal, Smartphone, Sparkles, Users,
+ Archive, ArrowLeftRight, Bot, Coins, CreditCard, LockKeyhole, Monitor, Network, Palette, Server, SlidersHorizontal, Smartphone, Sparkles, Users,
type LucideIcon,
} from "lucide-react";
import type { LocaleKey } from "@/locales";
@@ -49,12 +49,14 @@ const notClient = (ctx: SettingsContext) => !ctx.client;
const adminPage = (ctx: SettingsContext) => !ctx.client && !(ctx.team && !ctx.admin);
/** A page Simple mode leaves out: its everyday rows show elsewhere in Simple (Overview, This app, Plan & billing). */
const advancedOnly = (when: (ctx: SettingsContext) => boolean) => (ctx: SettingsContext) => ctx.advanced && when(ctx);
-/** Simple mode's ten entries: the place (Overview, Phone & devices, AI, Vault, Spending, Import & export), Your account
+/** Simple mode's eleven entries: the place (Overview, Devices, Phone & devices, AI, Vault, Spending, Import & export), Your account
* (Plan & billing) and This app (Appearance). Advanced adds You and your bots, Desktops & browser, Data and General. */
export const ADVANCED_PAGES: readonly SettingsPageId[] = ["bots", "desktops", "data", "general"];
export const SETTINGS_PAGES: readonly SettingsPage[] = [
{ id: "overview", owner: "place", labelKey: "settings.page.overview", synonyms: ["overview", "place", "status", "version", "domain", "address", "sidebar"], when: () => true },
+ { id: "devices", owner: "place", labelKey: "settings.page.devices", icon: Network, when: notClient,
+ synonyms: ["devices", "my devices", "all devices", "device map", "map", "computers", "laptops", "servers", "mac mini", "vps", "cloud", "private network", "tailnet", "add a device", "add device"] },
{ id: "phone", owner: "place", labelKey: "settings.section.phoneDevices", icon: Smartphone, when: notClient,
synonyms: ["phone", "pair", "pairing", "qr", "code", "iphone", "android", "mobile", "tablet", "device", "devices", "wifi", "wi-fi", "anywhere", "relay", "remote", "companion", "tailscale", "connect your phone", "get the phone app", "pair a device", "this server", "remote access"] },
{ id: "ai", owner: "place", labelKey: "settings.group.ai", icon: Sparkles, when: adminPage,
@@ -174,6 +176,8 @@ const hereOnly = (ctx: SettingsContext) => ctx.here;
const browserAdmin = (ctx: SettingsContext) => !ctx.desktop && ctx.admin;
export const SETTINGS_INDEX: readonly SettingsIndexEntry[] = [
+ { id: "add-device", page: "devices", anchor: "add", labelKey: "devicesPage.add", topFor: ["add a device", "add device", "new device"], synonyms: ["add a computer", "add a server", "add a phone", "connect a device"] },
+ { id: "private-network", page: "devices", anchor: "network", labelKey: "devicesPage.network.title", when: hereOnly, synonyms: ["tailscale", "tailnet", "private network", "vpn"] },
{ id: "pair", page: "phone", anchor: "pair", labelKey: "phone.pair.button", sectionKey: "phone.pair.section", topFor: ["phone", "pair", "pairing", "qr", "iphone", "android", "this server", "pair a device", "connect your phone"],
synonyms: ["code", "mobile", "tablet", "companion", "get the phone app"] },
{ id: "paired", page: "phone", anchor: "paired", labelKey: "devices.paired", synonyms: ["devices", "remove", "revoke", "pair again"] },
diff --git a/src/devices-preview.tsx b/src/devices-preview.tsx
new file mode 100644
index 0000000000..a5c1098ab6
--- /dev/null
+++ b/src/devices-preview.tsx
@@ -0,0 +1,114 @@
+// Dev-only gallery of Settings → Devices, served at /devices-preview.html; not in the packaged app. It mounts the real
+// Settings window over a fake desktop bridge and answers every /api request itself, so nothing reaches a server.
+// ?place=computer|cloud&devices=full|none&tailscale=unknown|not-installed|no-cli|signed-out|needs-approval|magicdns|ready|unshared
+// &check=1 (presses the private network's button once loaded) &select=<device id> &add=choose|phone|computer|server
+// &skin=midnight|daylight&advanced=1
+import { StrictMode } from "react";
+import { createRoot } from "react-dom/client";
+import { SettingsModal } from "@/components/SettingsModal";
+import type { CompanionState } from "@/lib/companion-types";
+import { loadLocale } from "@/lib/i18n";
+import { setAdvancedMode } from "@/lib/interface-mode";
+import { applySkinChoice, SKIN_IDS, type SkinId } from "@/lib/skins";
+import { initialState, StoreContext } from "@/state/store";
+import "./styles.css";
+
+const params = new URLSearchParams(location.search);
+const place = params.get("place") === "cloud" ? "cloud" : "computer";
+const full = params.get("devices") !== "none";
+const tailscale = params.get("tailscale") ?? (full ? "ready" : "unknown");
+const skin = params.get("skin") ?? "midnight";
+applySkinChoice(SKIN_IDS.includes(skin as SkinId) ? (skin as SkinId) : "midnight");
+setAdvancedMode(params.get("advanced") === "1");
+await loadLocale(params.get("lang") ?? "en");
+
+const now = Date.now();
+const MIN = 60_000;
+const ready = tailscale === "ready" || tailscale === "unshared";
+const tailRoute = { on: ready || tailscale === "magicdns", since: now - 9e8, name: ready ? "ada-macbook.tail4c2e.ts.net" : null, computers: tailscale !== "unshared" };
+let companion: CompanionState = {
+ enabled: true, keepAwake: false, port: 8810, pairing: null,
+ devices: full ? [
+ { id: "iphone", name: "Ada’s iPhone 16", createdAt: now - 9e8, lastSeenAt: now - MIN, cloudDesktopAccess: false, e2eAt: now - 5e8, routes: "any", route: "wifi" },
+ { id: "pixel", name: "Pixel 9", createdAt: now - 9e8, lastSeenAt: now - 26 * 60 * MIN, cloudDesktopAccess: false, e2eAt: now - 5e8, routes: "any", route: null },
+ ] : [],
+ connectedDeviceIds: full ? ["iphone"] : [],
+ routes: { wifi: { on: full, since: now - 9e8 }, relay: { on: full, since: now - 9e8 }, tailscale: tailRoute, https: { on: false, since: null } },
+ tailnetShare: ready && tailscale !== "unshared" ? { on: true, origin: "http://ada-macbook.tail4c2e.ts.net:8799", https: false, problem: null } : undefined,
+};
+const problem = ["not-installed", "no-cli", "signed-out", "needs-approval"].includes(tailscale) ? tailscale as CompanionState["tailscaleProblem"] : undefined;
+const reply = async (next?: Partial<CompanionState>) => { companion = { ...companion, ...next }; return companion; };
+const companionBridge = {
+ state: () => reply(), start: () => reply(), stop: () => reply(), keepAwake: () => reply(), refreshTailscale: () => reply(),
+ setTailscaleComputers: async () => (problem ? { ...companion, tailscaleProblem: problem } : reply({ routes: { ...companion.routes!, tailscale: { ...tailRoute, on: true, name: "ada-macbook.tail4c2e.ts.net", computers: true } }, tailnetShare: { on: true, origin: "http://ada-macbook.tail4c2e.ts.net:8799", https: false, problem: null } })),
+ setTailscale: () => reply(), setRoute: () => reply(), dismissNotice: () => reply(), pairing: () => reply(), renewPairing: () => reply(),
+ cloudDesktop: () => reply(), browserControl: () => reply(), routes: () => reply(),
+ revoke: (id: string) => reply({ devices: companion.devices.filter((device) => device.id !== id) }),
+};
+const environments = full ? [
+ { id: "local", kind: "local" as const, name: "This computer" },
+ { id: "home", kind: "remote" as const, name: "Ada’s Cloud", origin: "https://ada.mausbot.cloud", home: true, color: "violet" },
+ { id: "mini", kind: "remote" as const, name: "Studio Mac mini", origin: "http://studio-mini.tail4c2e.ts.net:8799" },
+ { id: "vps", kind: "remote" as const, name: "Hetzner box", origin: "https://maus.example.com" },
+] : [{ id: "local", kind: "local" as const, name: "This computer" }];
+const statuses = full ? [
+ { id: "mini", state: "connected", since: now - 9e8, version: "0.1.171", behind: true, install: "global" },
+ { id: "vps", state: "cantReach", since: now - 40 * MIN, version: "0.1.180", behind: false, install: "docker" },
+] : [];
+const ogb = {
+ platform: "darwin",
+ app: { version: "0.1.180" },
+ ...(place === "computer" ? {
+ companion: companionBridge,
+ companionAccount: { state: async () => ({ available: true, status: "ready", email: "[email protected]" }) },
+ environments: { state: async () => ({ localOrigin: "http://127.0.0.1:8799", remote: false, packaged: true, activeId: "local", environments }), status: async () => statuses,
+ switch: async () => {}, forget: async () => {}, retry: async () => {}, addFromLink: async () => {}, create: async () => ({ ok: true, state: null }), pickDir: async () => ({ ok: false }) },
+ computerSharing: { servers: async () => (full ? [{ id: "mini", enabled: true, connected: true, paused: false }] : []) },
+ workspaces: { state: () => new Promise(() => {}), places: () => new Promise(() => {}), add: async () => {}, probe: async () => ({ outcome: "problem", problem: "empty" }) },
+ } : {}),
+};
+(globalThis as unknown as { ogb: unknown }).ogb = ogb;
+
+const sessions = full ? [
+ { id: "s-mini", label: "Studio Mac mini", scopes: ["admin", "client"], createdAt: now - 9e8, lastSeenAt: now - 2 * MIN, expiresAt: now + 9e8 },
+ { id: "s-air", label: "Ada’s MacBook Air", scopes: ["admin", "client"], createdAt: now - 9e8, lastSeenAt: now - 3 * 60 * MIN, expiresAt: now + 9e8 },
+ ...(place === "cloud" ? [{ id: "s-phone", label: "Safari on iPhone", scopes: ["admin", "client"], createdAt: now - 9e8, lastSeenAt: now - MIN, expiresAt: now + 9e8 }] : []),
+] : [];
+const ANSWERS: Record<string, unknown> = {
+ "/api/auth/session": { kind: "loopback", trust: "owner" },
+ "/api/auth/sessions": { sessions, current: null },
+ "/api/phones": { phones: full ? [{ key: "k1", registration: { installId: "i1", name: "Ada’s iPhone 16", platform: "ios", appVersion: "2.4.0", timeZone: "UTC", capabilities: {} }, registeredAt: now - 9e8, seen: now - MIN, lastUsedAt: null, online: true, busy: false }] : [] },
+ "/api/auth/pairing": { id: "p1", code: "7KQ2-M9XD-H4TP", expiresAt: now + 10 * MIN, url: "http://ada-macbook.tail4c2e.ts.net:8799/pair#code=7KQ2-M9XD-H4TP", hint: null },
+};
+const config = {
+ profile: { name: "Ada", email: "[email protected]" }, membership: { authority: "local", pairingCodes: true }, managedPolicy: null,
+ vps: { configured: full, sshAlias: "", servers: full ? [{ name: "GPU box", sshAlias: "gpu" }] : [] },
+ ...(place === "cloud" ? { cloudHome: true } : {}),
+};
+ANSWERS["/api/config"] = config;
+globalThis.fetch = async (input: RequestInfo | URL) => {
+ const path = new URL(typeof input === "string" ? input : input instanceof URL ? input.href : input.url, location.href).pathname;
+ if (path === "/api/shared-computers" && place === "cloud" && full) {
+ return Response.json({ computers: [], known: [{ id: "l1", name: "Ada’s MacBook Pro", platform: "darwin", online: true, busy: false, lent: true, lastSeenAt: now, lastUsedAt: null, scopes: { folders: 1, terminal: true, screen: true, internet: false, chrome: false } }] });
+ }
+ if (path in ANSWERS) return Response.json(ANSWERS[path]);
+ return Response.json({ error: "not in the preview" }, { status: 404 });
+};
+
+const state = { ...initialState, config: config as never, appSettingsOpen: true, appSettingsSection: "devices" as const };
+createRoot(document.getElementById("root")!).render(
+ <StrictMode>
+ <StoreContext.Provider value={{ state, dispatch: () => {} } as never}>
+ <div className="min-h-screen bg-app" />
+ <SettingsModal />
+ </StoreContext.Provider>
+ </StrictMode>,
+);
+
+const click = (selector: string) => document.querySelector<HTMLElement>(selector)?.click();
+const after = (ms: number, run: () => void) => window.setTimeout(run, ms);
+if (params.get("check") === "1") after(900, () => click("[data-network-action]"));
+const select = params.get("select");
+if (select) after(900, () => click(`[data-device-node="${select}"]`));
+const add = params.get("add");
+if (add) after(900, () => { click("[data-add-device]"); if (add !== "choose") after(200, () => click(`[data-add-kind="${add}"]`)); });
diff --git a/src/lib/devices.test.ts b/src/lib/devices.test.ts
new file mode 100644
index 0000000000..3df8e88c6e
--- /dev/null
+++ b/src/lib/devices.test.ts
@@ -0,0 +1,170 @@
+import { describe, expect, it } from "vitest";
+import type { ServerStatus } from "../../electron/server-status.mjs";
+import type { CompanionState, PhoneDevice } from "./companion-types";
+import { buildDevices, groupByRoute, kindFromLabel, nameKey, privateNetwork, type DeviceSources } from "./devices";
+import type { PublicPhone } from "./phones";
+
+const NOW = 1_800_000_000_000;
+const here = { name: "This computer", kind: "computer" as const, version: "0.1.180", desktop: true };
+const status = (id: string, over: Partial<ServerStatus> = {}): ServerStatus => ({ id, state: "connected", since: NOW, version: "0.1.180", behind: false, install: "npx", ...over });
+const phone = (id: string, name: string, over: Partial<PhoneDevice> = {}): PhoneDevice => ({ id, name, createdAt: NOW - 1e9, lastSeenAt: NOW - 3_600_000, cloudDesktopAccess: false, ...over });
+const app = (key: string, name: string, online = true): PublicPhone => ({
+ key, registration: { installId: key, name, platform: "ios", appVersion: "2.4.0", timeZone: "UTC", capabilities: {} }, registeredAt: NOW - 1e9, seen: NOW - 60_000, lastUsedAt: null, online, busy: false,
+});
+const places = (environments: NonNullable<DeviceSources["places"]>["environments"]): NonNullable<DeviceSources["places"]> =>
+ ({ localOrigin: "http://127.0.0.1:8799", remote: false, packaged: true, activeId: "local", environments });
+const build = (over: Partial<DeviceSources>) => buildDevices({ here, now: NOW, ...over });
+
+describe("the device list", () => {
+ it("is this place alone when nothing else is connected", () => {
+ const [self, ...rest] = build({});
+ expect(rest).toEqual([]);
+ expect(self).toMatchObject({ id: "here", kind: "laptop", status: "online", route: "here", here: true, canRunBots: true, canHostComputer: true, version: "0.1.180" });
+ expect(buildDevices({ here: { name: "My Cloud", kind: "cloud", desktop: false } })[0]).toMatchObject({ kind: "cloud", canHostComputer: false });
+ });
+
+ it("reads each saved place as a Cloud or a server, with how it is reached and the one thing to do", () => {
+ const devices = build({
+ places: places([
+ { id: "local", kind: "local", name: "This computer" },
+ { id: "home", kind: "remote", name: "My Cloud", origin: "https://ada.mausbot.cloud", home: true },
+ { id: "mini", kind: "remote", name: "Studio", origin: "http://studio-mini.tail1234.ts.net:8799" },
+ { id: "vps", kind: "remote", name: "Hetzner box", origin: "https://maus.example.com" },
+ { id: "lan", kind: "remote", name: "Old PC", origin: "http://192.168.1.40:8799" },
+ ]),
+ statuses: [status("mini", { behind: true, version: "0.1.170", install: "global" }), status("vps", { state: "cantReach" }), status("lan", { state: "signedOut" })],
+ lending: [{ id: "mini", enabled: true }, { id: "lan", enabled: false }],
+ });
+ expect(devices.map((device) => device.id)).toEqual(["here", "place:home", "place:mini", "place:vps", "place:lan"]);
+ const [, home, mini, vps, lan] = devices;
+ expect(home).toMatchObject({ kind: "cloud", route: "cloud", status: "unknown", canRunBots: true, home: true });
+ expect(devices.filter((device) => device.usesThisComputer).map((device) => device.id)).toEqual(["place:mini"]);
+ expect(home!.address).toBeUndefined();
+ expect(home!.actions.map((action) => action.type)).toEqual(["switch"]);
+ expect(mini).toMatchObject({ kind: "server", route: "tailscale", status: "attention", note: "update", version: "0.1.170", address: "http://studio-mini.tail1234.ts.net:8799" });
+ expect(mini!.actions).toContainEqual({ type: "copy-update", install: "global" });
+ expect(vps).toMatchObject({ route: "internet", status: "offline", note: "unreachable" });
+ expect(vps!.actions.map((action) => action.type)).toEqual(["switch", "retry", "pair-again", "copy-address", "remove"]);
+ expect(lan).toMatchObject({ route: "local", status: "attention", note: "signed-out" });
+ });
+
+ it("leaves out the place on screen and this computer's own environments", () => {
+ const devices = build({ places: { ...places([{ id: "home", kind: "remote", name: "My Cloud", origin: "https://a.mausbot.cloud", home: true }, { id: "env2", kind: "local", name: "Work", dataDir: "/x" }]), activeId: "home" } });
+ expect(devices.map((device) => device.id)).toEqual(["here"]);
+ });
+
+ it("reads paired phones with their live route, offline ones by the way they may use", () => {
+ const companion: Pick<CompanionState, "devices" | "connectedDeviceIds" | "routes"> = {
+ devices: [phone("a", "Ada's iPhone", { route: "wifi" }), phone("b", "Pixel 9", { route: "tailscale" }), phone("c", "iPad", { route: null })],
+ connectedDeviceIds: ["a", "b"],
+ routes: { wifi: { on: true, since: 1 }, relay: { on: true, since: 1 }, tailscale: { on: true, since: 1, name: "ada.ts.net" }, https: { on: false, since: null } },
+ };
+ const [, a, b, c] = build({ companion });
+ expect(a).toMatchObject({ id: "phone:a", kind: "phone", status: "online", route: "local" });
+ expect(b).toMatchObject({ status: "online", route: "tailscale" });
+ expect(c).toMatchObject({ status: "offline", route: "relay", lastSeen: NOW - 3_600_000 });
+ expect(c!.actions[0]).toEqual({ type: "remove", source: { type: "phone", id: "c" } });
+ });
+
+ it("joins a phone paired here and the same phone's apps into one device, removable from both", () => {
+ const devices = build({ companion: { devices: [phone("a", "Ada’s iPhone")], connectedDeviceIds: [] }, phoneApps: [app("k1", "ada's iphone"), app("k2", "Work Android", false)] });
+ expect(devices.map((device) => device.id)).toEqual(["here", "phone:a", "phone-app:k2"]);
+ const [, joined, other] = devices;
+ expect(joined).toMatchObject({ status: "online", version: "2.4.0" });
+ expect(joined!.sources).toEqual([{ type: "phone", id: "a" }, { type: "phone-app", id: "k1" }]);
+ expect(joined!.actions.filter((action) => action.type === "remove")).toHaveLength(2);
+ expect(other).toMatchObject({ status: "offline", route: "paired" });
+ });
+
+ it("joins a server reached over Tailscale and the same machine paired here under its host name", () => {
+ const devices = build({
+ companion: { devices: [], connectedDeviceIds: [], routes: { wifi: { on: false, since: null }, relay: { on: false, since: null }, tailscale: { on: true, since: 1, name: "me.ts.net", computers: true }, https: { on: false, since: null } } },
+ places: places([{ id: "mini", kind: "remote", name: "Studio", origin: "http://studio-mini.tail1234.ts.net:8799" }]),
+ statuses: [status("mini", { state: "cantReach" })],
+ sessions: { current: null, sessions: [{ id: "s1", label: "Studio Mini", scopes: ["admin", "client"], lastSeenAt: NOW - 30_000 }] },
+ });
+ expect(devices.map((device) => device.id)).toEqual(["here", "place:mini"]);
+ expect(devices[1]).toMatchObject({ status: "online", routes: ["tailscale"], sources: [{ type: "place", id: "mini" }, { type: "session", id: "s1" }] });
+ expect(devices[1]!.note).toBeUndefined();
+ const behind = build({
+ places: places([{ id: "mini", kind: "remote", name: "Studio Mac mini", origin: "http://studio-mini.tail1234.ts.net:8799" }]),
+ statuses: [status("mini", { behind: true })],
+ sessions: { current: null, sessions: [{ id: "s1", label: "Studio Mac mini", scopes: ["admin"], lastSeenAt: NOW }] },
+ });
+ expect(behind[1]).toMatchObject({ kind: "desktop", status: "attention", note: "update" });
+ });
+
+ it("keeps two sessions with one label apart, and never joins a phone to a computer", () => {
+ const sessions = [
+ { id: "s1", label: "Chrome on Mac", scopes: ["admin"], lastSeenAt: NOW - 1_000 },
+ { id: "s2", label: "Chrome on Mac", scopes: ["admin"], lastSeenAt: NOW - 86_400_000 },
+ { id: "s3", label: "Pixel 9", scopes: ["admin"], lastSeenAt: NOW },
+ ];
+ const devices = build({ sessions: { current: null, sessions }, places: places([{ id: "p", kind: "remote", name: "Pixel 9", origin: "https://pixel.example.com" }]) });
+ expect(devices.map((device) => device.id)).toEqual(["here", "place:p", "session:s1", "session:s2", "session:s3"]);
+ expect(devices[2]).toMatchObject({ status: "online", kind: "laptop" });
+ expect(devices[3]).toMatchObject({ status: "offline" });
+ expect(devices[4]).toMatchObject({ kind: "phone" });
+ });
+
+ it("leaves out this browser, script tokens and, on a Cloud, chat-only sessions", () => {
+ const sessions = [
+ { id: "me", label: "Chrome on Mac", scopes: ["admin"], lastSeenAt: NOW },
+ { id: "cli", label: "Script", scopes: ["admin"], lastSeenAt: NOW, token: true as const },
+ { id: "mate", label: "Safari on iPhone", scopes: ["client"], lastSeenAt: NOW },
+ { id: "mine", label: "Safari on iPad", scopes: ["admin", "client"], lastSeenAt: NOW - 600_000 },
+ ];
+ const cloud = buildDevices({ here: { name: "My Cloud", kind: "cloud", desktop: false }, now: NOW, sessions: { current: "me", sessions } });
+ expect(cloud.map((device) => device.id)).toEqual(["here", "session:mine"]);
+ expect(cloud[1]).toMatchObject({ route: "cloud", kind: "phone", status: "offline" });
+ const server = buildDevices({ here: { name: "box", kind: "server", desktop: false }, now: NOW, sessions: { current: "me", sessions } });
+ expect(server.map((device) => device.id)).toEqual(["here", "session:mate", "session:mine"]);
+ expect(server[1]!.route).toBe("internet");
+ });
+
+ it("reads lent computers that still lend, and servers bots reach over SSH, as computers bots can use", () => {
+ const devices = buildDevices({
+ here: { name: "My Cloud", kind: "cloud", desktop: true }, now: NOW,
+ lent: [{ id: "l1", name: "Ada's MacBook", platform: "darwin", online: true, lent: true, lastSeenAt: NOW }, { id: "l2", name: "Old", platform: "linux", online: false, lent: false, lastSeenAt: 0 }],
+ vps: [{ alias: "my-vps" }, { alias: "my-vps", name: "Again" }, { alias: "gpu", name: "GPU box" }],
+ });
+ expect(devices.map((device) => device.id)).toEqual(["here", "lent:l1", "vps:my-vps", "vps:gpu"]);
+ expect(devices[3]!.name).toBe("GPU box");
+ expect(devices[1]).toMatchObject({ route: "cloud", canHostComputer: true, canRunBots: false, status: "online" });
+ expect(devices[2]).toMatchObject({ kind: "server", route: "ssh", status: "unknown", canHostComputer: true });
+ });
+
+ it("groups the map by route in one fixed order, this place apart", () => {
+ const devices = build({
+ places: places([{ id: "home", kind: "remote", name: "My Cloud", origin: "https://a.mausbot.cloud", home: true }, { id: "mini", kind: "remote", name: "mini", origin: "http://mini.tail1.ts.net:8799" }]),
+ companion: { devices: [phone("a", "Phone", { route: "wifi" })], connectedDeviceIds: ["a"] },
+ });
+ expect(groupByRoute(devices).map((group) => [group.route, group.devices.map((device) => device.id)])).toEqual([
+ ["tailscale", ["place:mini"]], ["local", ["phone:a"]], ["cloud", ["place:home"]],
+ ]);
+ });
+});
+
+describe("names", () => {
+ it("compare without case, punctuation or a .local suffix", () => {
+ expect(nameKey("Ada’s MacBook-Pro.local")).toBe(nameKey("ads macbook pro".replace("ads", "adas")));
+ expect(kindFromLabel("Safari on iPhone")).toBe("phone");
+ expect(kindFromLabel("Studio Mac mini")).toBe("desktop");
+ expect(kindFromLabel("Chrome on Windows")).toBe("laptop");
+ });
+});
+
+describe("the private network", () => {
+ const routes = (tailscale: Partial<NonNullable<CompanionState["routes"]>["tailscale"]>) => ({
+ wifi: { on: false, since: null }, relay: { on: false, since: null }, https: { on: false, since: null }, tailscale: { on: false, since: null, ...tailscale },
+ });
+ it("is not shown without the desktop's phone link, and unknown until the person asks", () => {
+ expect(privateNetwork(null, null)).toBeNull();
+ expect(privateNetwork({ routes: routes({}) }, null)).toEqual({ state: "unknown", name: null, shared: false });
+ });
+ it("takes the last check's reason, then MagicDNS, then ready with this computer's name", () => {
+ expect(privateNetwork({ routes: routes({}) }, "not-installed")?.state).toBe("not-installed");
+ expect(privateNetwork({ routes: routes({ on: true, computers: true }) }, null)).toEqual({ state: "magicdns", name: null, shared: true });
+ expect(privateNetwork({ routes: routes({ on: true, name: "ada.tail1.ts.net", computers: true }) }, null)).toEqual({ state: "ready", name: "ada.tail1.ts.net", shared: true });
+ });
+});
diff --git a/src/lib/devices.ts b/src/lib/devices.ts
new file mode 100644
index 0000000000..2214753279
--- /dev/null
+++ b/src/lib/devices.ts
@@ -0,0 +1,318 @@
+import { serverTransport } from "../../electron/server-address.mjs";
+import type { ServerInstall, ServerStatus } from "../../electron/server-status.mjs";
+import type { CompanionState, PhoneDevice } from "./companion-types";
+import type { PublicPhone } from "./phones";
+
+/** What a device is, for its icon and its group in the list. `vm` is a bot's own computer. */
+export type DeviceKind = "laptop" | "desktop" | "server" | "cloud" | "phone" | "vm";
+/** `unknown`: nothing says how it is right now (a Cloud the Admin runs, a server bots reach over SSH). */
+export type DeviceStatus = "online" | "offline" | "attention" | "unknown";
+/** How a device reaches the place on screen: `here` is the place itself. `paired` is a device signed in with a code,
+ * whose way in the server does not record. */
+export type DeviceRoute = "here" | "local" | "tailscale" | "relay" | "cloud" | "internet" | "ssh" | "paired";
+/** What needs the person, when `status` is `attention` (or `offline` with a way to try again). */
+export type DeviceNote = "update" | "signed-out" | "insecure" | "unreachable" | "reconnecting";
+
+/** Where a device was read from, and its id there: what every action acts on. */
+export type DeviceSource =
+ | { type: "place"; id: string }
+ | { type: "phone"; id: string }
+ | { type: "phone-app"; id: string }
+ | { type: "session"; id: string }
+ | { type: "lent"; id: string }
+ | { type: "vps"; id: string };
+
+export type DeviceAction =
+ | { type: "switch"; placeId: string }
+ | { type: "remove"; source: DeviceSource }
+ | { type: "copy-address"; address: string }
+ | { type: "pair-again"; placeId: string; address: string }
+ | { type: "retry"; placeId: string }
+ | { type: "copy-update"; install: ServerInstall | null }
+ | { type: "manage"; page: "phone" | "ai" | "desktops" | "app"; anchor?: string };
+
+export interface Device {
+ /** Stable across reads: the first source's type and its own id there, never the name. */
+ id: string;
+ kind: DeviceKind;
+ name: string;
+ status: DeviceStatus;
+ /** The way it reaches this place now (or last did); `routes` holds every way any of its sources says. */
+ route: DeviceRoute;
+ routes: DeviceRoute[];
+ lastSeen?: number;
+ version?: string;
+ /** The address another device opens; for the details, never the map. */
+ address?: string;
+ note?: DeviceNote;
+ sources: DeviceSource[];
+ /** It runs bots of its own: a place this app opens, or this place itself. */
+ canRunBots: boolean;
+ /** Bots can work on it: this desktop, a computer lent to this place, a server bots reach over SSH. */
+ canHostComputer: boolean;
+ here?: true;
+ /** The place the bots live: My Cloud, or a server the person made their home. */
+ home?: true;
+ /** This desktop lets that place's bots use it (Share this computer is on). */
+ usesThisComputer?: boolean;
+ actions: DeviceAction[];
+}
+
+type SavedPlaces = Awaited<ReturnType<NonNullable<NonNullable<Window["ogb"]>["environments"]>["state"]>>;
+type SavedPlace = SavedPlaces["environments"][number];
+
+/** A device signed in to this server with a pairing code (`GET /api/auth/sessions`). */
+export interface SignedInDevice {
+ id: string;
+ label: string;
+ scopes: string[];
+ lastSeenAt: number;
+ email?: string;
+ person?: string;
+ token?: true;
+}
+
+/** A computer lent to this place (`GET /api/shared-computers`, its `known` list). */
+export interface LentDevice {
+ id: string;
+ name: string;
+ platform: "darwin" | "win32" | "linux" | null;
+ online: boolean;
+ lent: boolean;
+ lastSeenAt: number;
+}
+
+export interface DeviceSources {
+ here: { name: string; kind: "computer" | "cloud" | "team" | "server"; version?: string | null; desktop: boolean };
+ /** This app's saved places: only on This computer's own page, where they are the app's own connections. */
+ places?: SavedPlaces | null;
+ statuses?: readonly ServerStatus[] | null;
+ /** The saved places this desktop lets use it, as `computerSharing.servers()` says. */
+ lending?: ReadonlyArray<{ id: string; enabled: boolean }> | null;
+ companion?: Pick<CompanionState, "devices" | "connectedDeviceIds" | "routes"> | null;
+ phoneApps?: readonly PublicPhone[] | null;
+ sessions?: { sessions: readonly SignedInDevice[]; current: string | null } | null;
+ lent?: readonly LentDevice[] | null;
+ /** The servers bots reach over SSH: the SSH alias, and the name the person gave it. */
+ vps?: ReadonlyArray<{ alias: string; name?: string }> | null;
+ now?: number;
+}
+
+/** A signed-in device last seen this recently counts as on now: sessions record when they were used, not presence. */
+export const SESSION_ONLINE_MS = 5 * 60_000;
+
+const PHONE_LABEL = /\b(iphone|ipad|android|pixel|galaxy|phone)\b/i;
+const MINI_LABEL = /\b(mac ?mini|mac studio|imac|desktop|nuc)\b/i;
+
+/** The name two sources would both give one machine: case, punctuation and a `.local` suffix aside. */
+export function nameKey(name: string): string {
+ return name.toLowerCase().replace(/[’']/g, "").replace(/\.local$/, "").replace(/[^\p{L}\p{N}]+/gu, " ").trim();
+}
+
+const hostKey = (origin: string): string | null => {
+ try {
+ const host = new URL(origin).hostname;
+ return /^[\d.]+$|:/.test(host) ? null : nameKey(host.split(".")[0] ?? "");
+ } catch {
+ return null;
+ }
+};
+
+export function kindFromLabel(label: string): DeviceKind {
+ if (PHONE_LABEL.test(label)) return "phone";
+ return MINI_LABEL.test(label) ? "desktop" : "laptop";
+}
+
+function placeRoute(entry: SavedPlace): DeviceRoute {
+ if (entry.home || entry.cloud || !entry.origin) return "cloud";
+ const transport = serverTransport(entry.origin);
+ return transport === "tailscale" ? "tailscale" : transport === "https" ? "internet" : "local";
+}
+
+const byHand = (entry: SavedPlace) => Boolean(entry.origin) && !entry.home && !entry.cloud && !("team" in entry && entry.team);
+
+function placeState(status: ServerStatus | undefined): Pick<Device, "status" | "note"> {
+ if (!status) return { status: "unknown" };
+ if (status.state === "connected") return status.behind ? { status: "attention", note: "update" } : { status: "online" };
+ if (status.state === "signedOut") return { status: "attention", note: "signed-out" };
+ if (status.state === "insecure") return { status: "attention", note: "insecure" };
+ if (status.state === "cantReach") return { status: "offline", note: "unreachable" };
+ if (status.state === "reconnecting") return { status: "offline", note: "reconnecting" };
+ return { status: "unknown" };
+}
+
+function fromPlace(entry: SavedPlace, status: ServerStatus | undefined, lends: boolean): Device {
+ const hand = byHand(entry);
+ const state = hand ? placeState(status) : { status: "unknown" as const };
+ const route = placeRoute(entry);
+ const actions: DeviceAction[] = [{ type: "switch", placeId: entry.id }];
+ if (hand && entry.origin) {
+ if (state.note === "unreachable") actions.push({ type: "retry", placeId: entry.id });
+ if (state.note === "update") actions.push({ type: "copy-update", install: status?.install ?? null });
+ actions.push({ type: "pair-again", placeId: entry.id, address: entry.origin });
+ actions.push({ type: "copy-address", address: entry.origin });
+ }
+ if (!entry.home) actions.push({ type: "remove", source: { type: "place", id: entry.id } });
+ return {
+ id: `place:${entry.id}`, kind: entry.home || entry.cloud ? "cloud" : MINI_LABEL.test(entry.name) ? "desktop" : "server", name: entry.name, ...state, route, routes: [route],
+ ...(hand && status?.version ? { version: status.version } : {}), ...(hand && entry.origin ? { address: entry.origin } : {}),
+ sources: [{ type: "place", id: entry.id }], canRunBots: true, canHostComputer: false, ...(entry.home ? { home: true as const } : {}),
+ ...(lends ? { usesThisComputer: true } : {}), actions,
+ };
+}
+
+function phoneRoute(device: PhoneDevice, routes: CompanionState["routes"] | undefined): DeviceRoute {
+ if (device.route === "wifi") return "local";
+ if (device.route === "tailscale" || device.route === "relay") return device.route;
+ if (device.routes !== "local" && routes?.relay?.on) return "relay";
+ return routes?.tailscale?.on && !routes?.wifi?.on ? "tailscale" : "local";
+}
+
+function fromPhone(device: PhoneDevice, connected: ReadonlySet<string>, routes: CompanionState["routes"] | undefined): Device {
+ const route = phoneRoute(device, routes);
+ return {
+ id: `phone:${device.id}`, kind: "phone", name: device.name, status: connected.has(device.id) || device.route ? "online" : "offline",
+ route, routes: [route], lastSeen: device.lastSeenAt, sources: [{ type: "phone", id: device.id }], canRunBots: false, canHostComputer: false,
+ actions: [{ type: "remove", source: { type: "phone", id: device.id } }, { type: "manage", page: "phone", anchor: "paired" }],
+ };
+}
+
+function fromPhoneApp(phone: PublicPhone): Device {
+ return {
+ id: `phone-app:${phone.key}`, kind: "phone", name: phone.registration.name, status: phone.online ? "online" : "offline", route: "paired", routes: ["paired"],
+ lastSeen: phone.seen, version: phone.registration.appVersion, sources: [{ type: "phone-app", id: phone.key }], canRunBots: false, canHostComputer: false,
+ actions: [{ type: "remove", source: { type: "phone-app", id: phone.key } }],
+ };
+}
+
+function fromSession(session: SignedInDevice, route: DeviceRoute, now: number): Device {
+ const name = session.person ? `${session.person} · ${session.label}` : session.label;
+ return {
+ id: `session:${session.id}`, kind: kindFromLabel(session.label), name, status: now - session.lastSeenAt < SESSION_ONLINE_MS ? "online" : "offline",
+ route, routes: [route], lastSeen: session.lastSeenAt, sources: [{ type: "session", id: session.id }], canRunBots: false, canHostComputer: false,
+ actions: [{ type: "remove", source: { type: "session", id: session.id } }],
+ };
+}
+
+function fromLent(computer: LentDevice, route: DeviceRoute): Device {
+ return {
+ id: `lent:${computer.id}`, kind: "laptop", name: computer.name, status: computer.online ? "online" : "offline", route, routes: [route],
+ lastSeen: computer.lastSeenAt, sources: [{ type: "lent", id: computer.id }], canRunBots: false, canHostComputer: true, actions: [],
+ };
+}
+
+function fromVps({ alias, name }: { alias: string; name?: string }): Device {
+ return {
+ id: `vps:${alias}`, kind: "server", name: name?.trim() || alias, status: "unknown", route: "ssh", routes: ["ssh"], sources: [{ type: "vps", id: alias }],
+ canRunBots: false, canHostComputer: true, actions: [{ type: "manage", page: "ai", anchor: "ai-keys" }],
+ };
+}
+
+/** Joined sources keep the one that needs the person first, then the one that is online. */
+const STATUS_RANK: Record<DeviceStatus, number> = { attention: 4, online: 3, offline: 1, unknown: 0 };
+const isComputer = (kind: DeviceKind) => kind !== "phone";
+
+/** One machine two sources both list: the first keeps its id and kind; routes, sources and actions join. */
+function join(into: Device, other: Device): Device {
+ const status = STATUS_RANK[other.status] > STATUS_RANK[into.status] ? other.status : into.status;
+ const seen = Math.max(into.lastSeen ?? 0, other.lastSeen ?? 0);
+ return {
+ ...into, status, note: status === into.status ? into.note : other.note, routes: [...new Set([...into.routes, ...other.routes])],
+ ...(seen ? { lastSeen: seen } : {}), version: into.version ?? other.version, address: into.address ?? other.address,
+ sources: [...into.sources, ...other.sources], canRunBots: into.canRunBots || other.canRunBots, canHostComputer: into.canHostComputer || other.canHostComputer,
+ actions: [...into.actions, ...other.actions.filter((action) => action.type === "remove" || !into.actions.some((mine) => mine.type === action.type))],
+ };
+}
+
+/** Merges the device lists in order of how much each knows. A later device joins an earlier one only when it is the
+ * same sort (a phone with a phone, a computer with a computer), from another source, and the name they share is
+ * unique on both sides: two "Chrome on Mac" sessions stay two devices. */
+function mergeAll(lists: Device[][], aliases: ReadonlyMap<string, string[]>): Device[] {
+ const out: Device[] = [];
+ const keysOf = (device: Device) => [nameKey(device.name), ...(aliases.get(device.id) ?? [])].filter(Boolean);
+ const count = new Map<string, number>();
+ for (const device of lists.flat()) {
+ for (const key of new Set(keysOf(device))) count.set(`${device.sources[0]!.type}|${key}`, (count.get(`${device.sources[0]!.type}|${key}`) ?? 0) + 1);
+ }
+ const unique = (device: Device, key: string) => count.get(`${device.sources[0]!.type}|${key}`) === 1;
+ for (const list of lists) {
+ for (const device of list) {
+ const keys = keysOf(device).filter((key) => unique(device, key));
+ const at = out.findIndex((known) => isComputer(known.kind) === isComputer(device.kind)
+ && !known.sources.some((source) => source.type === device.sources[0]!.type)
+ && keysOf(known).some((key) => keys.includes(key) && unique(known, key)));
+ if (at < 0) out.push(device);
+ else out[at] = join(out[at]!, device);
+ }
+ }
+ return out;
+}
+
+/** Every device the sources know, this place first. */
+export function buildDevices(sources: DeviceSources): Device[] {
+ const now = sources.now ?? Date.now();
+ const { here } = sources;
+ const self: Device = {
+ id: "here", kind: here.kind === "computer" ? "laptop" : here.kind === "server" ? "server" : "cloud", name: here.name, status: "online", route: "here", routes: ["here"],
+ ...(here.version ? { version: here.version } : {}), sources: [], canRunBots: true, canHostComputer: here.kind === "computer" && here.desktop, here: true, actions: [],
+ };
+ const statuses = sources.statuses ?? [];
+ const aliases = new Map<string, string[]>();
+ const places = (sources.places?.environments ?? [])
+ .filter((entry) => entry.kind !== "local" && entry.id !== "local" && entry.id !== sources.places?.activeId)
+ .map((entry) => {
+ const device = fromPlace(entry, statuses.find((status) => status.id === entry.id), (sources.lending ?? []).some((lent) => lent.id === entry.id && lent.enabled));
+ const host = entry.origin && byHand(entry) ? hostKey(entry.origin) : null;
+ if (host) aliases.set(device.id, [host]);
+ return device;
+ });
+ const connected = new Set(sources.companion?.connectedDeviceIds ?? []);
+ const phones = (sources.companion?.devices ?? []).map((device) => fromPhone(device, connected, sources.companion?.routes));
+ const apps = (sources.phoneApps ?? []).map(fromPhoneApp);
+ const remote: DeviceRoute = here.kind === "computer" ? (sources.companion?.routes?.tailscale?.on ? "tailscale" : "local") : here.kind === "server" ? "internet" : "cloud";
+ // A Cloud lists only the devices that can manage it: its chat-only sessions are teammates' (ServerPairingCard's rule).
+ const signedIn = (sources.sessions?.sessions ?? [])
+ .filter((session) => session.id !== sources.sessions?.current && !session.token && (here.kind === "computer" || here.kind === "server" || session.scopes.includes("admin")))
+ .map((session) => fromSession(session, remote, now));
+ const lent = (sources.lent ?? []).filter((computer) => computer.lent).map((computer) => fromLent(computer, here.kind === "computer" || here.kind === "server" ? "paired" : "cloud"));
+ const vps = (sources.vps ?? []).filter((server, index, all) => server.alias && all.findIndex((other) => other.alias === server.alias) === index).map(fromVps);
+ return [self, ...mergeAll([places, lent, phones, apps, signedIn, vps], aliases)];
+}
+
+/** The private network as the map draws it. `unknown`: not asked yet, since the app asks Tailscale only when told to. */
+export type PrivateNetworkState = "unknown" | "not-installed" | "no-cli" | "signed-out" | "not-running" | "needs-approval" | "needs-permission" | "magicdns" | "ready";
+
+export interface PrivateNetwork {
+ state: PrivateNetworkState;
+ /** This computer's name on it, once ready. */
+ name: string | null;
+ /** Other computers on it may open this one (Your other computers is on). */
+ shared: boolean;
+}
+
+/** `problem`: the reason the last Turn on or Check again gave, which only that answer carries. */
+export function privateNetwork(companion: Pick<CompanionState, "routes" | "tailnetShare"> | null | undefined, problem: CompanionState["tailscaleProblem"] | null): PrivateNetwork | null {
+ if (!companion) return null;
+ const route = companion.routes?.tailscale;
+ const shared = route?.on === true && route.computers === true;
+ if (problem) return { state: problem, name: null, shared };
+ if (!route?.on) return { state: "unknown", name: null, shared: false };
+ if (!route.name) return { state: "magicdns", name: null, shared };
+ return { state: "ready", name: route.name, shared };
+}
+
+/** A device inside the private network's group on the map: on it now, or reached over it. */
+export const onPrivateNetwork = (device: Device): boolean => device.route === "tailscale";
+
+/** The groups the map draws below this place, in a fixed order, each with its devices; empty groups are left out. */
+export const ROUTE_ORDER: readonly DeviceRoute[] = ["tailscale", "local", "relay", "cloud", "internet", "paired", "ssh"];
+
+export function groupByRoute(devices: readonly Device[]): Array<{ route: DeviceRoute; devices: Device[] }> {
+ return ROUTE_ORDER.map((route) => ({ route, devices: devices.filter((device) => !device.here && device.route === route) }))
+ .filter((group) => group.devices.length > 0);
+}
+
+/** The list's groups under the map: what a person calls them. */
+export type DeviceGroup = "computers" | "servers" | "phones";
+export const deviceGroup = (device: Device): DeviceGroup =>
+ device.kind === "phone" ? "phones" : device.kind === "laptop" || device.kind === "desktop" ? "computers" : "servers";
diff --git a/src/lib/use-devices.ts b/src/lib/use-devices.ts
new file mode 100644
index 0000000000..8d5e1d9c9b
--- /dev/null
+++ b/src/lib/use-devices.ts
@@ -0,0 +1,84 @@
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import type { ServerStatus } from "../../electron/server-status.mjs";
+import { api } from "@/state/api";
+import { useStoreSelector } from "@/state/store-select";
+import { desktopAppVersion } from "./app-links";
+import { companionBridge } from "./companion-bridge";
+import type { CompanionState } from "./companion-types";
+import { buildDevices, type Device, type DeviceSources, type LentDevice, type SignedInDevice } from "./devices";
+import type { PublicPhone } from "./phones";
+import { isOwnerOrAdmin } from "./session";
+import { readSharedSessionState } from "./shared-session";
+
+/** How often the page reads its sources again while it is open and shown. */
+export const DEVICES_POLL_MS = 5_000;
+
+type Places = NonNullable<DeviceSources["places"]>;
+
+export interface DevicesView {
+ devices: Device[];
+ companion: CompanionState | null;
+ /** Everything has answered once (or failed): before that the map holds its space without a list. */
+ loaded: boolean;
+ /** Read every source again now, after an action or when an added device should be showing. */
+ refresh: () => void;
+}
+
+/** Every device this place knows, read from the sources Settings already uses, again every few seconds while the page
+ * is open and shown. `here`: This computer's own page in the desktop app, where the app's saved places and the phone
+ * link live. `client`: this app drives another computer, which lists its own devices. */
+export function useDevices({ here, client, name, kind }: { here: boolean; client: boolean; name: string; kind: DeviceSources["here"]["kind"] }): DevicesView {
+ const vpsConfig = useStoreSelector((state) => state.config?.vps);
+ const [places, setPlaces] = useState<Places | null>(null);
+ const [statuses, setStatuses] = useState<ServerStatus[]>([]);
+ const [lending, setLending] = useState<DeviceSources["lending"]>(null);
+ const [companion, setCompanion] = useState<CompanionState | null>(null);
+ const [phoneApps, setPhoneApps] = useState<PublicPhone[] | null>(null);
+ const [sessions, setSessions] = useState<DeviceSources["sessions"]>(null);
+ const [lent, setLent] = useState<LentDevice[] | null>(null);
+ const [answered, setAnswered] = useState(false);
+ const alive = useRef(true);
+
+ const read = useCallback(async () => {
+ if (client) { setAnswered(true); return; }
+ const environments = here ? window.ogb?.environments : undefined;
+ const bridge = here ? companionBridge() : null;
+ const session = await readSharedSessionState().catch(() => null);
+ const admin = isOwnerOrAdmin(session);
+ await Promise.allSettled([
+ environments?.state().then((next) => { if (alive.current) setPlaces(next); }),
+ environments?.status?.().then((next) => { if (alive.current) setStatuses(next); }),
+ (here ? window.ogb?.computerSharing?.servers?.() : undefined)?.then((next) => { if (alive.current) setLending(next); }),
+ bridge?.state().then((next) => { if (alive.current) setCompanion(next); }),
+ // Phone apps and signed-in devices are admin routes: anyone else is never asked for them (a refusal every few seconds).
+ admin ? api<{ phones?: PublicPhone[] }>("/api/phones", { background: true }).then((body) => { if (alive.current) setPhoneApps(body.phones ?? []); }) : undefined,
+ admin ? api<{ sessions?: SignedInDevice[]; current?: string | null }>("/api/auth/sessions", { background: true })
+ .then((body) => { if (alive.current) setSessions({ sessions: Array.isArray(body.sessions) ? body.sessions : [], current: typeof body.current === "string" ? body.current : null }); }) : undefined,
+ // A 404 is a place that lends no computers (the family is off for this request).
+ api<{ known?: LentDevice[] }>("/api/shared-computers", { background: true })
+ .then((body) => { if (alive.current) setLent(Array.isArray(body.known) ? body.known : []); }, () => { if (alive.current) setLent(null); }),
+ ]);
+ if (alive.current) setAnswered(true);
+ }, [here, client]);
+
+ useEffect(() => {
+ alive.current = true;
+ void read();
+ const timer = window.setInterval(() => { if (document.visibilityState === "visible") void read(); }, DEVICES_POLL_MS);
+ const stop = here ? window.ogb?.environments?.onStatus?.(() => void read()) : undefined;
+ return () => { alive.current = false; window.clearInterval(timer); stop?.(); };
+ }, [read, here]);
+
+ const vps = useMemo(() => {
+ const servers = vpsConfig?.servers ?? [];
+ const alias = vpsConfig?.sshAlias?.trim();
+ return [...(alias ? [{ alias }] : []), ...servers.map((server) => ({ alias: server.sshAlias, name: server.name }))];
+ }, [vpsConfig]);
+
+ const devices = useMemo(() => buildDevices({
+ here: { name, kind, version: desktopAppVersion(), desktop: typeof window !== "undefined" && Boolean(window.ogb) },
+ places, statuses, lending, companion, phoneApps, sessions, lent, vps,
+ }), [name, kind, places, statuses, lending, companion, phoneApps, sessions, lent, vps]);
+
+ return { devices, companion, loaded: answered, refresh: () => void read() };
+}
diff --git a/src/locales/de.json b/src/locales/de.json
index 7108cb411f..d4a871833f 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -3680,6 +3680,89 @@
"settings.page.overview": "Übersicht",
"settings.page.plan": "Tarif & Abrechnung",
"settings.page.spending": "Ausgaben",
+ "settings.page.devices": "Geräte",
+ "devicesPage.add": "Gerät hinzufügen",
+ "devicesPage.mapLabel": "Deine Geräte und wie sie verbunden sind",
+ "devicesPage.empty": "Noch ist nichts anderes verbunden. Füge ein Telefon, einen Computer oder deinen eigenen Server hinzu.",
+ "devicesPage.status.here": "Du bist hier",
+ "devicesPage.status.online": "Online",
+ "devicesPage.status.offline": "Offline",
+ "devicesPage.status.seen": "Gesehen {when}",
+ "devicesPage.status.ssh": "Bots arbeiten darauf",
+ "devicesPage.status.unknown": "Nicht geprüft",
+ "devicesPage.note.update": "Aktualisieren",
+ "devicesPage.note.signedOut": "Erneut koppeln",
+ "devicesPage.note.insecure": "Braucht eine sichere Adresse",
+ "devicesPage.note.unreachable": "Nicht erreichbar",
+ "devicesPage.note.reconnecting": "Verbindung wird wiederhergestellt…",
+ "devicesPage.route.here": "Hier",
+ "devicesPage.route.local": "Gleiches Netzwerk",
+ "devicesPage.route.tailscale": "Privates Netzwerk",
+ "devicesPage.route.relay": "Über {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Angemeldet",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Computer",
+ "devicesPage.kind.desktop": "Desktop-Computer",
+ "devicesPage.kind.server": "Dein eigener Server",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Telefon",
+ "devicesPage.kind.vm": "Computer des Bots",
+ "devicesPage.group.computers": "Computer",
+ "devicesPage.group.servers": "Clouds und eigene Server",
+ "devicesPage.group.phones": "Telefone",
+ "devicesPage.detail.kind": "Was es ist",
+ "devicesPage.detail.reaches": "Verbunden über",
+ "devicesPage.detail.address": "Adresse",
+ "devicesPage.detail.version": "Version",
+ "devicesPage.detail.lastSeen": "Zuletzt gesehen",
+ "devicesPage.detail.bots": "Bots",
+ "devicesPage.detail.runsBots": "Hat eigene Bots",
+ "devicesPage.detail.hostsComputer": "Bots können darauf arbeiten",
+ "devicesPage.detail.reachesBots": "Spricht mit den Bots hier",
+ "devicesPage.action.copyUpdate": "Update-Befehl kopieren",
+ "devicesPage.action.manage": "Verwalten",
+ "devicesPage.action.removeApps": "Seine Apps entfernen",
+ "devicesPage.action.signOut": "Abmelden",
+ "devicesPage.network.title": "Privates Netzwerk",
+ "devicesPage.network.setUp": "Einrichten",
+ "devicesPage.network.share": "Deine Computer hereinlassen",
+ "devicesPage.network.addComputer": "Computer hinzufügen",
+ "devicesPage.network.short.unknown": "Nicht eingerichtet",
+ "devicesPage.network.short.notInstalled": "Nicht installiert",
+ "devicesPage.network.short.noCli": "Braucht sein Befehlszeilentool",
+ "devicesPage.network.short.signedOut": "Abgemeldet",
+ "devicesPage.network.short.notRunning": "Läuft nicht",
+ "devicesPage.network.short.needsApproval": "Wartet auf Freigabe",
+ "devicesPage.network.short.needsPermission": "Braucht eine Berechtigung",
+ "devicesPage.network.short.magicdns": "Braucht MagicDNS",
+ "devicesPage.network.short.ready": "An",
+ "devicesPage.network.line.unknown": "Tailscale verbindet deine Computer privat, egal wo sie sind. Richte es hier einmal ein.",
+ "devicesPage.network.line.notInstalled": "Installiere Tailscale auf diesem Computer und melde dich an. Diese Seite prüft erneut, wenn du zurückkommst.",
+ "devicesPage.network.line.ready": "Verbunden als {name}. Deine anderen Computer in Tailscale können sich hier verbinden.",
+ "devicesPage.network.line.notShared": "Verbunden als {name}. Erlaube deinen anderen Computern in Tailscale, sich hier zu verbinden.",
+ "devicesPage.add.phone": "Telefon",
+ "devicesPage.add.phoneLine": "Scanne einen Code mit der {app}-App",
+ "devicesPage.add.computer": "Computer",
+ "devicesPage.add.computerLine": "Ein Laptop, Desktop oder Mac mini mit der App",
+ "devicesPage.add.server": "Dein eigener Server",
+ "devicesPage.add.serverLine": "Ein gemieteter Rechner oder einer, der zu Hause immer läuft",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Immer an, für dich betrieben",
+ "devicesPage.addFlow.adminOnly": "Nur ein Admin kann hier Geräte hinzufügen.",
+ "devicesPage.addFlow.computerCloud": "Installiere {app} auf dem anderen Computer und melde dich mit demselben Konto an. Er öffnet die Cloud von selbst.",
+ "devicesPage.addFlow.computerInstall": "Installiere {app} auf dem anderen Computer.",
+ "devicesPage.addFlow.computerNeeds": "Der andere Computer braucht {app} und Tailscale, angemeldet im selben Tailscale-Konto.",
+ "devicesPage.addFlow.computerPaste": "Wähle dort + und dann „Mit einem Server verbinden“ und füge diesen Link ein.",
+ "devicesPage.addFlow.connected": "{name} ist verbunden",
+ "devicesPage.addFlow.waiting": "Warte auf die Verbindung…",
+ "devicesPage.addFlow.networkFirst": "Zuerst das private Netzwerk",
+ "devicesPage.addFlow.pasteLink": "Füge den angezeigten Link ein",
+ "devicesPage.addFlow.serverAnywhere": "Von überall erreichbar",
+ "devicesPage.addFlow.serverTailscale": "In deinem privaten Netzwerk (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Führe einen dieser Befehle auf dem Rechner aus. Er braucht Node 24 und gibt einen Link aus, den du hier einfügst.",
+ "devicesPage.addFlow.serverDesktop": "Füge den ausgegebenen Link in der {app}-App unter + und dann „Mit einem Server verbinden“ ein.",
"settings.people.activityIn": "Die Aktivität findest du unter Daten.",
"settings.people.members": "Mitglieder",
"settings.place.alwaysOn": "Immer an",
diff --git a/src/locales/en.json b/src/locales/en.json
index 350b00b653..3fd1ed1c07 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -10969,10 +10969,93 @@
"settings.page.bots": "You and your bots",
"settings.page.browser": "This browser",
"settings.page.data": "Data",
+ "settings.page.devices": "Devices",
"settings.page.desktops": "Desktops & browser",
"settings.page.overview": "Overview",
"settings.page.plan": "Plan & billing",
"settings.page.spending": "Spending",
+ "devicesPage.add": "Add a device",
+ "devicesPage.mapLabel": "Your devices and how they connect",
+ "devicesPage.empty": "Nothing else is connected yet. Add a phone, a computer or your own server.",
+ "devicesPage.status.here": "You’re here",
+ "devicesPage.status.online": "Online",
+ "devicesPage.status.offline": "Offline",
+ "devicesPage.status.seen": "Seen {when}",
+ "devicesPage.status.ssh": "Bots work on it",
+ "devicesPage.status.unknown": "Not checked",
+ "devicesPage.note.update": "Update it",
+ "devicesPage.note.signedOut": "Pair it again",
+ "devicesPage.note.insecure": "Needs a safe address",
+ "devicesPage.note.unreachable": "Can’t reach it",
+ "devicesPage.note.reconnecting": "Reconnecting…",
+ "devicesPage.route.here": "Here",
+ "devicesPage.route.local": "Same network",
+ "devicesPage.route.tailscale": "Private network",
+ "devicesPage.route.relay": "Through {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Signed in",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Computer",
+ "devicesPage.kind.desktop": "Desktop computer",
+ "devicesPage.kind.server": "Your own server",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Phone",
+ "devicesPage.kind.vm": "Bot’s computer",
+ "devicesPage.group.computers": "Computers",
+ "devicesPage.group.servers": "Clouds and your own servers",
+ "devicesPage.group.phones": "Phones",
+ "devicesPage.detail.kind": "What it is",
+ "devicesPage.detail.reaches": "Connects by",
+ "devicesPage.detail.address": "Address",
+ "devicesPage.detail.version": "Version",
+ "devicesPage.detail.lastSeen": "Last seen",
+ "devicesPage.detail.bots": "Bots",
+ "devicesPage.detail.runsBots": "Has bots of its own",
+ "devicesPage.detail.hostsComputer": "Bots can work on it",
+ "devicesPage.detail.reachesBots": "Talks to the bots here",
+ "devicesPage.action.copyUpdate": "Copy update command",
+ "devicesPage.action.manage": "Manage",
+ "devicesPage.action.removeApps": "Remove its apps",
+ "devicesPage.action.signOut": "Sign it out",
+ "devicesPage.network.title": "Private network",
+ "devicesPage.network.setUp": "Set up",
+ "devicesPage.network.share": "Let your computers in",
+ "devicesPage.network.addComputer": "Add a computer",
+ "devicesPage.network.short.unknown": "Not set up",
+ "devicesPage.network.short.notInstalled": "Not installed",
+ "devicesPage.network.short.noCli": "Needs its command-line tool",
+ "devicesPage.network.short.signedOut": "Signed out",
+ "devicesPage.network.short.notRunning": "Not running",
+ "devicesPage.network.short.needsApproval": "Waiting for approval",
+ "devicesPage.network.short.needsPermission": "Needs permission",
+ "devicesPage.network.short.magicdns": "Needs MagicDNS",
+ "devicesPage.network.short.ready": "On",
+ "devicesPage.network.line.unknown": "Tailscale connects your computers privately, wherever they are. Set it up once here.",
+ "devicesPage.network.line.notInstalled": "Install Tailscale on this computer and sign in. This page checks again when you come back to it.",
+ "devicesPage.network.line.ready": "On it as {name}. Your other computers on Tailscale can connect here.",
+ "devicesPage.network.line.notShared": "On it as {name}. Let your other computers on Tailscale connect here.",
+ "devicesPage.add.phone": "Phone",
+ "devicesPage.add.phoneLine": "Scan a code with the {app} app",
+ "devicesPage.add.computer": "Computer",
+ "devicesPage.add.computerLine": "A laptop, desktop or Mac mini with the app",
+ "devicesPage.add.server": "Your own server",
+ "devicesPage.add.serverLine": "A machine you rent, or one that stays on at home",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Always on, run for you",
+ "devicesPage.addFlow.adminOnly": "Only an admin can add devices here.",
+ "devicesPage.addFlow.computerCloud": "On the other computer, install {app} and sign in with the same account. It opens the Cloud by itself.",
+ "devicesPage.addFlow.computerInstall": "On the other computer, install {app}.",
+ "devicesPage.addFlow.computerNeeds": "The other computer needs {app} and Tailscale, signed in to the same Tailscale account.",
+ "devicesPage.addFlow.computerPaste": "There, choose + then Connect to a server, and paste this link.",
+ "devicesPage.addFlow.connected": "{name} is connected",
+ "devicesPage.addFlow.waiting": "Waiting for it to connect…",
+ "devicesPage.addFlow.networkFirst": "First, the private network",
+ "devicesPage.addFlow.pasteLink": "Paste the link it shows",
+ "devicesPage.addFlow.serverAnywhere": "Reachable from anywhere",
+ "devicesPage.addFlow.serverTailscale": "On your private network (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Run one of these on that machine. It needs Node 24 and prints a link to paste here.",
+ "devicesPage.addFlow.serverDesktop": "Paste the link it prints into + then Connect to a server in the {app} app.",
"settings.people.activityIn": "Activity is in Data.",
"settings.people.members": "Members",
"settings.place.alwaysOn": "Always on",
diff --git a/src/locales/es.json b/src/locales/es.json
index b224b11b2e..8164938a0d 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -6073,6 +6073,89 @@
"settings.page.overview": "Resumen",
"settings.page.plan": "Plan y facturación",
"settings.page.spending": "Gastos",
+ "settings.page.devices": "Dispositivos",
+ "devicesPage.add": "Añadir un dispositivo",
+ "devicesPage.mapLabel": "Tus dispositivos y cómo se conectan",
+ "devicesPage.empty": "Todavía no hay nada más conectado. Añade un teléfono, un ordenador o tu propio servidor.",
+ "devicesPage.status.here": "Estás aquí",
+ "devicesPage.status.online": "En línea",
+ "devicesPage.status.offline": "Sin conexión",
+ "devicesPage.status.seen": "Visto {when}",
+ "devicesPage.status.ssh": "Los bots trabajan en él",
+ "devicesPage.status.unknown": "Sin comprobar",
+ "devicesPage.note.update": "Actualízalo",
+ "devicesPage.note.signedOut": "Vuelve a vincularlo",
+ "devicesPage.note.insecure": "Necesita una dirección segura",
+ "devicesPage.note.unreachable": "No se puede acceder",
+ "devicesPage.note.reconnecting": "Reconectando…",
+ "devicesPage.route.here": "Aquí",
+ "devicesPage.route.local": "Misma red",
+ "devicesPage.route.tailscale": "Red privada",
+ "devicesPage.route.relay": "A través de {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Sesión iniciada",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Ordenador",
+ "devicesPage.kind.desktop": "Ordenador de sobremesa",
+ "devicesPage.kind.server": "Tu propio servidor",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Teléfono",
+ "devicesPage.kind.vm": "Ordenador del bot",
+ "devicesPage.group.computers": "Ordenadores",
+ "devicesPage.group.servers": "Clouds y tus propios servidores",
+ "devicesPage.group.phones": "Teléfonos",
+ "devicesPage.detail.kind": "Qué es",
+ "devicesPage.detail.reaches": "Se conecta por",
+ "devicesPage.detail.address": "Dirección",
+ "devicesPage.detail.version": "Versión",
+ "devicesPage.detail.lastSeen": "Última actividad",
+ "devicesPage.detail.bots": "Bots",
+ "devicesPage.detail.runsBots": "Tiene sus propios bots",
+ "devicesPage.detail.hostsComputer": "Los bots pueden trabajar en él",
+ "devicesPage.detail.reachesBots": "Habla con los bots de aquí",
+ "devicesPage.action.copyUpdate": "Copiar comando de actualización",
+ "devicesPage.action.manage": "Gestionar",
+ "devicesPage.action.removeApps": "Quitar sus apps",
+ "devicesPage.action.signOut": "Cerrar su sesión",
+ "devicesPage.network.title": "Red privada",
+ "devicesPage.network.setUp": "Configurar",
+ "devicesPage.network.share": "Deja entrar a tus ordenadores",
+ "devicesPage.network.addComputer": "Añadir un ordenador",
+ "devicesPage.network.short.unknown": "Sin configurar",
+ "devicesPage.network.short.notInstalled": "No instalado",
+ "devicesPage.network.short.noCli": "Necesita su herramienta de línea de comandos",
+ "devicesPage.network.short.signedOut": "Sesión cerrada",
+ "devicesPage.network.short.notRunning": "No se está ejecutando",
+ "devicesPage.network.short.needsApproval": "Esperando aprobación",
+ "devicesPage.network.short.needsPermission": "Necesita permiso",
+ "devicesPage.network.short.magicdns": "Necesita MagicDNS",
+ "devicesPage.network.short.ready": "Activado",
+ "devicesPage.network.line.unknown": "Tailscale conecta tus ordenadores de forma privada, estén donde estén. Configúralo aquí una sola vez.",
+ "devicesPage.network.line.notInstalled": "Instala Tailscale en este ordenador e inicia sesión. Esta página vuelve a comprobarlo cuando regresas a ella.",
+ "devicesPage.network.line.ready": "Conectado como {name}. Tus otros ordenadores en Tailscale pueden conectarse aquí.",
+ "devicesPage.network.line.notShared": "Conectado como {name}. Deja que tus otros ordenadores en Tailscale se conecten aquí.",
+ "devicesPage.add.phone": "Teléfono",
+ "devicesPage.add.phoneLine": "Escanea un código con la app de {app}",
+ "devicesPage.add.computer": "Ordenador",
+ "devicesPage.add.computerLine": "Un portátil, un sobremesa o un Mac mini con la app",
+ "devicesPage.add.server": "Tu propio servidor",
+ "devicesPage.add.serverLine": "Una máquina que alquilas, o una que está siempre encendida en casa",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Siempre encendida, la gestionamos por ti",
+ "devicesPage.addFlow.adminOnly": "Solo un administrador puede añadir dispositivos aquí.",
+ "devicesPage.addFlow.computerCloud": "En el otro ordenador, instala {app} e inicia sesión con la misma cuenta. Abre la Cloud por sí solo.",
+ "devicesPage.addFlow.computerInstall": "En el otro ordenador, instala {app}.",
+ "devicesPage.addFlow.computerNeeds": "El otro ordenador necesita {app} y Tailscale, con la sesión iniciada en la misma cuenta de Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Allí, elige + y luego «Conectar a un servidor», y pega este enlace.",
+ "devicesPage.addFlow.connected": "{name} está conectado",
+ "devicesPage.addFlow.waiting": "Esperando a que se conecte…",
+ "devicesPage.addFlow.networkFirst": "Primero, la red privada",
+ "devicesPage.addFlow.pasteLink": "Pega el enlace que muestra",
+ "devicesPage.addFlow.serverAnywhere": "Accesible desde cualquier lugar",
+ "devicesPage.addFlow.serverTailscale": "En tu red privada (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Ejecuta uno de estos comandos en esa máquina. Necesita Node 24 y muestra un enlace para pegar aquí.",
+ "devicesPage.addFlow.serverDesktop": "Pega el enlace que muestra en + y luego «Conectar a un servidor», en la app de {app}.",
"settings.people.activityIn": "La actividad está en Datos.",
"settings.people.members": "Miembros",
"settings.place.alwaysOn": "Siempre encendido",
diff --git a/src/locales/everyday-words.test.ts b/src/locales/everyday-words.test.ts
index 18987454f9..a3ae1b4f4a 100644
--- a/src/locales/everyday-words.test.ts
+++ b/src/locales/everyday-words.test.ts
@@ -31,6 +31,7 @@ const EVERYDAY_PREFIXES: Record<string, readonly string[]> = {
"the Settings pages Simple mode shows": ["settings.section.", "settings.group.", "settings.mcpCalls.", "settings.logins."],
"Settings's pages, its search and Phone & devices": [
"settings.page.", "settings.scope.", "settings.place.", "settings.glance.", "settings.overview.", "settings.search.", "phone.pair.", "phone.reach.",
+ "devicesPage.",
],
"the Usage page and its traces": ["trace.", "usage.page."],
};
@@ -94,6 +95,8 @@ const ALLOWED: Record<string, string> = {
"chat.notice.modelServerStoppedAnswering": "the person's model server at a named host, not the app's internal server",
"rail.local": "the owner's own name for the + choice that adds a workspace of this computer's own",
"rail.localNumbered": "a new workspace's first name, which the person may change, in the owner's word for it",
+ "devicesPage.addFlow.computerPaste": "names the Connect to a server choice under the rail's + exactly as it is labelled",
+ "devicesPage.addFlow.serverDesktop": "names the Connect to a server choice under the rail's + exactly as it is labelled",
};
const prefixes = Object.values(EVERYDAY_PREFIXES).flat();
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 6ff1742c86..d3545a10ac 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -3417,6 +3417,89 @@
"settings.page.overview": "Vue d'ensemble",
"settings.page.plan": "Forfait et facturation",
"settings.page.spending": "Dépenses",
+ "settings.page.devices": "Appareils",
+ "devicesPage.add": "Ajouter un appareil",
+ "devicesPage.mapLabel": "Vos appareils et leurs connexions",
+ "devicesPage.empty": "Rien d'autre n'est encore connecté. Ajoutez un téléphone, un ordinateur ou votre propre serveur.",
+ "devicesPage.status.here": "Vous êtes ici",
+ "devicesPage.status.online": "En ligne",
+ "devicesPage.status.offline": "Hors ligne",
+ "devicesPage.status.seen": "Vu {when}",
+ "devicesPage.status.ssh": "Les bots y travaillent",
+ "devicesPage.status.unknown": "Non vérifié",
+ "devicesPage.note.update": "Mettez-le à jour",
+ "devicesPage.note.signedOut": "Appairez-le à nouveau",
+ "devicesPage.note.insecure": "Il faut une adresse sûre",
+ "devicesPage.note.unreachable": "Injoignable",
+ "devicesPage.note.reconnecting": "Reconnexion…",
+ "devicesPage.route.here": "Ici",
+ "devicesPage.route.local": "Même réseau",
+ "devicesPage.route.tailscale": "Réseau privé",
+ "devicesPage.route.relay": "Via {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Connecté",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Ordinateur",
+ "devicesPage.kind.desktop": "Ordinateur de bureau",
+ "devicesPage.kind.server": "Votre propre serveur",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Téléphone",
+ "devicesPage.kind.vm": "Ordinateur du bot",
+ "devicesPage.group.computers": "Ordinateurs",
+ "devicesPage.group.servers": "Clouds et vos propres serveurs",
+ "devicesPage.group.phones": "Téléphones",
+ "devicesPage.detail.kind": "Type",
+ "devicesPage.detail.reaches": "Se connecte par",
+ "devicesPage.detail.address": "Adresse",
+ "devicesPage.detail.version": "Version",
+ "devicesPage.detail.lastSeen": "Dernière activité",
+ "devicesPage.detail.bots": "Bots",
+ "devicesPage.detail.runsBots": "A ses propres bots",
+ "devicesPage.detail.hostsComputer": "Les bots peuvent y travailler",
+ "devicesPage.detail.reachesBots": "Parle aux bots d'ici",
+ "devicesPage.action.copyUpdate": "Copier la commande de mise à jour",
+ "devicesPage.action.manage": "Gérer",
+ "devicesPage.action.removeApps": "Retirer ses apps",
+ "devicesPage.action.signOut": "Le déconnecter",
+ "devicesPage.network.title": "Réseau privé",
+ "devicesPage.network.setUp": "Configurer",
+ "devicesPage.network.share": "Laisser entrer vos ordinateurs",
+ "devicesPage.network.addComputer": "Ajouter un ordinateur",
+ "devicesPage.network.short.unknown": "Non configuré",
+ "devicesPage.network.short.notInstalled": "Non installé",
+ "devicesPage.network.short.noCli": "Il faut son outil en ligne de commande",
+ "devicesPage.network.short.signedOut": "Déconnecté",
+ "devicesPage.network.short.notRunning": "Non lancé",
+ "devicesPage.network.short.needsApproval": "En attente d'approbation",
+ "devicesPage.network.short.needsPermission": "Autorisation requise",
+ "devicesPage.network.short.magicdns": "MagicDNS requis",
+ "devicesPage.network.short.ready": "Activé",
+ "devicesPage.network.line.unknown": "Tailscale relie vos ordinateurs en privé, où qu'ils soient. Configurez-le une fois ici.",
+ "devicesPage.network.line.notInstalled": "Installez Tailscale sur cet ordinateur et connectez-vous. Cette page revérifie quand vous y revenez.",
+ "devicesPage.network.line.ready": "Connecté en tant que {name}. Vos autres ordinateurs sur Tailscale peuvent se connecter ici.",
+ "devicesPage.network.line.notShared": "Connecté en tant que {name}. Autorisez vos autres ordinateurs sur Tailscale à se connecter ici.",
+ "devicesPage.add.phone": "Téléphone",
+ "devicesPage.add.phoneLine": "Scannez un code avec l'app {app}",
+ "devicesPage.add.computer": "Ordinateur",
+ "devicesPage.add.computerLine": "Un portable, un ordinateur de bureau ou un Mac mini avec l'app",
+ "devicesPage.add.server": "Votre propre serveur",
+ "devicesPage.add.serverLine": "Une machine que vous louez, ou une qui reste allumée chez vous",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Toujours allumé, géré pour vous",
+ "devicesPage.addFlow.adminOnly": "Seul un administrateur peut ajouter des appareils ici.",
+ "devicesPage.addFlow.computerCloud": "Sur l'autre ordinateur, installez {app} et connectez-vous avec le même compte. Il ouvre le Cloud tout seul.",
+ "devicesPage.addFlow.computerInstall": "Sur l'autre ordinateur, installez {app}.",
+ "devicesPage.addFlow.computerNeeds": "L'autre ordinateur a besoin de {app} et de Tailscale, connecté au même compte Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Là-bas, choisissez + puis « Se connecter à un serveur », et collez ce lien.",
+ "devicesPage.addFlow.connected": "{name} est connecté",
+ "devicesPage.addFlow.waiting": "En attente de connexion…",
+ "devicesPage.addFlow.networkFirst": "D'abord, le réseau privé",
+ "devicesPage.addFlow.pasteLink": "Collez le lien affiché",
+ "devicesPage.addFlow.serverAnywhere": "Accessible de partout",
+ "devicesPage.addFlow.serverTailscale": "Sur votre réseau privé (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Lancez l'une de ces commandes sur cette machine. Elle a besoin de Node 24 et affiche un lien à coller ici.",
+ "devicesPage.addFlow.serverDesktop": "Collez le lien affiché dans + puis « Se connecter à un serveur » dans l'app {app}.",
"settings.people.activityIn": "L'activité est dans Données.",
"settings.people.members": "Membres",
"settings.place.alwaysOn": "Toujours allumé",
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 347bd87f9d..6ab55f40e6 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -3268,6 +3268,89 @@
"settings.page.overview": "झलक",
"settings.page.plan": "प्लान और बिलिंग",
"settings.page.spending": "खर्च",
+ "settings.page.devices": "डिवाइस",
+ "devicesPage.add": "डिवाइस जोड़ें",
+ "devicesPage.mapLabel": "आपके डिवाइस और वे कैसे जुड़ते हैं",
+ "devicesPage.empty": "अभी और कुछ कनेक्ट नहीं है। फ़ोन, कंप्यूटर या अपना सर्वर जोड़ें।",
+ "devicesPage.status.here": "आप यहाँ हैं",
+ "devicesPage.status.online": "ऑनलाइन",
+ "devicesPage.status.offline": "ऑफ़लाइन",
+ "devicesPage.status.seen": "देखा गया {when}",
+ "devicesPage.status.ssh": "बॉट इस पर काम करते हैं",
+ "devicesPage.status.unknown": "जाँचा नहीं गया",
+ "devicesPage.note.update": "इसे अपडेट करें",
+ "devicesPage.note.signedOut": "इसे फिर से पेयर करें",
+ "devicesPage.note.insecure": "सुरक्षित पता चाहिए",
+ "devicesPage.note.unreachable": "इस तक पहुँच नहीं हो पा रही",
+ "devicesPage.note.reconnecting": "फिर से जुड़ रहे हैं…",
+ "devicesPage.route.here": "यहाँ",
+ "devicesPage.route.local": "एक ही नेटवर्क",
+ "devicesPage.route.tailscale": "निजी नेटवर्क",
+ "devicesPage.route.relay": "{app} के ज़रिए",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "इंटरनेट",
+ "devicesPage.route.paired": "साइन इन है",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "कंप्यूटर",
+ "devicesPage.kind.desktop": "डेस्कटॉप कंप्यूटर",
+ "devicesPage.kind.server": "आपका अपना सर्वर",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "फ़ोन",
+ "devicesPage.kind.vm": "बॉट का कंप्यूटर",
+ "devicesPage.group.computers": "कंप्यूटर",
+ "devicesPage.group.servers": "Cloud और आपके अपने सर्वर",
+ "devicesPage.group.phones": "फ़ोन",
+ "devicesPage.detail.kind": "यह क्या है",
+ "devicesPage.detail.reaches": "जुड़ने का तरीका",
+ "devicesPage.detail.address": "पता",
+ "devicesPage.detail.version": "वर्शन",
+ "devicesPage.detail.lastSeen": "आख़िरी बार देखा गया",
+ "devicesPage.detail.bots": "बॉट",
+ "devicesPage.detail.runsBots": "इसके अपने बॉट हैं",
+ "devicesPage.detail.hostsComputer": "बॉट इस पर काम कर सकते हैं",
+ "devicesPage.detail.reachesBots": "यहाँ के बॉट से बात करता है",
+ "devicesPage.action.copyUpdate": "अपडेट कमांड कॉपी करें",
+ "devicesPage.action.manage": "प्रबंधित करें",
+ "devicesPage.action.removeApps": "इसके ऐप हटाएँ",
+ "devicesPage.action.signOut": "साइन आउट करें",
+ "devicesPage.network.title": "निजी नेटवर्क",
+ "devicesPage.network.setUp": "सेट अप करें",
+ "devicesPage.network.share": "अपने कंप्यूटरों को आने दें",
+ "devicesPage.network.addComputer": "कंप्यूटर जोड़ें",
+ "devicesPage.network.short.unknown": "सेट अप नहीं",
+ "devicesPage.network.short.notInstalled": "इंस्टॉल नहीं",
+ "devicesPage.network.short.noCli": "इसका कमांड-लाइन टूल चाहिए",
+ "devicesPage.network.short.signedOut": "साइन आउट है",
+ "devicesPage.network.short.notRunning": "नहीं चल रहा",
+ "devicesPage.network.short.needsApproval": "मंज़ूरी का इंतज़ार",
+ "devicesPage.network.short.needsPermission": "अनुमति चाहिए",
+ "devicesPage.network.short.magicdns": "MagicDNS चाहिए",
+ "devicesPage.network.short.ready": "चालू",
+ "devicesPage.network.line.unknown": "Tailscale आपके कंप्यूटरों को निजी तौर पर जोड़ता है, वे कहीं भी हों। इसे यहाँ एक बार सेट अप करें।",
+ "devicesPage.network.line.notInstalled": "इस कंप्यूटर पर Tailscale इंस्टॉल करें और साइन इन करें। आपके लौटने पर यह पेज फिर से जाँच करता है।",
+ "devicesPage.network.line.ready": "{name} नाम से जुड़ा है। Tailscale पर आपके दूसरे कंप्यूटर यहाँ कनेक्ट हो सकते हैं।",
+ "devicesPage.network.line.notShared": "{name} नाम से जुड़ा है। Tailscale पर अपने दूसरे कंप्यूटरों को यहाँ कनेक्ट होने दें।",
+ "devicesPage.add.phone": "फ़ोन",
+ "devicesPage.add.phoneLine": "{app} ऐप से एक कोड स्कैन करें",
+ "devicesPage.add.computer": "कंप्यूटर",
+ "devicesPage.add.computerLine": "ऐप वाला लैपटॉप, डेस्कटॉप या Mac mini",
+ "devicesPage.add.server": "आपका अपना सर्वर",
+ "devicesPage.add.serverLine": "किराए की मशीन, या घर पर हमेशा चालू रहने वाली मशीन",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "हमेशा चालू, आपके लिए हम चलाते हैं",
+ "devicesPage.addFlow.adminOnly": "यहाँ सिर्फ़ एडमिन डिवाइस जोड़ सकता है।",
+ "devicesPage.addFlow.computerCloud": "दूसरे कंप्यूटर पर {app} इंस्टॉल करें और उसी अकाउंट से साइन इन करें। वह Cloud अपने-आप खोल देता है।",
+ "devicesPage.addFlow.computerInstall": "दूसरे कंप्यूटर पर {app} इंस्टॉल करें।",
+ "devicesPage.addFlow.computerNeeds": "दूसरे कंप्यूटर पर {app} और Tailscale चाहिए, उसी Tailscale अकाउंट में साइन इन किए हुए।",
+ "devicesPage.addFlow.computerPaste": "वहाँ + चुनें, फिर \"किसी सर्वर से कनेक्ट करें\", और यह लिंक पेस्ट करें।",
+ "devicesPage.addFlow.connected": "{name} कनेक्ट है",
+ "devicesPage.addFlow.waiting": "इसके कनेक्ट होने का इंतज़ार…",
+ "devicesPage.addFlow.networkFirst": "पहले, निजी नेटवर्क",
+ "devicesPage.addFlow.pasteLink": "यह जो लिंक दिखाए, उसे पेस्ट करें",
+ "devicesPage.addFlow.serverAnywhere": "कहीं से भी पहुँचा जा सकता है",
+ "devicesPage.addFlow.serverTailscale": "आपके निजी नेटवर्क पर (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "उस मशीन पर इनमें से कोई एक चलाएँ। इसके लिए Node 24 चाहिए, और यह यहाँ पेस्ट करने के लिए एक लिंक दिखाता है।",
+ "devicesPage.addFlow.serverDesktop": "यह जो लिंक दिखाए, उसे {app} ऐप में + फिर \"किसी सर्वर से कनेक्ट करें\" में पेस्ट करें।",
"settings.people.activityIn": "गतिविधि डेटा में है।",
"settings.people.members": "सदस्य",
"settings.place.alwaysOn": "हमेशा चालू",
diff --git a/src/locales/it.json b/src/locales/it.json
index fb4742c2f5..1a79e164dd 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -10857,6 +10857,89 @@
"settings.page.overview": "Panoramica",
"settings.page.plan": "Piano e fatturazione",
"settings.page.spending": "Spese",
+ "settings.page.devices": "Dispositivi",
+ "devicesPage.add": "Aggiungi un dispositivo",
+ "devicesPage.mapLabel": "I tuoi dispositivi e come si collegano",
+ "devicesPage.empty": "Non c'è ancora nient'altro di collegato. Aggiungi un telefono, un computer o il tuo server.",
+ "devicesPage.status.here": "Sei qui",
+ "devicesPage.status.online": "Online",
+ "devicesPage.status.offline": "Offline",
+ "devicesPage.status.seen": "Visto {when}",
+ "devicesPage.status.ssh": "I bot ci lavorano",
+ "devicesPage.status.unknown": "Non verificato",
+ "devicesPage.note.update": "Aggiornalo",
+ "devicesPage.note.signedOut": "Abbinalo di nuovo",
+ "devicesPage.note.insecure": "Serve un indirizzo sicuro",
+ "devicesPage.note.unreachable": "Non raggiungibile",
+ "devicesPage.note.reconnecting": "Riconnessione…",
+ "devicesPage.route.here": "Qui",
+ "devicesPage.route.local": "Stessa rete",
+ "devicesPage.route.tailscale": "Rete privata",
+ "devicesPage.route.relay": "Tramite {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Accesso effettuato",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Computer",
+ "devicesPage.kind.desktop": "Computer fisso",
+ "devicesPage.kind.server": "Il tuo server",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Telefono",
+ "devicesPage.kind.vm": "Computer del bot",
+ "devicesPage.group.computers": "Computer",
+ "devicesPage.group.servers": "Cloud e i tuoi server",
+ "devicesPage.group.phones": "Telefoni",
+ "devicesPage.detail.kind": "Che cos'è",
+ "devicesPage.detail.reaches": "Si collega tramite",
+ "devicesPage.detail.address": "Indirizzo",
+ "devicesPage.detail.version": "Versione",
+ "devicesPage.detail.lastSeen": "Ultimo accesso",
+ "devicesPage.detail.bots": "Bot",
+ "devicesPage.detail.runsBots": "Ha i suoi bot",
+ "devicesPage.detail.hostsComputer": "I bot possono lavorarci",
+ "devicesPage.detail.reachesBots": "Parla con i bot di qui",
+ "devicesPage.action.copyUpdate": "Copia il comando di aggiornamento",
+ "devicesPage.action.manage": "Gestisci",
+ "devicesPage.action.removeApps": "Rimuovi le sue app",
+ "devicesPage.action.signOut": "Disconnetti",
+ "devicesPage.network.title": "Rete privata",
+ "devicesPage.network.setUp": "Configura",
+ "devicesPage.network.share": "Fai entrare i tuoi computer",
+ "devicesPage.network.addComputer": "Aggiungi un computer",
+ "devicesPage.network.short.unknown": "Non configurato",
+ "devicesPage.network.short.notInstalled": "Non installato",
+ "devicesPage.network.short.noCli": "Serve il suo strumento a riga di comando",
+ "devicesPage.network.short.signedOut": "Disconnesso",
+ "devicesPage.network.short.notRunning": "Non in esecuzione",
+ "devicesPage.network.short.needsApproval": "In attesa di approvazione",
+ "devicesPage.network.short.needsPermission": "Serve un'autorizzazione",
+ "devicesPage.network.short.magicdns": "Serve MagicDNS",
+ "devicesPage.network.short.ready": "Attivo",
+ "devicesPage.network.line.unknown": "Tailscale collega i tuoi computer in privato, ovunque siano. Configuralo qui una volta sola.",
+ "devicesPage.network.line.notInstalled": "Installa Tailscale su questo computer e accedi. Questa pagina controlla di nuovo quando ci torni.",
+ "devicesPage.network.line.ready": "Connesso come {name}. Gli altri tuoi computer su Tailscale possono collegarsi qui.",
+ "devicesPage.network.line.notShared": "Connesso come {name}. Lascia che gli altri tuoi computer su Tailscale si colleghino qui.",
+ "devicesPage.add.phone": "Telefono",
+ "devicesPage.add.phoneLine": "Scansiona un codice con l'app {app}",
+ "devicesPage.add.computer": "Computer",
+ "devicesPage.add.computerLine": "Un portatile, un fisso o un Mac mini con l'app",
+ "devicesPage.add.server": "Il tuo server",
+ "devicesPage.add.serverLine": "Una macchina che noleggi, o una che resta accesa a casa",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Sempre acceso, gestito per te",
+ "devicesPage.addFlow.adminOnly": "Solo un amministratore può aggiungere dispositivi qui.",
+ "devicesPage.addFlow.computerCloud": "Sull'altro computer, installa {app} e accedi con lo stesso account. Apre il Cloud da solo.",
+ "devicesPage.addFlow.computerInstall": "Sull'altro computer, installa {app}.",
+ "devicesPage.addFlow.computerNeeds": "L'altro computer ha bisogno di {app} e di Tailscale, con l'accesso allo stesso account Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Lì, scegli + e poi Connettiti a un server, e incolla questo link.",
+ "devicesPage.addFlow.connected": "{name} è connesso",
+ "devicesPage.addFlow.waiting": "In attesa che si connetta…",
+ "devicesPage.addFlow.networkFirst": "Prima, la rete privata",
+ "devicesPage.addFlow.pasteLink": "Incolla il link che mostra",
+ "devicesPage.addFlow.serverAnywhere": "Raggiungibile da ovunque",
+ "devicesPage.addFlow.serverTailscale": "Sulla tua rete privata (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Esegui uno di questi comandi su quella macchina. Serve Node 24 e stampa un link da incollare qui.",
+ "devicesPage.addFlow.serverDesktop": "Incolla il link che stampa in + e poi Connettiti a un server nell'app {app}.",
"settings.people.activityIn": "L'attività è in Dati.",
"settings.people.members": "Membri",
"settings.place.alwaysOn": "Sempre acceso",
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 8fb42ed2e3..4ae8e54a73 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -7673,6 +7673,89 @@
"settings.page.overview": "概要",
"settings.page.plan": "プランと請求",
"settings.page.spending": "支出",
+ "settings.page.devices": "デバイス",
+ "devicesPage.add": "デバイスを追加",
+ "devicesPage.mapLabel": "お使いのデバイスと接続方法",
+ "devicesPage.empty": "ほかに接続されているものはまだありません。スマホ、コンピューター、または自分のサーバーを追加してください。",
+ "devicesPage.status.here": "現在のデバイス",
+ "devicesPage.status.online": "オンライン",
+ "devicesPage.status.offline": "オフライン",
+ "devicesPage.status.seen": "最終アクセス {when}",
+ "devicesPage.status.ssh": "ボットの作業先",
+ "devicesPage.status.unknown": "未確認",
+ "devicesPage.note.update": "更新してください",
+ "devicesPage.note.signedOut": "もう一度ペアリング",
+ "devicesPage.note.insecure": "安全なアドレスが必要",
+ "devicesPage.note.unreachable": "接続できません",
+ "devicesPage.note.reconnecting": "再接続中…",
+ "devicesPage.route.here": "このデバイス",
+ "devicesPage.route.local": "同じネットワーク",
+ "devicesPage.route.tailscale": "プライベートネットワーク",
+ "devicesPage.route.relay": "{app} 経由",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "インターネット",
+ "devicesPage.route.paired": "サインイン済み",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "コンピューター",
+ "devicesPage.kind.desktop": "デスクトップコンピューター",
+ "devicesPage.kind.server": "自分のサーバー",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "スマホ",
+ "devicesPage.kind.vm": "ボットのコンピューター",
+ "devicesPage.group.computers": "コンピューター",
+ "devicesPage.group.servers": "Cloud と自分のサーバー",
+ "devicesPage.group.phones": "スマホ",
+ "devicesPage.detail.kind": "種類",
+ "devicesPage.detail.reaches": "接続方法",
+ "devicesPage.detail.address": "アドレス",
+ "devicesPage.detail.version": "バージョン",
+ "devicesPage.detail.lastSeen": "最終アクセス",
+ "devicesPage.detail.bots": "ボット",
+ "devicesPage.detail.runsBots": "独自のボットがあります",
+ "devicesPage.detail.hostsComputer": "ボットが作業できます",
+ "devicesPage.detail.reachesBots": "ここのボットと通信します",
+ "devicesPage.action.copyUpdate": "アップデートコマンドをコピー",
+ "devicesPage.action.manage": "管理",
+ "devicesPage.action.removeApps": "アプリを削除",
+ "devicesPage.action.signOut": "サインアウトさせる",
+ "devicesPage.network.title": "プライベートネットワーク",
+ "devicesPage.network.setUp": "設定する",
+ "devicesPage.network.share": "コンピューターの接続を許可",
+ "devicesPage.network.addComputer": "コンピューターを追加",
+ "devicesPage.network.short.unknown": "未設定",
+ "devicesPage.network.short.notInstalled": "未インストール",
+ "devicesPage.network.short.noCli": "コマンドラインツールが必要",
+ "devicesPage.network.short.signedOut": "サインアウト済み",
+ "devicesPage.network.short.notRunning": "停止中",
+ "devicesPage.network.short.needsApproval": "承認待ち",
+ "devicesPage.network.short.needsPermission": "権限が必要",
+ "devicesPage.network.short.magicdns": "MagicDNS が必要",
+ "devicesPage.network.short.ready": "オン",
+ "devicesPage.network.line.unknown": "Tailscale は、どこにあるコンピューターでもプライベートにつなぎます。ここで一度設定してください。",
+ "devicesPage.network.line.notInstalled": "このコンピューターに Tailscale をインストールしてサインインしてください。このページに戻ると、もう一度確認します。",
+ "devicesPage.network.line.ready": "{name} として接続中です。Tailscale 上の他のコンピューターからここに接続できます。",
+ "devicesPage.network.line.notShared": "{name} として接続中です。Tailscale 上の他のコンピューターからここへの接続を許可してください。",
+ "devicesPage.add.phone": "スマホ",
+ "devicesPage.add.phoneLine": "{app} アプリでコードをスキャン",
+ "devicesPage.add.computer": "コンピューター",
+ "devicesPage.add.computerLine": "アプリを入れたノート PC、デスクトップ、Mac mini",
+ "devicesPage.add.server": "自分のサーバー",
+ "devicesPage.add.serverLine": "レンタルしたマシン、または自宅で常時稼働しているマシン",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "常時稼働、運用はおまかせ",
+ "devicesPage.addFlow.adminOnly": "ここでデバイスを追加できるのは管理者だけです。",
+ "devicesPage.addFlow.computerCloud": "もう一方のコンピューターに {app} をインストールし、同じアカウントでサインインしてください。Cloud が自動で開きます。",
+ "devicesPage.addFlow.computerInstall": "もう一方のコンピューターに {app} をインストールしてください。",
+ "devicesPage.addFlow.computerNeeds": "もう一方のコンピューターには {app} と Tailscale が必要です。同じ Tailscale アカウントでサインインしてください。",
+ "devicesPage.addFlow.computerPaste": "そこで + から「サーバーに接続」を選び、このリンクを貼り付けてください。",
+ "devicesPage.addFlow.connected": "{name} が接続されました",
+ "devicesPage.addFlow.waiting": "接続を待っています…",
+ "devicesPage.addFlow.networkFirst": "まずはプライベートネットワーク",
+ "devicesPage.addFlow.pasteLink": "表示されたリンクを貼り付け",
+ "devicesPage.addFlow.serverAnywhere": "どこからでも接続可能",
+ "devicesPage.addFlow.serverTailscale": "プライベートネットワーク上(Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "そのマシンで次のいずれかを実行してください。Node 24 が必要で、ここに貼り付けるリンクが表示されます。",
+ "devicesPage.addFlow.serverDesktop": "表示されたリンクを、{app} アプリの + から「サーバーに接続」を選んで貼り付けてください。",
"settings.people.activityIn": "アクティビティはデータにあります。",
"settings.people.members": "メンバー",
"settings.place.alwaysOn": "常にオン",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 676162e612..2a4eac48d1 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -7346,6 +7346,89 @@
"settings.page.overview": "개요",
"settings.page.plan": "요금제 및 결제",
"settings.page.spending": "지출",
+ "settings.page.devices": "기기",
+ "devicesPage.add": "기기 추가",
+ "devicesPage.mapLabel": "내 기기와 연결 방식",
+ "devicesPage.empty": "아직 연결된 다른 기기가 없어요. 휴대폰, 컴퓨터 또는 내 서버를 추가하세요.",
+ "devicesPage.status.here": "현재 기기",
+ "devicesPage.status.online": "온라인",
+ "devicesPage.status.offline": "오프라인",
+ "devicesPage.status.seen": "{when} 접속",
+ "devicesPage.status.ssh": "봇이 작업 가능",
+ "devicesPage.status.unknown": "확인 안 됨",
+ "devicesPage.note.update": "업데이트 필요",
+ "devicesPage.note.signedOut": "다시 페어링 필요",
+ "devicesPage.note.insecure": "안전한 주소 필요",
+ "devicesPage.note.unreachable": "연결할 수 없음",
+ "devicesPage.note.reconnecting": "다시 연결 중…",
+ "devicesPage.route.here": "이 기기",
+ "devicesPage.route.local": "같은 네트워크",
+ "devicesPage.route.tailscale": "사설 네트워크",
+ "devicesPage.route.relay": "{app} 경유",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "인터넷",
+ "devicesPage.route.paired": "로그인됨",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "컴퓨터",
+ "devicesPage.kind.desktop": "데스크톱 컴퓨터",
+ "devicesPage.kind.server": "내 서버",
+ "devicesPage.kind.cloud": "클라우드",
+ "devicesPage.kind.phone": "휴대폰",
+ "devicesPage.kind.vm": "봇의 컴퓨터",
+ "devicesPage.group.computers": "컴퓨터",
+ "devicesPage.group.servers": "클라우드 및 내 서버",
+ "devicesPage.group.phones": "휴대폰",
+ "devicesPage.detail.kind": "종류",
+ "devicesPage.detail.reaches": "연결 방식",
+ "devicesPage.detail.address": "주소",
+ "devicesPage.detail.version": "버전",
+ "devicesPage.detail.lastSeen": "마지막 접속",
+ "devicesPage.detail.bots": "봇",
+ "devicesPage.detail.runsBots": "자체 봇이 있음",
+ "devicesPage.detail.hostsComputer": "봇이 작업할 수 있음",
+ "devicesPage.detail.reachesBots": "이곳의 봇과 대화함",
+ "devicesPage.action.copyUpdate": "업데이트 명령 복사",
+ "devicesPage.action.manage": "관리",
+ "devicesPage.action.removeApps": "앱 제거",
+ "devicesPage.action.signOut": "로그아웃시키기",
+ "devicesPage.network.title": "사설 네트워크",
+ "devicesPage.network.setUp": "설정",
+ "devicesPage.network.share": "내 컴퓨터 접속 허용",
+ "devicesPage.network.addComputer": "컴퓨터 추가",
+ "devicesPage.network.short.unknown": "설정 안 됨",
+ "devicesPage.network.short.notInstalled": "설치 안 됨",
+ "devicesPage.network.short.noCli": "명령줄 도구 필요",
+ "devicesPage.network.short.signedOut": "로그아웃됨",
+ "devicesPage.network.short.notRunning": "실행 중 아님",
+ "devicesPage.network.short.needsApproval": "승인 대기 중",
+ "devicesPage.network.short.needsPermission": "권한 필요",
+ "devicesPage.network.short.magicdns": "MagicDNS 필요",
+ "devicesPage.network.short.ready": "켜짐",
+ "devicesPage.network.line.unknown": "Tailscale은 어디에 있든 내 컴퓨터들을 비공개로 연결해요. 여기서 한 번만 설정하세요.",
+ "devicesPage.network.line.notInstalled": "이 컴퓨터에 Tailscale을 설치하고 로그인하세요. 이 페이지로 돌아오면 다시 확인해요.",
+ "devicesPage.network.line.ready": "{name} 이름으로 연결됨. Tailscale에 있는 다른 컴퓨터가 여기에 연결할 수 있어요.",
+ "devicesPage.network.line.notShared": "{name} 이름으로 연결됨. Tailscale에 있는 다른 컴퓨터가 여기에 연결하도록 허용하세요.",
+ "devicesPage.add.phone": "휴대폰",
+ "devicesPage.add.phoneLine": "{app} 앱으로 코드 스캔",
+ "devicesPage.add.computer": "컴퓨터",
+ "devicesPage.add.computerLine": "앱이 설치된 노트북, 데스크톱 또는 Mac mini",
+ "devicesPage.add.server": "내 서버",
+ "devicesPage.add.serverLine": "임대한 머신이나 집에서 늘 켜 두는 머신",
+ "devicesPage.add.cloud": "클라우드",
+ "devicesPage.add.cloudLine": "항상 켜져 있고 대신 운영해 드려요",
+ "devicesPage.addFlow.adminOnly": "여기서는 관리자만 기기를 추가할 수 있어요.",
+ "devicesPage.addFlow.computerCloud": "다른 컴퓨터에 {app}을(를) 설치하고 같은 계정으로 로그인하세요. 클라우드가 자동으로 열려요.",
+ "devicesPage.addFlow.computerInstall": "다른 컴퓨터에 {app}을(를) 설치하세요.",
+ "devicesPage.addFlow.computerNeeds": "다른 컴퓨터에 {app}과(와) Tailscale이 필요하고, 같은 Tailscale 계정으로 로그인되어 있어야 해요.",
+ "devicesPage.addFlow.computerPaste": "그곳에서 +, 서버에 연결 순서로 고른 뒤 이 링크를 붙여 넣으세요.",
+ "devicesPage.addFlow.connected": "{name} 연결됨",
+ "devicesPage.addFlow.waiting": "연결을 기다리는 중…",
+ "devicesPage.addFlow.networkFirst": "먼저 사설 네트워크",
+ "devicesPage.addFlow.pasteLink": "표시된 링크 붙여 넣기",
+ "devicesPage.addFlow.serverAnywhere": "어디서나 접속 가능",
+ "devicesPage.addFlow.serverTailscale": "내 사설 네트워크 (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "그 머신에서 다음 중 하나를 실행하세요. Node 24가 필요하며, 여기에 붙여 넣을 링크가 표시돼요.",
+ "devicesPage.addFlow.serverDesktop": "표시된 링크를 {app} 앱에서 +, 서버에 연결 순서로 고른 뒤 붙여 넣으세요.",
"settings.people.activityIn": "활동은 데이터에 있어요.",
"settings.people.members": "멤버",
"settings.place.alwaysOn": "항상 켜짐",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index f77375de54..806e5a2769 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -6767,6 +6767,89 @@
"settings.page.overview": "Przegląd",
"settings.page.plan": "Plan i płatności",
"settings.page.spending": "Wydatki",
+ "settings.page.devices": "Urządzenia",
+ "devicesPage.add": "Dodaj urządzenie",
+ "devicesPage.mapLabel": "Twoje urządzenia i sposób ich połączenia",
+ "devicesPage.empty": "Nic więcej nie jest jeszcze połączone. Dodaj telefon, komputer lub własny serwer.",
+ "devicesPage.status.here": "Jesteś tutaj",
+ "devicesPage.status.online": "Online",
+ "devicesPage.status.offline": "Offline",
+ "devicesPage.status.seen": "Widziano {when}",
+ "devicesPage.status.ssh": "Boty na nim pracują",
+ "devicesPage.status.unknown": "Nie sprawdzono",
+ "devicesPage.note.update": "Zaktualizuj",
+ "devicesPage.note.signedOut": "Sparuj ponownie",
+ "devicesPage.note.insecure": "Wymaga bezpiecznego adresu",
+ "devicesPage.note.unreachable": "Nie można się połączyć",
+ "devicesPage.note.reconnecting": "Ponowne łączenie…",
+ "devicesPage.route.here": "Tutaj",
+ "devicesPage.route.local": "Ta sama sieć",
+ "devicesPage.route.tailscale": "Sieć prywatna",
+ "devicesPage.route.relay": "Przez {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Zalogowano",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Komputer",
+ "devicesPage.kind.desktop": "Komputer stacjonarny",
+ "devicesPage.kind.server": "Własny serwer",
+ "devicesPage.kind.cloud": "Chmura",
+ "devicesPage.kind.phone": "Telefon",
+ "devicesPage.kind.vm": "Komputer bota",
+ "devicesPage.group.computers": "Komputery",
+ "devicesPage.group.servers": "Chmury i własne serwery",
+ "devicesPage.group.phones": "Telefony",
+ "devicesPage.detail.kind": "Co to jest",
+ "devicesPage.detail.reaches": "Łączy się przez",
+ "devicesPage.detail.address": "Adres",
+ "devicesPage.detail.version": "Wersja",
+ "devicesPage.detail.lastSeen": "Ostatnia aktywność",
+ "devicesPage.detail.bots": "Boty",
+ "devicesPage.detail.runsBots": "Ma własne boty",
+ "devicesPage.detail.hostsComputer": "Boty mogą na nim pracować",
+ "devicesPage.detail.reachesBots": "Rozmawia z botami tutaj",
+ "devicesPage.action.copyUpdate": "Kopiuj polecenie aktualizacji",
+ "devicesPage.action.manage": "Zarządzaj",
+ "devicesPage.action.removeApps": "Usuń jego aplikacje",
+ "devicesPage.action.signOut": "Wyloguj",
+ "devicesPage.network.title": "Sieć prywatna",
+ "devicesPage.network.setUp": "Skonfiguruj",
+ "devicesPage.network.share": "Wpuść swoje komputery",
+ "devicesPage.network.addComputer": "Dodaj komputer",
+ "devicesPage.network.short.unknown": "Nie skonfigurowano",
+ "devicesPage.network.short.notInstalled": "Nie zainstalowano",
+ "devicesPage.network.short.noCli": "Wymaga narzędzia wiersza poleceń",
+ "devicesPage.network.short.signedOut": "Wylogowano",
+ "devicesPage.network.short.notRunning": "Nie działa",
+ "devicesPage.network.short.needsApproval": "Czeka na zatwierdzenie",
+ "devicesPage.network.short.needsPermission": "Wymaga uprawnień",
+ "devicesPage.network.short.magicdns": "Wymaga MagicDNS",
+ "devicesPage.network.short.ready": "Włączone",
+ "devicesPage.network.line.unknown": "Tailscale łączy twoje komputery prywatnie, gdziekolwiek są. Skonfiguruj go tutaj raz.",
+ "devicesPage.network.line.notInstalled": "Zainstaluj Tailscale na tym komputerze i zaloguj się. Ta strona sprawdzi ponownie, gdy do niej wrócisz.",
+ "devicesPage.network.line.ready": "Połączono jako {name}. Twoje inne komputery w Tailscale mogą się tu połączyć.",
+ "devicesPage.network.line.notShared": "Połączono jako {name}. Pozwól swoim innym komputerom w Tailscale łączyć się tutaj.",
+ "devicesPage.add.phone": "Telefon",
+ "devicesPage.add.phoneLine": "Zeskanuj kod w aplikacji {app}",
+ "devicesPage.add.computer": "Komputer",
+ "devicesPage.add.computerLine": "Laptop, komputer stacjonarny lub Mac mini z aplikacją",
+ "devicesPage.add.server": "Własny serwer",
+ "devicesPage.add.serverLine": "Maszyna, którą wynajmujesz, albo taka, która stale działa w domu",
+ "devicesPage.add.cloud": "Chmura",
+ "devicesPage.add.cloudLine": "Zawsze włączona, obsługujemy ją za ciebie",
+ "devicesPage.addFlow.adminOnly": "Tylko administrator może tu dodawać urządzenia.",
+ "devicesPage.addFlow.computerCloud": "Na drugim komputerze zainstaluj {app} i zaloguj się na to samo konto. Chmura otworzy się sama.",
+ "devicesPage.addFlow.computerInstall": "Na drugim komputerze zainstaluj {app}.",
+ "devicesPage.addFlow.computerNeeds": "Drugi komputer potrzebuje {app} i Tailscale zalogowanego na to samo konto Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Tam wybierz +, a potem Połącz z serwerem, i wklej ten link.",
+ "devicesPage.addFlow.connected": "Połączono: {name}",
+ "devicesPage.addFlow.waiting": "Oczekiwanie na połączenie…",
+ "devicesPage.addFlow.networkFirst": "Najpierw sieć prywatna",
+ "devicesPage.addFlow.pasteLink": "Wklej wyświetlony link",
+ "devicesPage.addFlow.serverAnywhere": "Dostęp z dowolnego miejsca",
+ "devicesPage.addFlow.serverTailscale": "W twojej sieci prywatnej (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Uruchom jedno z tych poleceń na tej maszynie. Wymaga Node 24 i wyświetla link do wklejenia tutaj.",
+ "devicesPage.addFlow.serverDesktop": "Wklej wyświetlony link w aplikacji {app}: +, a potem Połącz z serwerem.",
"settings.people.activityIn": "Aktywność jest w sekcji Dane.",
"settings.people.members": "Członkowie",
"settings.place.alwaysOn": "Zawsze włączona",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index e060f07de9..eaf2f0fab7 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -10899,6 +10899,89 @@
"settings.page.overview": "Visão geral",
"settings.page.plan": "Plano e cobrança",
"settings.page.spending": "Gastos",
+ "settings.page.devices": "Dispositivos",
+ "devicesPage.add": "Adicionar um dispositivo",
+ "devicesPage.mapLabel": "Seus dispositivos e como eles se conectam",
+ "devicesPage.empty": "Nada mais está conectado ainda. Adicione um celular, um computador ou seu próprio servidor.",
+ "devicesPage.status.here": "Você está aqui",
+ "devicesPage.status.online": "Online",
+ "devicesPage.status.offline": "Offline",
+ "devicesPage.status.seen": "Visto {when}",
+ "devicesPage.status.ssh": "Os bots trabalham nele",
+ "devicesPage.status.unknown": "Não verificado",
+ "devicesPage.note.update": "Atualize",
+ "devicesPage.note.signedOut": "Pareie de novo",
+ "devicesPage.note.insecure": "Precisa de um endereço seguro",
+ "devicesPage.note.unreachable": "Não é possível acessar",
+ "devicesPage.note.reconnecting": "Reconectando…",
+ "devicesPage.route.here": "Aqui",
+ "devicesPage.route.local": "Mesma rede",
+ "devicesPage.route.tailscale": "Rede privada",
+ "devicesPage.route.relay": "Pelo {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Conectado",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Computador",
+ "devicesPage.kind.desktop": "Computador de mesa",
+ "devicesPage.kind.server": "Seu próprio servidor",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Celular",
+ "devicesPage.kind.vm": "Computador do bot",
+ "devicesPage.group.computers": "Computadores",
+ "devicesPage.group.servers": "Clouds e seus próprios servidores",
+ "devicesPage.group.phones": "Celulares",
+ "devicesPage.detail.kind": "O que é",
+ "devicesPage.detail.reaches": "Conecta por",
+ "devicesPage.detail.address": "Endereço",
+ "devicesPage.detail.version": "Versão",
+ "devicesPage.detail.lastSeen": "Visto por último",
+ "devicesPage.detail.bots": "Bots",
+ "devicesPage.detail.runsBots": "Tem bots próprios",
+ "devicesPage.detail.hostsComputer": "Os bots podem trabalhar nele",
+ "devicesPage.detail.reachesBots": "Fala com os bots daqui",
+ "devicesPage.action.copyUpdate": "Copiar comando de atualização",
+ "devicesPage.action.manage": "Gerenciar",
+ "devicesPage.action.removeApps": "Remover os apps dele",
+ "devicesPage.action.signOut": "Desconectar",
+ "devicesPage.network.title": "Rede privada",
+ "devicesPage.network.setUp": "Configurar",
+ "devicesPage.network.share": "Deixar seus computadores entrarem",
+ "devicesPage.network.addComputer": "Adicionar um computador",
+ "devicesPage.network.short.unknown": "Não configurado",
+ "devicesPage.network.short.notInstalled": "Não instalado",
+ "devicesPage.network.short.noCli": "Precisa da ferramenta de linha de comando",
+ "devicesPage.network.short.signedOut": "Desconectado",
+ "devicesPage.network.short.notRunning": "Não está rodando",
+ "devicesPage.network.short.needsApproval": "Aguardando aprovação",
+ "devicesPage.network.short.needsPermission": "Precisa de permissão",
+ "devicesPage.network.short.magicdns": "Precisa do MagicDNS",
+ "devicesPage.network.short.ready": "Ligado",
+ "devicesPage.network.line.unknown": "O Tailscale conecta seus computadores de forma privada, onde quer que estejam. Configure uma vez aqui.",
+ "devicesPage.network.line.notInstalled": "Instale o Tailscale neste computador e entre. Esta página verifica de novo quando você voltar.",
+ "devicesPage.network.line.ready": "Conectado como {name}. Seus outros computadores no Tailscale podem se conectar aqui.",
+ "devicesPage.network.line.notShared": "Conectado como {name}. Deixe seus outros computadores no Tailscale se conectarem aqui.",
+ "devicesPage.add.phone": "Celular",
+ "devicesPage.add.phoneLine": "Escaneie um código com o app {app}",
+ "devicesPage.add.computer": "Computador",
+ "devicesPage.add.computerLine": "Um notebook, desktop ou Mac mini com o app",
+ "devicesPage.add.server": "Seu próprio servidor",
+ "devicesPage.add.serverLine": "Uma máquina que você aluga, ou uma que fica sempre ligada em casa",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Sempre ligado, gerenciado para você",
+ "devicesPage.addFlow.adminOnly": "Só quem administra pode adicionar dispositivos aqui.",
+ "devicesPage.addFlow.computerCloud": "No outro computador, instale o {app} e entre com a mesma conta. Ele abre o Cloud sozinho.",
+ "devicesPage.addFlow.computerInstall": "No outro computador, instale o {app}.",
+ "devicesPage.addFlow.computerNeeds": "O outro computador precisa do {app} e do Tailscale, conectado à mesma conta do Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Lá, escolha + e depois “Conectar a um servidor”, e cole este link.",
+ "devicesPage.addFlow.connected": "{name} está conectado",
+ "devicesPage.addFlow.waiting": "Aguardando a conexão…",
+ "devicesPage.addFlow.networkFirst": "Primeiro, a rede privada",
+ "devicesPage.addFlow.pasteLink": "Cole o link que ele mostrar",
+ "devicesPage.addFlow.serverAnywhere": "Acessível de qualquer lugar",
+ "devicesPage.addFlow.serverTailscale": "Na sua rede privada (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Execute um destes comandos nessa máquina. Ele precisa do Node 24 e mostra um link para colar aqui.",
+ "devicesPage.addFlow.serverDesktop": "Cole o link que ele mostrar em + e depois “Conectar a um servidor”, no app {app}.",
"settings.people.activityIn": "A atividade fica em Dados.",
"settings.people.members": "Membros",
"settings.place.alwaysOn": "Sempre ligado",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index a1244943cf..07a18eeb1c 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -6828,6 +6828,89 @@
"settings.page.overview": "Обзор",
"settings.page.plan": "Тариф и оплата",
"settings.page.spending": "Расходы",
+ "settings.page.devices": "Устройства",
+ "devicesPage.add": "Добавить устройство",
+ "devicesPage.mapLabel": "Ваши устройства и их подключения",
+ "devicesPage.empty": "Пока больше ничего не подключено. Добавьте телефон, компьютер или свой сервер.",
+ "devicesPage.status.here": "Вы здесь",
+ "devicesPage.status.online": "В сети",
+ "devicesPage.status.offline": "Не в сети",
+ "devicesPage.status.seen": "Замечен {when}",
+ "devicesPage.status.ssh": "Боты работают на нём",
+ "devicesPage.status.unknown": "Не проверено",
+ "devicesPage.note.update": "Обновите",
+ "devicesPage.note.signedOut": "Сопрягите заново",
+ "devicesPage.note.insecure": "Нужен безопасный адрес",
+ "devicesPage.note.unreachable": "Нет связи",
+ "devicesPage.note.reconnecting": "Переподключение…",
+ "devicesPage.route.here": "Здесь",
+ "devicesPage.route.local": "Та же сеть",
+ "devicesPage.route.tailscale": "Частная сеть",
+ "devicesPage.route.relay": "Через {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Интернет",
+ "devicesPage.route.paired": "Вход выполнен",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Компьютер",
+ "devicesPage.kind.desktop": "Настольный компьютер",
+ "devicesPage.kind.server": "Свой сервер",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Телефон",
+ "devicesPage.kind.vm": "Компьютер бота",
+ "devicesPage.group.computers": "Компьютеры",
+ "devicesPage.group.servers": "Cloud и свои серверы",
+ "devicesPage.group.phones": "Телефоны",
+ "devicesPage.detail.kind": "Что это",
+ "devicesPage.detail.reaches": "Подключение",
+ "devicesPage.detail.address": "Адрес",
+ "devicesPage.detail.version": "Версия",
+ "devicesPage.detail.lastSeen": "Последняя активность",
+ "devicesPage.detail.bots": "Боты",
+ "devicesPage.detail.runsBots": "Есть свои боты",
+ "devicesPage.detail.hostsComputer": "Боты могут на нём работать",
+ "devicesPage.detail.reachesBots": "Общается с ботами здесь",
+ "devicesPage.action.copyUpdate": "Скопировать команду обновления",
+ "devicesPage.action.manage": "Управлять",
+ "devicesPage.action.removeApps": "Удалить его приложения",
+ "devicesPage.action.signOut": "Отключить",
+ "devicesPage.network.title": "Частная сеть",
+ "devicesPage.network.setUp": "Настроить",
+ "devicesPage.network.share": "Впустить ваши компьютеры",
+ "devicesPage.network.addComputer": "Добавить компьютер",
+ "devicesPage.network.short.unknown": "Не настроено",
+ "devicesPage.network.short.notInstalled": "Не установлено",
+ "devicesPage.network.short.noCli": "Нужен инструмент командной строки",
+ "devicesPage.network.short.signedOut": "Выполнен выход",
+ "devicesPage.network.short.notRunning": "Не запущено",
+ "devicesPage.network.short.needsApproval": "Ждёт одобрения",
+ "devicesPage.network.short.needsPermission": "Нужно разрешение",
+ "devicesPage.network.short.magicdns": "Нужен MagicDNS",
+ "devicesPage.network.short.ready": "Вкл.",
+ "devicesPage.network.line.unknown": "Tailscale соединяет ваши компьютеры по частной сети, где бы они ни были. Настройте его здесь один раз.",
+ "devicesPage.network.line.notInstalled": "Установите Tailscale на этот компьютер и войдите. Эта страница проверит снова, когда вы на неё вернётесь.",
+ "devicesPage.network.line.ready": "Подключено как {name}. Другие ваши компьютеры в Tailscale могут подключаться сюда.",
+ "devicesPage.network.line.notShared": "Подключено как {name}. Разрешите другим вашим компьютерам в Tailscale подключаться сюда.",
+ "devicesPage.add.phone": "Телефон",
+ "devicesPage.add.phoneLine": "Отсканируйте код в приложении {app}",
+ "devicesPage.add.computer": "Компьютер",
+ "devicesPage.add.computerLine": "Ноутбук, настольный компьютер или Mac mini с приложением",
+ "devicesPage.add.server": "Свой сервер",
+ "devicesPage.add.serverLine": "Арендованная машина или та, что всегда включена дома",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Всегда работает, обслуживаем за вас",
+ "devicesPage.addFlow.adminOnly": "Добавлять устройства здесь может только администратор.",
+ "devicesPage.addFlow.computerCloud": "На другом компьютере установите {app} и войдите с той же учётной записью. Cloud откроется сам.",
+ "devicesPage.addFlow.computerInstall": "На другом компьютере установите {app}.",
+ "devicesPage.addFlow.computerNeeds": "На другом компьютере нужны {app} и Tailscale со входом в ту же учётную запись Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Там выберите +, затем «Подключиться к серверу» и вставьте эту ссылку.",
+ "devicesPage.addFlow.connected": "{name}: подключено",
+ "devicesPage.addFlow.waiting": "Ждём подключения…",
+ "devicesPage.addFlow.networkFirst": "Сначала частная сеть",
+ "devicesPage.addFlow.pasteLink": "Вставьте показанную ссылку",
+ "devicesPage.addFlow.serverAnywhere": "Доступ откуда угодно",
+ "devicesPage.addFlow.serverTailscale": "В вашей частной сети (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Выполните одну из этих команд на той машине. Нужен Node 24; команда выведет ссылку, которую нужно вставить сюда.",
+ "devicesPage.addFlow.serverDesktop": "Вставьте выведенную ссылку в приложении {app}: +, затем «Подключиться к серверу».",
"settings.people.activityIn": "Активность — в разделе «Данные».",
"settings.people.members": "Участники",
"settings.place.alwaysOn": "Всегда включён",
diff --git a/src/locales/tr.json b/src/locales/tr.json
index c46ee40ba7..b1e35b3133 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -5565,6 +5565,89 @@
"settings.page.overview": "Genel bakış",
"settings.page.plan": "Plan ve faturalandırma",
"settings.page.spending": "Harcamalar",
+ "settings.page.devices": "Cihazlar",
+ "devicesPage.add": "Cihaz ekle",
+ "devicesPage.mapLabel": "Cihazlarınız ve nasıl bağlandıkları",
+ "devicesPage.empty": "Henüz başka bir şey bağlı değil. Bir telefon, bilgisayar veya kendi sunucunuzu ekleyin.",
+ "devicesPage.status.here": "Buradasınız",
+ "devicesPage.status.online": "Çevrimiçi",
+ "devicesPage.status.offline": "Çevrimdışı",
+ "devicesPage.status.seen": "Görülme: {when}",
+ "devicesPage.status.ssh": "Botlar üzerinde çalışır",
+ "devicesPage.status.unknown": "Kontrol edilmedi",
+ "devicesPage.note.update": "Güncelleyin",
+ "devicesPage.note.signedOut": "Yeniden eşleştirin",
+ "devicesPage.note.insecure": "Güvenli bir adres gerekli",
+ "devicesPage.note.unreachable": "Ulaşılamıyor",
+ "devicesPage.note.reconnecting": "Yeniden bağlanıyor…",
+ "devicesPage.route.here": "Burası",
+ "devicesPage.route.local": "Aynı ağ",
+ "devicesPage.route.tailscale": "Özel ağ",
+ "devicesPage.route.relay": "{app} üzerinden",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "İnternet",
+ "devicesPage.route.paired": "Giriş yapıldı",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Bilgisayar",
+ "devicesPage.kind.desktop": "Masaüstü bilgisayar",
+ "devicesPage.kind.server": "Kendi sunucunuz",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Telefon",
+ "devicesPage.kind.vm": "Botun bilgisayarı",
+ "devicesPage.group.computers": "Bilgisayarlar",
+ "devicesPage.group.servers": "Cloud'lar ve kendi sunucularınız",
+ "devicesPage.group.phones": "Telefonlar",
+ "devicesPage.detail.kind": "Ne olduğu",
+ "devicesPage.detail.reaches": "Bağlantı şekli",
+ "devicesPage.detail.address": "Adres",
+ "devicesPage.detail.version": "Sürüm",
+ "devicesPage.detail.lastSeen": "Son görülme",
+ "devicesPage.detail.bots": "Botlar",
+ "devicesPage.detail.runsBots": "Kendi botları var",
+ "devicesPage.detail.hostsComputer": "Botlar üzerinde çalışabilir",
+ "devicesPage.detail.reachesBots": "Buradaki botlarla konuşur",
+ "devicesPage.action.copyUpdate": "Güncelleme komutunu kopyala",
+ "devicesPage.action.manage": "Yönet",
+ "devicesPage.action.removeApps": "Uygulamalarını kaldır",
+ "devicesPage.action.signOut": "Oturumu kapat",
+ "devicesPage.network.title": "Özel ağ",
+ "devicesPage.network.setUp": "Kur",
+ "devicesPage.network.share": "Bilgisayarlarınıza izin ver",
+ "devicesPage.network.addComputer": "Bilgisayar ekle",
+ "devicesPage.network.short.unknown": "Kurulmadı",
+ "devicesPage.network.short.notInstalled": "Yüklü değil",
+ "devicesPage.network.short.noCli": "Komut satırı aracı gerekli",
+ "devicesPage.network.short.signedOut": "Oturum kapalı",
+ "devicesPage.network.short.notRunning": "Çalışmıyor",
+ "devicesPage.network.short.needsApproval": "Onay bekleniyor",
+ "devicesPage.network.short.needsPermission": "İzin gerekli",
+ "devicesPage.network.short.magicdns": "MagicDNS gerekli",
+ "devicesPage.network.short.ready": "Açık",
+ "devicesPage.network.line.unknown": "Tailscale bilgisayarlarınızı nerede olurlarsa olsunlar özel olarak bağlar. Burada bir kez kurun.",
+ "devicesPage.network.line.notInstalled": "Bu bilgisayara Tailscale'i yükleyin ve giriş yapın. Bu sayfaya döndüğünüzde yeniden kontrol edilir.",
+ "devicesPage.network.line.ready": "{name} adıyla bağlı. Tailscale'deki diğer bilgisayarlarınız buraya bağlanabilir.",
+ "devicesPage.network.line.notShared": "{name} adıyla bağlı. Tailscale'deki diğer bilgisayarlarınızın buraya bağlanmasına izin verin.",
+ "devicesPage.add.phone": "Telefon",
+ "devicesPage.add.phoneLine": "{app} uygulamasıyla bir kod tarayın",
+ "devicesPage.add.computer": "Bilgisayar",
+ "devicesPage.add.computerLine": "Uygulamanın yüklü olduğu bir dizüstü, masaüstü veya Mac mini",
+ "devicesPage.add.server": "Kendi sunucunuz",
+ "devicesPage.add.serverLine": "Kiraladığınız bir makine ya da evde hep açık duran bir makine",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Her zaman açık, sizin için işletilir",
+ "devicesPage.addFlow.adminOnly": "Buraya yalnızca bir yönetici cihaz ekleyebilir.",
+ "devicesPage.addFlow.computerCloud": "Diğer bilgisayara {app} uygulamasını yükleyin ve aynı hesapla giriş yapın. Cloud kendiliğinden açılır.",
+ "devicesPage.addFlow.computerInstall": "Diğer bilgisayara {app} uygulamasını yükleyin.",
+ "devicesPage.addFlow.computerNeeds": "Diğer bilgisayarda {app} uygulaması ve aynı Tailscale hesabında oturum açmış Tailscale gerekir.",
+ "devicesPage.addFlow.computerPaste": "Orada + simgesini, ardından Bir sunucuya bağlan seçeneğini seçin ve bu bağlantıyı yapıştırın.",
+ "devicesPage.addFlow.connected": "{name} bağlandı",
+ "devicesPage.addFlow.waiting": "Bağlanması bekleniyor…",
+ "devicesPage.addFlow.networkFirst": "Önce özel ağ",
+ "devicesPage.addFlow.pasteLink": "Gösterdiği bağlantıyı yapıştırın",
+ "devicesPage.addFlow.serverAnywhere": "Her yerden erişilebilir",
+ "devicesPage.addFlow.serverTailscale": "Özel ağınızda (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "O makinede bunlardan birini çalıştırın. Node 24 gerekir ve buraya yapıştırılacak bir bağlantı yazdırır.",
+ "devicesPage.addFlow.serverDesktop": "Yazdırdığı bağlantıyı {app} uygulamasında + ve ardından Bir sunucuya bağlan seçeneğiyle yapıştırın.",
"settings.people.activityIn": "Etkinlik Veriler bölümünde.",
"settings.people.members": "Üyeler",
"settings.place.alwaysOn": "Her zaman açık",
diff --git a/src/locales/uk.json b/src/locales/uk.json
index dc1f35073e..72f5f73262 100644
--- a/src/locales/uk.json
+++ b/src/locales/uk.json
@@ -3703,6 +3703,89 @@
"settings.page.overview": "Огляд",
"settings.page.plan": "План і оплата",
"settings.page.spending": "Витрати",
+ "settings.page.devices": "Пристрої",
+ "devicesPage.add": "Додати пристрій",
+ "devicesPage.mapLabel": "Ваші пристрої та їхні з'єднання",
+ "devicesPage.empty": "Поки що більше нічого не під'єднано. Додайте телефон, комп’ютер або власний сервер.",
+ "devicesPage.status.here": "Ви тут",
+ "devicesPage.status.online": "Онлайн",
+ "devicesPage.status.offline": "Офлайн",
+ "devicesPage.status.seen": "Бачено {when}",
+ "devicesPage.status.ssh": "Боти працюють на ньому",
+ "devicesPage.status.unknown": "Не перевірено",
+ "devicesPage.note.update": "Оновіть",
+ "devicesPage.note.signedOut": "Прив'яжіть знову",
+ "devicesPage.note.insecure": "Потрібна безпечна адреса",
+ "devicesPage.note.unreachable": "Немає зв'язку",
+ "devicesPage.note.reconnecting": "Повторне під'єднання…",
+ "devicesPage.route.here": "Тут",
+ "devicesPage.route.local": "Та сама мережа",
+ "devicesPage.route.tailscale": "Приватна мережа",
+ "devicesPage.route.relay": "Через {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Інтернет",
+ "devicesPage.route.paired": "Вхід виконано",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Комп’ютер",
+ "devicesPage.kind.desktop": "Настільний комп’ютер",
+ "devicesPage.kind.server": "Власний сервер",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Телефон",
+ "devicesPage.kind.vm": "Комп’ютер бота",
+ "devicesPage.group.computers": "Комп’ютери",
+ "devicesPage.group.servers": "Cloud і власні сервери",
+ "devicesPage.group.phones": "Телефони",
+ "devicesPage.detail.kind": "Що це",
+ "devicesPage.detail.reaches": "З'єднання",
+ "devicesPage.detail.address": "Адреса",
+ "devicesPage.detail.version": "Версія",
+ "devicesPage.detail.lastSeen": "Остання поява",
+ "devicesPage.detail.bots": "Боти",
+ "devicesPage.detail.runsBots": "Має власних ботів",
+ "devicesPage.detail.hostsComputer": "Боти можуть на ньому працювати",
+ "devicesPage.detail.reachesBots": "Спілкується з ботами тут",
+ "devicesPage.action.copyUpdate": "Копіювати команду оновлення",
+ "devicesPage.action.manage": "Керувати",
+ "devicesPage.action.removeApps": "Видалити його застосунки",
+ "devicesPage.action.signOut": "Відключити",
+ "devicesPage.network.title": "Приватна мережа",
+ "devicesPage.network.setUp": "Налаштувати",
+ "devicesPage.network.share": "Впустити ваші комп’ютери",
+ "devicesPage.network.addComputer": "Додати комп’ютер",
+ "devicesPage.network.short.unknown": "Не налаштовано",
+ "devicesPage.network.short.notInstalled": "Не встановлено",
+ "devicesPage.network.short.noCli": "Потрібен інструмент командного рядка",
+ "devicesPage.network.short.signedOut": "Вихід виконано",
+ "devicesPage.network.short.notRunning": "Не запущено",
+ "devicesPage.network.short.needsApproval": "Чекає на схвалення",
+ "devicesPage.network.short.needsPermission": "Потрібен дозвіл",
+ "devicesPage.network.short.magicdns": "Потрібен MagicDNS",
+ "devicesPage.network.short.ready": "Увімк.",
+ "devicesPage.network.line.unknown": "Tailscale з'єднує ваші комп’ютери приватно, де б вони не були. Налаштуйте його тут один раз.",
+ "devicesPage.network.line.notInstalled": "Установіть Tailscale на цей комп’ютер і увійдіть. Ця сторінка перевірить знову, коли ви на неї повернетеся.",
+ "devicesPage.network.line.ready": "Під'єднано як {name}. Інші ваші комп’ютери в Tailscale можуть під'єднуватися сюди.",
+ "devicesPage.network.line.notShared": "Під'єднано як {name}. Дозвольте іншим вашим комп’ютерам у Tailscale під'єднуватися сюди.",
+ "devicesPage.add.phone": "Телефон",
+ "devicesPage.add.phoneLine": "Відскануйте код у застосунку {app}",
+ "devicesPage.add.computer": "Комп’ютер",
+ "devicesPage.add.computerLine": "Ноутбук, настільний комп’ютер або Mac mini із застосунком",
+ "devicesPage.add.server": "Власний сервер",
+ "devicesPage.add.serverLine": "Орендована машина або та, що завжди ввімкнена вдома",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Завжди працює, ми обслуговуємо його за вас",
+ "devicesPage.addFlow.adminOnly": "Додавати пристрої тут може лише адміністратор.",
+ "devicesPage.addFlow.computerCloud": "На іншому комп’ютері встановіть {app} і ввійдіть з тим самим обліковим записом. Cloud відкриється сам.",
+ "devicesPage.addFlow.computerInstall": "На іншому комп’ютері встановіть {app}.",
+ "devicesPage.addFlow.computerNeeds": "На іншому комп’ютері потрібні {app} і Tailscale із входом у той самий обліковий запис Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Там виберіть +, потім «Під'єднатися до сервера» і вставте це посилання.",
+ "devicesPage.addFlow.connected": "{name}: під'єднано",
+ "devicesPage.addFlow.waiting": "Чекаємо на під'єднання…",
+ "devicesPage.addFlow.networkFirst": "Спершу приватна мережа",
+ "devicesPage.addFlow.pasteLink": "Вставте показане посилання",
+ "devicesPage.addFlow.serverAnywhere": "Доступ звідусіль",
+ "devicesPage.addFlow.serverTailscale": "У вашій приватній мережі (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Виконайте одну з цих команд на тій машині. Потрібен Node 24; команда виведе посилання, яке треба вставити сюди.",
+ "devicesPage.addFlow.serverDesktop": "Вставте виведене посилання в застосунку {app}: +, потім «Під'єднатися до сервера».",
"settings.people.activityIn": "Активність — у розділі «Дані».",
"settings.people.members": "Учасники",
"settings.place.alwaysOn": "Завжди увімкнений",
diff --git a/src/locales/vi.json b/src/locales/vi.json
index 0248562809..8ca21f0d2c 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -5565,6 +5565,89 @@
"settings.page.overview": "Tổng quan",
"settings.page.plan": "Gói và thanh toán",
"settings.page.spending": "Chi tiêu",
+ "settings.page.devices": "Thiết bị",
+ "devicesPage.add": "Thêm thiết bị",
+ "devicesPage.mapLabel": "Các thiết bị của bạn và cách chúng kết nối",
+ "devicesPage.empty": "Chưa có gì khác được kết nối. Hãy thêm điện thoại, máy tính hoặc máy chủ của riêng bạn.",
+ "devicesPage.status.here": "Bạn đang ở đây",
+ "devicesPage.status.online": "Trực tuyến",
+ "devicesPage.status.offline": "Ngoại tuyến",
+ "devicesPage.status.seen": "Hoạt động {when}",
+ "devicesPage.status.ssh": "Bot làm việc trên máy này",
+ "devicesPage.status.unknown": "Chưa kiểm tra",
+ "devicesPage.note.update": "Hãy cập nhật",
+ "devicesPage.note.signedOut": "Hãy ghép nối lại",
+ "devicesPage.note.insecure": "Cần địa chỉ an toàn",
+ "devicesPage.note.unreachable": "Không kết nối được",
+ "devicesPage.note.reconnecting": "Đang kết nối lại…",
+ "devicesPage.route.here": "Tại đây",
+ "devicesPage.route.local": "Cùng mạng",
+ "devicesPage.route.tailscale": "Mạng riêng",
+ "devicesPage.route.relay": "Qua {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "Internet",
+ "devicesPage.route.paired": "Đã đăng nhập",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "Máy tính",
+ "devicesPage.kind.desktop": "Máy tính để bàn",
+ "devicesPage.kind.server": "Máy chủ của riêng bạn",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "Điện thoại",
+ "devicesPage.kind.vm": "Máy tính của bot",
+ "devicesPage.group.computers": "Máy tính",
+ "devicesPage.group.servers": "Cloud và máy chủ của riêng bạn",
+ "devicesPage.group.phones": "Điện thoại",
+ "devicesPage.detail.kind": "Loại thiết bị",
+ "devicesPage.detail.reaches": "Kết nối qua",
+ "devicesPage.detail.address": "Địa chỉ",
+ "devicesPage.detail.version": "Phiên bản",
+ "devicesPage.detail.lastSeen": "Hoạt động lần cuối",
+ "devicesPage.detail.bots": "Bot",
+ "devicesPage.detail.runsBots": "Có bot riêng",
+ "devicesPage.detail.hostsComputer": "Bot có thể làm việc trên máy này",
+ "devicesPage.detail.reachesBots": "Trò chuyện với các bot ở đây",
+ "devicesPage.action.copyUpdate": "Sao chép lệnh cập nhật",
+ "devicesPage.action.manage": "Quản lý",
+ "devicesPage.action.removeApps": "Gỡ các ứng dụng của nó",
+ "devicesPage.action.signOut": "Đăng xuất thiết bị",
+ "devicesPage.network.title": "Mạng riêng",
+ "devicesPage.network.setUp": "Thiết lập",
+ "devicesPage.network.share": "Cho các máy tính của bạn vào",
+ "devicesPage.network.addComputer": "Thêm máy tính",
+ "devicesPage.network.short.unknown": "Chưa thiết lập",
+ "devicesPage.network.short.notInstalled": "Chưa cài đặt",
+ "devicesPage.network.short.noCli": "Cần công cụ dòng lệnh",
+ "devicesPage.network.short.signedOut": "Đã đăng xuất",
+ "devicesPage.network.short.notRunning": "Không chạy",
+ "devicesPage.network.short.needsApproval": "Đang chờ phê duyệt",
+ "devicesPage.network.short.needsPermission": "Cần cấp quyền",
+ "devicesPage.network.short.magicdns": "Cần MagicDNS",
+ "devicesPage.network.short.ready": "Bật",
+ "devicesPage.network.line.unknown": "Tailscale kết nối riêng tư các máy tính của bạn, dù chúng ở đâu. Thiết lập một lần tại đây.",
+ "devicesPage.network.line.notInstalled": "Cài Tailscale trên máy tính này và đăng nhập. Trang này sẽ kiểm tra lại khi bạn quay lại.",
+ "devicesPage.network.line.ready": "Đã tham gia với tên {name}. Các máy tính khác của bạn trên Tailscale có thể kết nối tới đây.",
+ "devicesPage.network.line.notShared": "Đã tham gia với tên {name}. Hãy cho phép các máy tính khác của bạn trên Tailscale kết nối tới đây.",
+ "devicesPage.add.phone": "Điện thoại",
+ "devicesPage.add.phoneLine": "Quét mã bằng ứng dụng {app}",
+ "devicesPage.add.computer": "Máy tính",
+ "devicesPage.add.computerLine": "Laptop, máy để bàn hoặc Mac mini có cài ứng dụng",
+ "devicesPage.add.server": "Máy chủ của riêng bạn",
+ "devicesPage.add.serverLine": "Máy bạn thuê, hoặc máy luôn bật ở nhà",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "Luôn bật, chúng tôi vận hành cho bạn",
+ "devicesPage.addFlow.adminOnly": "Chỉ quản trị viên mới có thể thêm thiết bị tại đây.",
+ "devicesPage.addFlow.computerCloud": "Trên máy tính kia, hãy cài {app} và đăng nhập bằng cùng tài khoản. Máy sẽ tự mở Cloud.",
+ "devicesPage.addFlow.computerInstall": "Trên máy tính kia, hãy cài {app}.",
+ "devicesPage.addFlow.computerNeeds": "Máy tính kia cần có {app} và Tailscale, đăng nhập cùng một tài khoản Tailscale.",
+ "devicesPage.addFlow.computerPaste": "Tại đó, chọn + rồi Kết nối với máy chủ, và dán liên kết này.",
+ "devicesPage.addFlow.connected": "{name} đã kết nối",
+ "devicesPage.addFlow.waiting": "Đang chờ kết nối…",
+ "devicesPage.addFlow.networkFirst": "Trước tiên, mạng riêng",
+ "devicesPage.addFlow.pasteLink": "Dán liên kết mà nó hiển thị",
+ "devicesPage.addFlow.serverAnywhere": "Truy cập được từ mọi nơi",
+ "devicesPage.addFlow.serverTailscale": "Trên mạng riêng của bạn (Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "Chạy một trong các lệnh này trên máy đó. Lệnh cần Node 24 và sẽ in ra một liên kết để dán vào đây.",
+ "devicesPage.addFlow.serverDesktop": "Dán liên kết mà nó in ra vào + rồi Kết nối với máy chủ trong ứng dụng {app}.",
"settings.people.activityIn": "Hoạt động nằm trong Dữ liệu.",
"settings.people.members": "Thành viên",
"settings.place.alwaysOn": "Luôn bật",
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index cc856c6089..4c163e3a98 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -9886,6 +9886,89 @@
"settings.page.overview": "總覽",
"settings.page.plan": "方案和帳單",
"settings.page.spending": "花費",
+ "settings.page.devices": "裝置",
+ "devicesPage.add": "新增裝置",
+ "devicesPage.mapLabel": "你的裝置及其連線方式",
+ "devicesPage.empty": "還沒有其他裝置連線。新增一支手機、一台電腦或你自己的伺服器。",
+ "devicesPage.status.here": "你在這裡",
+ "devicesPage.status.online": "在線",
+ "devicesPage.status.offline": "離線",
+ "devicesPage.status.seen": "上次出現於 {when}",
+ "devicesPage.status.ssh": "機器人可在上面工作",
+ "devicesPage.status.unknown": "未檢查",
+ "devicesPage.note.update": "請更新",
+ "devicesPage.note.signedOut": "請重新配對",
+ "devicesPage.note.insecure": "需要安全的位址",
+ "devicesPage.note.unreachable": "無法連線",
+ "devicesPage.note.reconnecting": "正在重新連線…",
+ "devicesPage.route.here": "本機",
+ "devicesPage.route.local": "同一網路",
+ "devicesPage.route.tailscale": "私人網路",
+ "devicesPage.route.relay": "透過 {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "網際網路",
+ "devicesPage.route.paired": "已登入",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "電腦",
+ "devicesPage.kind.desktop": "桌上型電腦",
+ "devicesPage.kind.server": "你自己的伺服器",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "手機",
+ "devicesPage.kind.vm": "機器人的電腦",
+ "devicesPage.group.computers": "電腦",
+ "devicesPage.group.servers": "Cloud 和你自己的伺服器",
+ "devicesPage.group.phones": "手機",
+ "devicesPage.detail.kind": "類型",
+ "devicesPage.detail.reaches": "連線方式",
+ "devicesPage.detail.address": "位址",
+ "devicesPage.detail.version": "版本",
+ "devicesPage.detail.lastSeen": "上次活動",
+ "devicesPage.detail.bots": "機器人",
+ "devicesPage.detail.runsBots": "有自己的機器人",
+ "devicesPage.detail.hostsComputer": "機器人可以在上面工作",
+ "devicesPage.detail.reachesBots": "與這裡的機器人通訊",
+ "devicesPage.action.copyUpdate": "複製更新指令",
+ "devicesPage.action.manage": "管理",
+ "devicesPage.action.removeApps": "移除它的應用程式",
+ "devicesPage.action.signOut": "將其登出",
+ "devicesPage.network.title": "私人網路",
+ "devicesPage.network.setUp": "設定",
+ "devicesPage.network.share": "讓你的電腦加入",
+ "devicesPage.network.addComputer": "新增電腦",
+ "devicesPage.network.short.unknown": "未設定",
+ "devicesPage.network.short.notInstalled": "未安裝",
+ "devicesPage.network.short.noCli": "需要命令列工具",
+ "devicesPage.network.short.signedOut": "已登出",
+ "devicesPage.network.short.notRunning": "未執行",
+ "devicesPage.network.short.needsApproval": "等待核准",
+ "devicesPage.network.short.needsPermission": "需要權限",
+ "devicesPage.network.short.magicdns": "需要 MagicDNS",
+ "devicesPage.network.short.ready": "已開啟",
+ "devicesPage.network.line.unknown": "Tailscale 能私密地連線你的電腦,不論它們在哪裡。在這裡設定一次即可。",
+ "devicesPage.network.line.notInstalled": "在這台電腦上安裝 Tailscale 並登入。你回到此頁面時,它會重新檢查。",
+ "devicesPage.network.line.ready": "已以 {name} 加入。你在 Tailscale 上的其他電腦可以連線到這裡。",
+ "devicesPage.network.line.notShared": "已以 {name} 加入。允許你在 Tailscale 上的其他電腦連線到這裡。",
+ "devicesPage.add.phone": "手機",
+ "devicesPage.add.phoneLine": "用 {app} 應用程式掃描 QR 碼",
+ "devicesPage.add.computer": "電腦",
+ "devicesPage.add.computerLine": "裝有此應用程式的筆電、桌機或 Mac mini",
+ "devicesPage.add.server": "你自己的伺服器",
+ "devicesPage.add.serverLine": "你租用的機器,或在家中一直開著的機器",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "永遠在線,由我們為你運作",
+ "devicesPage.addFlow.adminOnly": "只有管理員可以在這裡新增裝置。",
+ "devicesPage.addFlow.computerCloud": "在另一台電腦上安裝 {app},並用同一個帳戶登入。它會自動開啟 Cloud。",
+ "devicesPage.addFlow.computerInstall": "在另一台電腦上安裝 {app}。",
+ "devicesPage.addFlow.computerNeeds": "另一台電腦需要安裝 {app} 和 Tailscale,並登入同一個 Tailscale 帳戶。",
+ "devicesPage.addFlow.computerPaste": "在那裡選擇 +,然後選擇「連線到伺服器」,並貼上此連結。",
+ "devicesPage.addFlow.connected": "{name} 已連線",
+ "devicesPage.addFlow.waiting": "正在等待連線…",
+ "devicesPage.addFlow.networkFirst": "首先,設定私人網路",
+ "devicesPage.addFlow.pasteLink": "貼上它顯示的連結",
+ "devicesPage.addFlow.serverAnywhere": "可從任何地方連線",
+ "devicesPage.addFlow.serverTailscale": "在你的私人網路上(Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "在那台機器上執行以下任一指令。它需要 Node 24,並會輸出一個連結讓你貼到這裡。",
+ "devicesPage.addFlow.serverDesktop": "在 {app} 應用程式中選擇 +,然後選擇「連線到伺服器」,貼上它輸出的連結。",
"settings.people.activityIn": "活動在「資料」中。",
"settings.people.members": "成員",
"settings.place.alwaysOn": "一直在線",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 57aca8af4d..6c833730a2 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -8202,6 +8202,89 @@
"settings.page.overview": "总览",
"settings.page.plan": "方案和账单",
"settings.page.spending": "花费",
+ "settings.page.devices": "设备",
+ "devicesPage.add": "添加设备",
+ "devicesPage.mapLabel": "你的设备及其连接方式",
+ "devicesPage.empty": "还没有其他设备连接。添加一部手机、一台电脑或你自己的服务器。",
+ "devicesPage.status.here": "你在这里",
+ "devicesPage.status.online": "在线",
+ "devicesPage.status.offline": "离线",
+ "devicesPage.status.seen": "最近活动 {when}",
+ "devicesPage.status.ssh": "机器人可在其上工作",
+ "devicesPage.status.unknown": "未检查",
+ "devicesPage.note.update": "请更新",
+ "devicesPage.note.signedOut": "请重新配对",
+ "devicesPage.note.insecure": "需要安全的地址",
+ "devicesPage.note.unreachable": "无法连接",
+ "devicesPage.note.reconnecting": "正在重新连接…",
+ "devicesPage.route.here": "本机",
+ "devicesPage.route.local": "同一网络",
+ "devicesPage.route.tailscale": "私有网络",
+ "devicesPage.route.relay": "通过 {app}",
+ "devicesPage.route.cloud": "{app} Cloud",
+ "devicesPage.route.internet": "互联网",
+ "devicesPage.route.paired": "已登录",
+ "devicesPage.route.ssh": "SSH",
+ "devicesPage.kind.laptop": "电脑",
+ "devicesPage.kind.desktop": "台式电脑",
+ "devicesPage.kind.server": "你自己的服务器",
+ "devicesPage.kind.cloud": "Cloud",
+ "devicesPage.kind.phone": "手机",
+ "devicesPage.kind.vm": "机器人的电脑",
+ "devicesPage.group.computers": "电脑",
+ "devicesPage.group.servers": "Cloud 和你自己的服务器",
+ "devicesPage.group.phones": "手机",
+ "devicesPage.detail.kind": "类型",
+ "devicesPage.detail.reaches": "连接方式",
+ "devicesPage.detail.address": "地址",
+ "devicesPage.detail.version": "版本",
+ "devicesPage.detail.lastSeen": "上次活动",
+ "devicesPage.detail.bots": "机器人",
+ "devicesPage.detail.runsBots": "有自己的机器人",
+ "devicesPage.detail.hostsComputer": "机器人可以在上面工作",
+ "devicesPage.detail.reachesBots": "与这里的机器人通信",
+ "devicesPage.action.copyUpdate": "复制更新命令",
+ "devicesPage.action.manage": "管理",
+ "devicesPage.action.removeApps": "移除它的应用",
+ "devicesPage.action.signOut": "将其退出登录",
+ "devicesPage.network.title": "私有网络",
+ "devicesPage.network.setUp": "设置",
+ "devicesPage.network.share": "让你的电脑接入",
+ "devicesPage.network.addComputer": "添加电脑",
+ "devicesPage.network.short.unknown": "未设置",
+ "devicesPage.network.short.notInstalled": "未安装",
+ "devicesPage.network.short.noCli": "需要命令行工具",
+ "devicesPage.network.short.signedOut": "已退出登录",
+ "devicesPage.network.short.notRunning": "未运行",
+ "devicesPage.network.short.needsApproval": "等待批准",
+ "devicesPage.network.short.needsPermission": "需要权限",
+ "devicesPage.network.short.magicdns": "需要 MagicDNS",
+ "devicesPage.network.short.ready": "已开启",
+ "devicesPage.network.line.unknown": "Tailscale 可以私密地连接你的电脑,无论它们在哪里。在这里设置一次即可。",
+ "devicesPage.network.line.notInstalled": "在这台电脑上安装 Tailscale 并登录。你回到此页面时,它会重新检查。",
+ "devicesPage.network.line.ready": "已以 {name} 加入。你在 Tailscale 上的其他电脑可以连接到这里。",
+ "devicesPage.network.line.notShared": "已以 {name} 加入。允许你在 Tailscale 上的其他电脑连接到这里。",
+ "devicesPage.add.phone": "手机",
+ "devicesPage.add.phoneLine": "用 {app} 应用扫描二维码",
+ "devicesPage.add.computer": "电脑",
+ "devicesPage.add.computerLine": "装有此应用的笔记本、台式机或 Mac mini",
+ "devicesPage.add.server": "你自己的服务器",
+ "devicesPage.add.serverLine": "你租用的机器,或在家中一直开着的机器",
+ "devicesPage.add.cloud": "Cloud",
+ "devicesPage.add.cloudLine": "始终在线,由我们为你运行",
+ "devicesPage.addFlow.adminOnly": "只有管理员可以在这里添加设备。",
+ "devicesPage.addFlow.computerCloud": "在另一台电脑上安装 {app},并用同一账户登录。它会自动打开 Cloud。",
+ "devicesPage.addFlow.computerInstall": "在另一台电脑上安装 {app}。",
+ "devicesPage.addFlow.computerNeeds": "另一台电脑需要安装 {app} 和 Tailscale,并登录同一个 Tailscale 账户。",
+ "devicesPage.addFlow.computerPaste": "在那里选择 +,然后选择「连接到服务器」,并粘贴此链接。",
+ "devicesPage.addFlow.connected": "{name} 已连接",
+ "devicesPage.addFlow.waiting": "正在等待连接…",
+ "devicesPage.addFlow.networkFirst": "首先,设置私有网络",
+ "devicesPage.addFlow.pasteLink": "粘贴它显示的链接",
+ "devicesPage.addFlow.serverAnywhere": "可从任何地方访问",
+ "devicesPage.addFlow.serverTailscale": "在你的私有网络上(Tailscale)",
+ "devicesPage.addFlow.serverNeeds": "在那台机器上运行以下任一命令。它需要 Node 24,并会输出一个链接供你粘贴到这里。",
+ "devicesPage.addFlow.serverDesktop": "在 {app} 应用中选择 +,然后选择「连接到服务器」,粘贴它输出的链接。",
"settings.people.activityIn": "活动在「数据」里。",
"settings.people.members": "成员",
"settings.place.alwaysOn": "一直在线",
diff --git a/src/state/store.tsx b/src/state/store.tsx
index c025413e49..99892ac85d 100644
--- a/src/state/store.tsx
+++ b/src/state/store.tsx
@@ -469,7 +469,7 @@ export type AppSettingsSection = SettingsPageId
| "desktopWorkspaces" | "organization" | "cloudAccount" | "experimental" | "connections" | "decisionModel" | "imageGeneration"
| "engines" | "companion" | "remote" | "computer" | "logins" | "botAccess" | "activity" | "backups" | "workspaces"
| "skills" | "import" | "updates";
-export type SettingsPageId = "overview" | "phone" | "ai" | "bots" | "desktops" | "vault" | "usage" | "transfer" | "data" | "people"
+export type SettingsPageId = "overview" | "devices" | "phone" | "ai" | "bots" | "desktops" | "vault" | "usage" | "transfer" | "data" | "people"
| "installations" | "account" | "plan" | "app" | "general" | "appearance";
export type BotSettingsSection =