Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(society): a subscription seat needs proof of a login before the creator lists it

rubenluetke10-beepb545730b1af9
diff --git a/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx b/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx
index 9cfe8a7aec..11e77362d0 100644
--- a/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx
@@ -160,7 +160,12 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialo
const seats = useMemo<BrainSeat[]>(() => {
const providers = catalog.data?.providers ?? [];
if (!providers.length || !connections.data || !societyProviders.data || !keylessModels.data) return [];
- return brainSeats(joinProviderOptions(providers, connections.data), societyProviders.data, liveModels);
+ return brainSeats(
+ joinProviderOptions(providers, connections.data),
+ societyProviders.data,
+ liveModels,
+ new Set(connections.data.map((c) => c.jarvis)),
+ );
}, [catalog.data, connections.data, societyProviders.data, keylessModels.data, liveModels]);
const seat = seats.find((s) => s.provider.id === providerId) ?? null;
const accounts = accountChoice(seat);
diff --git a/jarvis/ui/web/frontend/src/components/society/create/brainPicker.test.ts b/jarvis/ui/web/frontend/src/components/society/create/brainPicker.test.ts
index a3cfef0104..c9f663710f 100644
--- a/jarvis/ui/web/frontend/src/components/society/create/brainPicker.test.ts
+++ b/jarvis/ui/web/frontend/src/components/society/create/brainPicker.test.ts
@@ -89,10 +89,28 @@ describe("brainSeats", () => {
const seats = brainSeats(
[option({ id: "openai-codex", label: "Codex", runner: "codex-cli", cli_installed: true })],
[],
+ {},
+ new Set(["openai-codex"]),
);
expect(seats[0].kind).toBe("subscription");
});
+ it("lists a subscription seat only with a signed-in account or an Agents-tab card", () => {
+ const rows = [
+ option({ id: "opencode", label: "OpenCode", runner: "opencode-cli", cli_installed: true }),
+ option({ id: "openai-codex", label: "Codex", runner: "codex-cli", cli_installed: true }),
+ option({ id: "grok-build", label: "Grok Build", runner: "grok-cli", cli_installed: true }),
+ ];
+ const society = [
+ societyRow({ id: "grok-build", runner: "grok-cli", subscription: true, platform: "grok", accounts: [account("g")] }),
+ ];
+ // Installed but unreadable and uncarded: not offered here.
+ expect(brainSeats(rows, society, {}, new Set(["openai-codex"])).map((s) => s.provider.id)).toEqual([
+ "openai-codex",
+ "grok-build",
+ ]);
+ });
+
it("keeps only signed-in logins and offers a choice only when there are two", () => {
const rows = [
societyRow({
diff --git a/jarvis/ui/web/frontend/src/components/society/create/brainPicker.ts b/jarvis/ui/web/frontend/src/components/society/create/brainPicker.ts
index 5aed744b6f..0efc7a2309 100644
--- a/jarvis/ui/web/frontend/src/components/society/create/brainPicker.ts
+++ b/jarvis/ui/web/frontend/src/components/society/create/brainPicker.ts
@@ -45,11 +45,19 @@ function kindOf(option: ProviderOption, row: SocietyProviderRow | undefined): Br
* local seat with nothing installed or nothing running is not listed
* (maintainer, 2026-09-02: an empty "Local server" row beside Ollama is
* noise). Rows whose list has not arrived yet are left out until it does.
+ *
+ * A subscription seat needs PROOF of a login, not just an installed binary:
+ * a signed-in account this app can read (`accounts`), or a card on the
+ * Agents tab that reports it connected (`known` — the ids that tab has a row
+ * for). The chat's composer lists an installed CLI it cannot read the login
+ * of (OpenCode, Kimi, Cursor…) and lets the turn say what is wrong; the
+ * creator does not — "connect it first" is the whole point of this list.
*/
export function brainSeats(
options: ProviderOption[],
society: SocietyProviderRow[],
liveModels: Record<string, CuratedModel[]> = {},
+ known: ReadonlySet<string> = new Set(),
): BrainSeat[] {
const byId = new Map(society.map((r) => [r.id, r]));
return options
@@ -63,6 +71,7 @@ export function brainSeats(
const accounts = kind === "subscription" ? (row?.accounts ?? []).filter((a) => a.connected) : [];
return { provider, kind, accounts };
})
+ .filter((s) => s.kind !== "subscription" || s.accounts.length > 0 || known.has(s.provider.id))
.sort(
(a, b) =>
KIND_ORDER[a.kind] - KIND_ORDER[b.kind] || a.provider.label.localeCompare(b.provider.label),