Skip to content

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

Let people name the computer their phone pairs with (#4233)

Aditya Umaled3c680df989e
diff --git a/companion/README.md b/companion/README.md
index 2045232573..06ec47f1b8 100644
--- a/companion/README.md
+++ b/companion/README.md
@@ -125,10 +125,11 @@ it is switched on, so the opt-in is never implicit.
| `OMB_COMPANION_NAME` | your name, from the harness | what the phone calls this computer |
`OMB_COMPANION_NAME` overrides a name the sidecar otherwise asks the harness
-for at startup — the profile from onboarding, as *"Ada's computer"*. It falls
-back to `OpenMausBot` when the harness is not up or has no profile. Read once
-and cached: the name goes into the Bonjour record, and re-advertising under a
-new one later would show the phone two computers.
+for: the computer name set in Settings → Remote access, else the profile from
+onboarding, as *"Ada's computer"*. It falls back to `OpenMausBot` when neither
+is set. The sidecar asks again every 30 seconds; a changed name withdraws the
+old Bonjour record (a goodbye) before advertising the new one, so the phone
+does not see two computers.
The harness owns two ports, not one: itself, and a webhook receiver one above
it (`OMB_WEBHOOK_PORT`). The companion refuses to start on either and says
diff --git a/companion/src/advertise-watch.ts b/companion/src/advertise-watch.ts
index 65aad04e30..b1a6d65c3b 100644
--- a/companion/src/advertise-watch.ts
+++ b/companion/src/advertise-watch.ts
@@ -3,6 +3,8 @@
// re-announcing happens exactly on transitions.
export interface AddressWatchOptions {
addresses: () => string[];
+ /** The advertised name: a rename re-advertises like an address change. */
+ name?: () => string;
/** Resolves false when the responder could not start (port 5353 busy,
* multicast off): a condition, never an error. */
advertise: () => Promise<boolean>;
@@ -35,7 +37,7 @@ export function createAddressWatcher(options: AddressWatchOptions): AddressWatch
// must not start a second.
if (inflight) return;
const current = [...options.addresses()].sort();
- const key = current.join(",");
+ const key = `${options.name?.() ?? ""}\n${current.join(",")}`;
if (key === known) return;
inflight = true;
try {
diff --git a/companion/src/index.ts b/companion/src/index.ts
index af7f440e28..e50749eaa2 100755
--- a/companion/src/index.ts
+++ b/companion/src/index.ts
@@ -26,6 +26,7 @@ import { createProxyHandler } from "./proxy.ts";
import { companionOriginSocket, listenCompanionOrigin } from "./origin.ts";
import { gzipTunnelReplies } from "./tunnel-gzip.ts";
import { normalizedPhoneSecretPublicKey } from "./phone-secret-key.ts";
+import { machineNameFromConfig } from "./machine-name.ts";
// Only Electron supplies this port; Electron children fail closed until initialized.
const parentPort = (process as NodeJS.Process & {
@@ -77,26 +78,33 @@ const conflict = (name: string, port: number): string | null => {
return owner ? `${name} is set to port ${port}, which is ${owner}` : null;
};
-/** OMB_COMPANION_NAME wins; otherwise the harness's profile name, read once at
- * startup. Failures fall back: no part of pairing depends on the name. */
-let cachedName = process.env.OMB_COMPANION_NAME?.trim() || "";
+/** OMB_COMPANION_NAME wins; otherwise the name set in Settings or the owner's profile name, re-read every 30
+ * seconds so a rename, or a harness that answered late, reaches the phone. Failures keep the last name. */
+const fixedName = process.env.OMB_COMPANION_NAME?.trim() || "";
+let cachedName = fixedName;
const machineName = (): string => cachedName || "OpenMausBot";
-async function refreshMachineName(): Promise<void> {
- if (cachedName) return;
+/** True when the name changed. */
+async function refreshMachineName(): Promise<boolean> {
+ if (fixedName) return false;
try {
const res = await fetch(`http://127.0.0.1:${HARNESS_PORT}/api/config`, {
signal: AbortSignal.timeout(3000),
});
- if (!res.ok) return;
- const config = (await res.json()) as { profile?: { name?: string } };
- const owner = config.profile?.name?.trim();
- if (owner) cachedName = `${owner}'s computer`;
+ if (!res.ok) return false;
+ const next = machineNameFromConfig(await res.json());
+ if (next === cachedName) return false;
+ cachedName = next;
+ return true;
} catch {
+ return false;
}
}
+let nameTimer: ReturnType<typeof setInterval> | null = null;
+let stopping = false;
+
const devices = new DeviceRegistry();
const mdns = new MdnsResponder();
@@ -104,6 +112,7 @@ const mdns = new MdnsResponder();
* when it goes. */
const watcher = createAddressWatcher({
addresses: advertisableAddresses,
+ name: machineName,
advertise: () => mdns.advertise(service()),
withdraw: () => mdns.stop(),
log: (line) => console.log(`bonjour: ${line}`),
@@ -209,7 +218,7 @@ async function main(): Promise<void> {
await listenCompanionOrigin(managedOrigin, PRIVATE_ORIGIN);
}
- // Before advertising: renaming later would show the phone two computers.
+ // Before advertising, so the first record already carries the name; a later rename withdraws the old one.
await refreshMachineName();
const tailscaleTried: string[] = [];
@@ -219,6 +228,9 @@ async function main(): Promise<void> {
// under a running sidecar. Discovery failing is never fatal.
await watcher.check();
watcher.start();
+ // A rename in Settings reaches the phone within one tick: the watcher re-advertises when the name moves.
+ nameTimer = setInterval(() => void refreshMachineName().then((changed) => (changed && !stopping ? watcher.check() : undefined)), 30_000);
+ nameTimer.unref?.();
const addresses = lanAddresses();
const tailscale = tailscaleAddress(addresses);
@@ -234,8 +246,10 @@ async function main(): Promise<void> {
const shutdown = async (signal: string): Promise<void> => {
console.log(`\n${signal} — stopping`);
- // The watcher first, or a tick could re-advertise the withdrawn record.
+ // The watcher first, or a tick (or a name refresh already in flight) could re-advertise the withdrawn record.
+ stopping = true;
watcher.stop();
+ if (nameTimer) clearInterval(nameTimer);
await mdns.stop().catch(() => {});
// close() waits for open connections, and an SSE stream never ends on its own.
proxy.closeViewers();
diff --git a/companion/src/machine-name.ts b/companion/src/machine-name.ts
new file mode 100644
index 0000000000..f8c64d6ac2
--- /dev/null
+++ b/companion/src/machine-name.ts
@@ -0,0 +1,9 @@
+/** What the phone calls this computer, read from the harness's /api/config: the name set in Settings, else the
+ * owner's profile name. Empty when neither is set; the caller then uses its default. */
+export function machineNameFromConfig(config: unknown): string {
+ const read = (config ?? {}) as { computerName?: unknown; profile?: { name?: unknown } };
+ const own = typeof read.computerName === "string" ? read.computerName.trim() : "";
+ if (own) return own;
+ const owner = typeof read.profile?.name === "string" ? read.profile.name.trim() : "";
+ return owner ? `${owner}'s computer` : "";
+}
diff --git a/companion/src/mdns.ts b/companion/src/mdns.ts
index 90dce9de9b..c74171c73c 100644
--- a/companion/src/mdns.ts
+++ b/companion/src/mdns.ts
@@ -386,6 +386,8 @@ export class MdnsResponder {
private service: ServiceInfo | null = null;
private timers: ReturnType<typeof setTimeout>[] = [];
private sendQueue: Promise<void> = Promise.resolve();
+ /** Bumped by every stop(), so a bind still in flight knows it was cancelled. */
+ private stops = 0;
private readonly port: number;
private readonly multicast: boolean;
private readonly socketFactory: () => ResponderSocket;
@@ -411,7 +413,10 @@ export class MdnsResponder {
/** Resolves false when mDNS could not start, which is never fatal: pairing
* by typed address still works. */
async advertise(service: ServiceInfo): Promise<boolean> {
- await this.stop();
+ // stop() counts itself before its goodbye wait, so a shutdown during that wait is still seen below.
+ const stopping = this.stop();
+ const stops = this.stops;
+ await stopping;
if (!service.addresses.length) return false;
const socket = this.socketFactory();
@@ -431,6 +436,14 @@ export class MdnsResponder {
}
return false;
}
+ // stop() ran while the bind was pending: it found no socket to close, so close this one.
+ if (stops !== this.stops) {
+ try {
+ socket.close();
+ } catch {
+ }
+ return false;
+ }
if (this.multicast) {
try {
@@ -468,6 +481,7 @@ export class MdnsResponder {
/** Sends a goodbye so the records don't sit in caches for 75 minutes
* (RFC 6762 §10.1). */
async stop(): Promise<void> {
+ this.stops += 1;
for (const timer of this.timers.splice(0)) clearTimeout(timer);
const socket = this.socket;
const service = this.service;
diff --git a/companion/test/advertise-watch.test.ts b/companion/test/advertise-watch.test.ts
index 512e4c3ccb..cd481cdcef 100644
--- a/companion/test/advertise-watch.test.ts
+++ b/companion/test/advertise-watch.test.ts
@@ -130,4 +130,14 @@ describe("address watcher", () => {
await Promise.all([first, second]);
expect(advertises).toBe(1);
});
+
+ it("re-advertises when the computer is renamed", async () => {
+ let name = "OpenMausBot";
+ const { watcher, calls } = rig(["192.168.1.42"], { name: () => name });
+ await watcher.check();
+ await watcher.check();
+ name = "AdamPC";
+ await watcher.check();
+ expect(calls).toEqual(["advertise 192.168.1.42", "advertise 192.168.1.42"]);
+ });
});
diff --git a/companion/test/machine-name.test.ts b/companion/test/machine-name.test.ts
new file mode 100644
index 0000000000..f525e3218a
--- /dev/null
+++ b/companion/test/machine-name.test.ts
@@ -0,0 +1,20 @@
+import { describe, expect, it } from "vitest";
+
+import { machineNameFromConfig } from "../src/machine-name.ts";
+
+describe("machine name", () => {
+ it("uses the name set in Settings over the profile name", () => {
+ expect(machineNameFromConfig({ computerName: " AdamPC ", profile: { name: "Adam" } })).toBe("AdamPC");
+ });
+
+ it("falls back to the owner's profile name", () => {
+ expect(machineNameFromConfig({ computerName: "", profile: { name: "Adam" } })).toBe("Adam's computer");
+ expect(machineNameFromConfig({ profile: { name: "Adam" } })).toBe("Adam's computer");
+ });
+
+ it("is empty when neither is set or the reply is not a config", () => {
+ expect(machineNameFromConfig({ computerName: " ", profile: { name: "" } })).toBe("");
+ expect(machineNameFromConfig(null)).toBe("");
+ expect(machineNameFromConfig({ computerName: 7, profile: { name: ["x"] } })).toBe("");
+ });
+});
diff --git a/companion/test/mdns.test.ts b/companion/test/mdns.test.ts
index ee4cc01b8d..4e2215d5c2 100644
--- a/companion/test/mdns.test.ts
+++ b/companion/test/mdns.test.ts
@@ -675,3 +675,49 @@ describe("clampBytes", () => {
expect(clampBytes("\u{1F600}", 3)).toBe("");
});
});
+
+describe("stop while an advertisement is still binding", () => {
+ it("never publishes once stop() has returned", async () => {
+ const socket = new FakeSocket();
+ let bound: (() => void) | undefined;
+ let closed = false;
+ socket.bind = (_port: number, callback?: () => void) => {
+ bound = callback;
+ };
+ socket.close = (callback?: () => void) => {
+ closed = true;
+ callback?.();
+ };
+ const responder = new MdnsResponder({ socketFactory: () => socket });
+ const advertised = responder.advertise(service);
+ await drained();
+ expect(bound).toBeDefined();
+ await responder.stop();
+ bound?.();
+ expect(await advertised).toBe(false);
+ await drained();
+ expect(socket.packets).toHaveLength(0);
+ expect(responder.advertising).toBe(false);
+ expect(closed).toBe(true);
+ });
+
+ it("never publishes when stop() runs during a re-advertisement's goodbye wait", async () => {
+ const first = new FakeSocket();
+ const second = new FakeSocket();
+ const sockets = [first, second];
+ const responder = new MdnsResponder({ socketFactory: () => sockets.shift()! });
+ expect(await responder.advertise(service)).toBe(true);
+ await drained();
+ const held: Array<() => void> = [];
+ first.send = (_packet: Buffer, _port: number, _address: string, callback?: (error: Error | null) => void) => {
+ held.push(() => callback?.(null));
+ };
+ const readvertised = responder.advertise(service);
+ await responder.stop();
+ for (const release of held.splice(0)) release();
+ expect(await readvertised).toBe(false);
+ await drained();
+ expect(second.packets).toHaveLength(0);
+ expect(responder.advertising).toBe(false);
+ });
+});
diff --git a/server/config.test.ts b/server/config.test.ts
index c73bbfbc00..472d2af358 100644
--- a/server/config.test.ts
+++ b/server/config.test.ts
@@ -1541,6 +1541,15 @@ describe("credential env preference", () => {
expect(loadConfig()).toMatchObject({ customDomain: "", language: "en", profile: { name: "Workspace owner" } });
});
+ it("saves, trims and clears the computer name a paired phone shows", () => {
+ expect(parseConfigPatch({ computerName: " AdamPC " })).toEqual({ computerName: "AdamPC" });
+ expect(() => parseConfigPatch({ computerName: "x".repeat(64) })).toThrow();
+ saveConfig({ profile: { name: "Workspace owner" }, computerName: "AdamPC" });
+ expect(loadConfig()).toMatchObject({ computerName: "AdamPC", profile: { name: "Workspace owner" } });
+ saveConfig({ computerName: "" });
+ expect(loadConfig()).toMatchObject({ computerName: "", profile: { name: "Workspace owner" } });
+ });
+
it("merges onboarding progress like any other section", () => {
saveConfig({ onboarding: { completedAt: "2026-09-09T10:00:00.000Z", version: 1 } });
saveConfig({ onboarding: { hintsSeen: ["computer"] } });
diff --git a/server/config.ts b/server/config.ts
index fba9df31df..649d98acd5 100644
--- a/server/config.ts
+++ b/server/config.ts
@@ -423,8 +423,8 @@ const appConfigSchema = z.object({
}).optional(),
/** Non-secret profile details; aboutMe is shared with every bot. */
profile: z.object({ name: optionalText, email: optionalText, aboutMe: z.string().max(24_000).optional(), avatarUrl: z.union([z.literal(""), botAvatarUrlSchema]).optional() }).optional(),
- /** UI language override (BCP-47, lowercase); absent follows the system. */
- language: optionalText,
+ /** UI language override (BCP-47, lowercase), absent follows the system; what a paired phone calls this computer, "" for the default. */
+ language: optionalText, computerName: z.string().trim().max(63).optional(),
rooms: roomConfigSchema.optional(),
mcp: mcpConfigSchema.optional(),
context: z.object({
@@ -483,7 +483,7 @@ export interface AppConfig extends HelperConfig {
phone?: "ios" | "android";
};
mcpServers?: Record<string, unknown>;
- language?: string;
+ language?: string; computerName?: string;
xai?: { key?: string; url?: string };
mistral?: { key?: string };
cerebras?: { key?: string }; treg?: { key?: string }; /** Postiz: an organisation API key and the server it belongs to (blank: Postiz Cloud). */ postiz?: { key?: string; url?: string };
@@ -960,7 +960,7 @@ export function saveConfig(
disk[key] = merged;
}
if (checkedPatch.vps !== undefined) disk.vps = normalizeVpsConfig(checkedPatch.vps);
- if (checkedPatch.language !== undefined) disk.language = checkedPatch.language;
+ for (const key of ["language", "computerName"] as const) if (checkedPatch[key] !== undefined) disk[key] = checkedPatch[key];
if (checkedPatch.customDomain !== undefined) disk.customDomain = checkedPatch.customDomain;
if (checkedPatch.signIn !== undefined) disk.signIn = checkedPatch.signIn;
// Replace the section so clearing a backup cannot revive the old selection.
diff --git a/server/index.ts b/server/index.ts
index 8854998a21..ba3f50c352 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -11905,7 +11905,7 @@ function configStatus() {
profile: CLOUD_TEAM ? NOBODY_PROFILE : { name: cfg.profile?.name ?? "", email: cfg.profile?.email ?? "", aboutMe: cfg.profile?.aboutMe ?? "", ...(cfg.profile?.avatarUrl ? { avatarUrl: cfg.profile.avatarUrl } : {}) },
managedPolicy: managedPolicy.summary(),
...(CLOUD_HOME ? { cloudHome: true } : {}), ...(CLOUD_TEAM ? { team: { id: CLOUD_TEAM.id, name: CLOUD_TEAM.name, ...(CLOUD_HOME ? { cloudPage: `${CLOUD_HOME.adminOrigin}/cloud` } : {}) } } : {}),
- language: appLanguage() ?? "",
+ language: appLanguage() ?? "", computerName: cfg.computerName ?? "",
rooms: { turnTimeoutMinutes: roomTurnTimeoutMinutes(cfg) },
mcp: { callTimeoutMinutes: mcpCallTimeoutMinutes(cfg) },
automaticRecovery: cfg.automaticRecovery ?? { enabled: false },
@@ -12842,7 +12842,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
createdAt: paired.session.createdAt,
lastSeenAt: paired.session.lastSeenAt,
},
- serverName: environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED }).label,
+ serverName: cfg.computerName || environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED }).label,
});
}
const gate = resolveRequestAuth(req, {
@@ -12954,7 +12954,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
const base = publicUrl() ?? (auth.kind === "session" && origin ? origin : null);
const code = formatPairingCode(opened.code);
// `inviteUrl` is the custom scheme the native companion scanners accept; they cannot take a typed code.
- const serverName = environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED }).label;
+ const serverName = cfg.computerName || environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED }).label;
const invite = base ? phonePairingLink({ address: base, token: opened.credential, name: serverName }) : null;
return json(res, 200, {
id: opened.id,
diff --git a/src/components/ComputerNameRow.tsx b/src/components/ComputerNameRow.tsx
new file mode 100644
index 0000000000..f6d3f4bb73
--- /dev/null
+++ b/src/components/ComputerNameRow.tsx
@@ -0,0 +1,40 @@
+import { useEffect, useState } from "react";
+
+import { t } from "@/lib/i18n";
+import { cn } from "@/lib/cn";
+import { api, type ConfigStatus } from "@/state/store";
+
+/** What a paired phone calls this computer; empty keeps the default. Saved when the field loses focus or on Enter. */
+export function ComputerNameRow({ saved, onSaved, className }: { saved: string; onSaved: (name: string) => void; className?: string }) {
+ const [draft, setDraft] = useState(saved);
+ const [saving, setSaving] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ useEffect(() => setDraft(saved), [saved]);
+
+ async function save() {
+ const next = draft.trim();
+ if (saving || next === saved) return;
+ setSaving(true);
+ setError(null);
+ try {
+ const config: ConfigStatus = await api("/api/config", { method: "PATCH", body: JSON.stringify({ computerName: next }) });
+ onSaved(config.computerName ?? next);
+ } catch (e) {
+ setError(t("remote.computerName.error", { error: e instanceof Error ? e.message : String(e) }));
+ } finally {
+ setSaving(false);
+ }
+ }
+
+ return (
+ <div data-computer-name className={cn("flex flex-col gap-1", className)}>
+ <label htmlFor="computer-name" className="text-[13px] font-medium text-ink">{t("remote.computerName.title")}</label>
+ <input id="computer-name" value={draft} disabled={saving} placeholder={t("remote.computerName.placeholder")}
+ aria-describedby="computer-name-help" onChange={(event) => setDraft(event.target.value)} onBlur={() => void save()}
+ onKeyDown={(event) => { if (event.key === "Enter") event.currentTarget.blur(); }}
+ className="w-full max-w-xs rounded-lg border border-hairline/40 bg-inset px-3 py-2 text-[13px] text-ink placeholder:text-ink-secondary focus:outline-none" />
+ <p id="computer-name-help" className="text-[12px] leading-4 text-ink-secondary">{t("remote.computerName.help")}</p>
+ {error ? <p role="alert" className="text-[12px] leading-4 text-danger">{error}</p> : null}
+ </div>
+ );
+}
diff --git a/src/components/ServerPairingCard.tsx b/src/components/ServerPairingCard.tsx
index cbc130368d..86bf0dacbb 100644
--- a/src/components/ServerPairingCard.tsx
+++ b/src/components/ServerPairingCard.tsx
@@ -12,6 +12,7 @@ import { Card, SettingRow, SIMPLE_CARD } from "./SettingsPrimitives";
import { Select } from "./Select";
import { cn } from "@/lib/cn";
import { TeamPhoneCard } from "./TeamPhoneCard";
+import { ComputerNameRow } from "./ComputerNameRow";
export interface PairingOffer {
id: string;
@@ -52,6 +53,7 @@ const quiet = "ui-button";
export function ServerPairingCard({ initialSession = null, initialPairingCodes = true, cloudHome = false, focusRequest = 0, team, teamPhoneBlocked = null, simple = false }: { initialSession?: SessionState | null; initialPairingCodes?: boolean; cloudHome?: boolean; focusRequest?: number; team?: string; teamPhoneBlocked?: string | null; simple?: boolean }) {
const [session, setSession] = useState<SessionState | null>(initialSession);
const [pairingCodes, setPairingCodes] = useState(initialPairingCodes);
+ const [computerName, setComputerName] = useState<string | null>(null);
const [scope, setScope] = useState<"admin" | "client">("admin");
const [offer, setOffer] = useState<PairingOffer | null>(null);
const [devices, setDevices] = useState<PairedDevice[]>([]);
@@ -78,7 +80,10 @@ export function ServerPairingCard({ initialSession = null, initialPairingCodes =
setSession(state);
if (canPairDevices(state)) void loadDevices();
if (state.kind === "loopback" || state.kind === "session") {
- void api("/api/config").then((config) => setPairingCodes(readMembership(config).pairingCodes)).catch(() => {});
+ void api("/api/config").then((config) => {
+ setPairingCodes(readMembership(config).pairingCodes);
+ if (canPairDevices(state)) setComputerName(typeof config?.computerName === "string" ? config.computerName : "");
+ }).catch(() => {});
}
});
}, []);
@@ -174,12 +179,16 @@ export function ServerPairingCard({ initialSession = null, initialPairingCodes =
)}
</div>
) : null;
+ // Loaded with the config; a personal cloud has no computer of its own to name.
+ const nameRow = (className: string) => pairingCodes && !cloudHome && computerName !== null
+ ? <ComputerNameRow saved={computerName} onSaved={setComputerName} className={className} /> : null;
const scopeName = (device: PairedDevice) => t(device.scopes.includes("admin") ? "remote.serverPairing.scope.admin" : "remote.serverPairing.scope.client");
if (simple) {
return (
<div ref={root} tabIndex={-1} data-phone-pairing="server" className="flex scroll-mt-4 flex-col gap-1.5 focus:outline-none">
<div data-settings-rows="" className={cn(SIMPLE_CARD, "flex flex-col")}>
+ {nameRow("px-4 py-2.5")}
<SettingRow title={t("settings.simple.computer.pair")} subtitle={pairingCodes ? cloudHome ? t("remote.serverPairing.cloudPersonal") : undefined : t("remote.serverPairing.portal")}>
{pairingCodes ? (
<div className="flex items-center gap-2">
@@ -222,6 +231,7 @@ export function ServerPairingCard({ initialSession = null, initialPairingCodes =
<div ref={root} tabIndex={-1} data-phone-pairing="server" className="scroll-mt-4 rounded-xl focus:outline-none">
<Card title={t("remote.serverPairing.title")} subtitle={t(pairingCodes ? "remote.serverPairing.subtitle" : "remote.serverPairing.portalSubtitle")}>
{pairingCodes && cloudHome ? <p data-server-pairing-personal className="mt-3 text-[13px] text-ink-secondary">{t("remote.serverPairing.cloudPersonal")}</p> : null}
+ {nameRow("mt-3")}
{pairingCodes ? <div className="mt-3 flex flex-wrap items-center gap-3">
{cloudHome ? null : <>
<label className="flex items-center gap-1.5 text-[13px] text-ink">
diff --git a/src/locales/en.json b/src/locales/en.json
index 16b2cc5ebf..4e278b6334 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -5616,6 +5616,10 @@
"remote.serverPairing.hoursAgo": "{hours} h ago",
"remote.serverPairing.daysAgo": "{days} d ago",
"remote.serverPairing.error": "Couldn't connect: {error}",
+ "remote.computerName.title": "This computer's name",
+ "remote.computerName.help": "What your phone calls this computer. Leave it empty to use the default.",
+ "remote.computerName.placeholder": "e.g. Office PC",
+ "remote.computerName.error": "Couldn't save the name: {error}",
"remote.serverPairing.portalSubtitle": "Browsers and devices signed in to this installation.",
"remote.serverPairing.portal": "People sign in to this installation through your organization's Admin, so pairing codes are turned off. To add someone, invite them in your organization's Admin.",
"remote.serverPairing.portalChatOnly": "You signed in through your organization's Admin. To use this installation on another device, sign in there the same way.",
diff --git a/src/state/config-status.ts b/src/state/config-status.ts
index 337c057f67..c30feaad88 100644
--- a/src/state/config-status.ts
+++ b/src/state/config-status.ts
@@ -119,6 +119,8 @@ export interface ConfigStatus {
profile?: { name: string; email: string; aboutMe?: string; avatarUrl?: string };
/** UI language override; "" (or absent) follows the system language. */
language?: string;
+ /** What a paired phone calls this computer; "" uses the default. */
+ computerName?: string;
/** Opt-in flags. Absent means off. */
features?: { skillAuthoring: boolean; skillReview?: boolean; skillReviewSteps?: number; showToolCalls?: boolean; browser?: boolean; sharedComputers?: boolean; claudeUserMcp?: boolean; llmThreadTitles?: boolean; skillsLibrary?: boolean; shareLearnedSkills?: "off" | "ask" | "auto"; roomMemoryCapture?: boolean; savedSteps?: boolean; savedStepsHere?: boolean };
/** First-run progress: whether the welcome tour was finished and which