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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(office): two-line pane nameplates that keep what tells agents apart
rubenluetke10-beep22d2e498f975
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsxindex e1c4fd4bcb..10c5def959 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx@@ -7,7 +7,7 @@* everything else is client-side choreography that costs no tokens and never* starts or stops work.*/-import { useEffect, useMemo, useRef, useState, type RefObject } from "react";+import { useEffect, useMemo, useRef, useState, type ReactNode, type RefObject } from "react";import { Html } from "@react-three/drei";import { useFrame } from "@react-three/fiber";import { DoubleSide, Vector3, type Group, type Mesh, type MeshBasicMaterial } from "three";@@ -34,7 +34,8 @@ import type { ChatLine } from "./deskChat";import type { DeskChat } from "./useDeskChats";import { officeTalkChat, useOfficeTalk } from "./officeTalk";import { deliverySpot, ERRAND_SPEED, useErrandFeed, useGigiErrands } from "./gigiErrands";-import { isPaneAgentId } from "./codingFloor";+import { isPaneAgentId, plateTitle } from "./codingFloor";+import { promptOpening } from "@/components/agentic/sessionTitle";/** The agent's symbol walks behind it as a little pet, about a fifth of its height. */export const PET_SIZE_M = 0.26;@@ -89,26 +90,61 @@ function Nameplate({ agent, activity, selected, onSelect, height = OFFICE_FIGURElast.current = scale;plate.current.style.transform = `scale(${scale.toFixed(2)})`;});+ const [open, setOpen] = useState(false);const detail = agent.state !== "idle" ? t(`society.office.state_${agent.state}`) : activity ? t(`society.office.activity_${activity}`) : "";+ const pane = isPaneAgentId(agent.agentId);+ const state = (+ <span className="office-plate-state" title={t(`society.office.state_${agent.state}`)}>+ <i aria-hidden />{detail ? <em>{detail}</em> : null}+ </span>+ );return (<group ref={anchor} position={[0, height, 0]}>- <Html center zIndexRange={[20, 0]}>+ {/* An opened plate draws above its neighbours' plates and bubbles, which sit shoulder to shoulder at a desk row. */}+ <Html center zIndexRange={open ? [40, 30] : [20, 0]}><button ref={plate} type="button" data-office-ui className="office-plate" data-state={agent.state} data-selected={selected || undefined}+ data-pane={pane || undefined} data-open={open || undefined}onClick={(event) => { event.stopPropagation(); onSelect(agent.agentId); }}+ onPointerEnter={() => setOpen(true)} onPointerLeave={() => setOpen(false)}+ onFocus={() => setOpen(true)} onBlur={() => setOpen(false)}aria-label={t("society.office.open_agent").replace("{0}", agent.name)}><span className="office-plate-badge" style={{ background: agent.palette.primary }} aria-hidden>- {agent.tier === "lead" ? "★" : (isPaneAgentId(agent.agentId) ? agent.provider : agent.name).slice(0, 1).toUpperCase()}- </span>- <span className="office-plate-name" title={agent.name}>{agent.name}</span>- <span className="office-plate-state" title={t(`society.office.state_${agent.state}`)}>- <i aria-hidden />{detail ? <em>{detail}</em> : null}+ {agent.tier === "lead" ? "★" : (pane ? agent.provider : agent.name).slice(0, 1).toUpperCase()}</span>+ {pane ? <PanePlateText agent={agent} open={open} state={state} /> : (+ <>+ <span className="office-plate-name" title={agent.name}>{agent.name}</span>+ {state}+ </>+ )}</button></Html></group>);}+/**+ * A coding pane's plate: its title on two lines (subject, then result and run+ * state), so the words that tell four "Office …" panes apart are never the ones+ * clipped. Hovered or focused, it opens to the whole title, the call-sign that+ * finds the pane in the IDE, and the opening of what it was last asked.+ */+function PanePlateText({ agent, open, state }: { agent: SocietyAgent; open: boolean; state: ReactNode }) {+ const { subject, result } = plateTitle(agent.name);+ const asked = open ? promptOpening(agent.description) : "";+ return (+ <span className="office-plate-text">+ <span className="office-plate-name">{subject}</span>+ <span className="office-plate-line">+ {result ? <span className="office-plate-result">{result}</span> : null}+ {state}+ </span>+ {open ? <span className="office-plate-sign">{agent.title}</span> : null}+ {asked && asked !== agent.name ? <span className="office-plate-asked">“{asked}”</span> : null}+ </span>+ );+}+/** The sealed envelope Gigi carries on an errand, bobbing under it. */function ErrandEnvelope({ owner }: { owner: RefObject<Group | null> }) {const env = useRef<Group>(null);diff --git a/jarvis/ui/web/frontend/src/components/society/office/codingFloor.test.ts b/jarvis/ui/web/frontend/src/components/society/office/codingFloor.test.tsindex aa93057804..bad4f0ff55 100644--- a/jarvis/ui/web/frontend/src/components/society/office/codingFloor.test.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/codingFloor.test.ts@@ -10,7 +10,7 @@ import type { WorkspacePaneRow } from "@/lib/agenticIdeApi";import { resetWorkspacePanesPoll, useWorkspacePanesStore } from "@/store/workspacePanes";import {- isPaneAgentId, paneAgentId, paneFigure, paneLabel, paneOccupants, panePlateName, paneRunState, useCodingFloorOccupants,+ isPaneAgentId, paneAgentId, paneFigure, paneLabel, paneOccupants, panePlateName, paneRunState, plateTitle, useCodingFloorOccupants,} from "./codingFloor";import { allDesks, buildOfficeLayout } from "./officeLayout";import { toyLookFor } from "./toyFigureModel";@@ -81,6 +81,15 @@ describe("coding floor roster", () => {expect(occupant.agent.createdMs).toBe(100_000);});+ it("splits a recap into subject and result for the two-line plate", () => {+ expect(plateTitle("Office map camera — controls fix")).toEqual({ subject: "Office map camera", result: "controls fix" });+ expect(plateTitle("Terminal tabs – rename without restart")).toEqual({ subject: "Terminal tabs", result: "rename without restart" });+ expect(plateTitle("Login test - flaky on CI")).toEqual({ subject: "Login test", result: "flaky on CI" });+ expect(plateTitle("Fix the login test")).toEqual({ subject: "Fix the login test", result: "" });+ expect(plateTitle("self-hosted runner")).toEqual({ subject: "self-hosted runner", result: "" });+ expect(plateTitle(" — dangling")).toEqual({ subject: "— dangling", result: "" });+ });+it("gives same-named workspaces their own departments", () => {const occupants = paneOccupants([pane("T1", "a", { workspace_name: "App" }), pane("T1", "b", { workspace_name: "App" })]);expect(occupants.map((o) => o.agent.providerLabel)).toEqual(["App", "App 2"]);diff --git a/jarvis/ui/web/frontend/src/components/society/office/codingFloor.ts b/jarvis/ui/web/frontend/src/components/society/office/codingFloor.tsindex 2c30f8ab7d..bedaf5987a 100644--- a/jarvis/ui/web/frontend/src/components/society/office/codingFloor.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/codingFloor.ts@@ -94,6 +94,33 @@ export function panePlateName(return title && title !== pane.display_name && title !== pane.name ? title : paneLabel(pane);}+/** The two halves of a plate: what the pane is about, and where it stands. */+export interface PlateTitle {+ subject: string;+ result: string;+}++/** " — ", " – " or a spaced " - ": the break the recap contract asks the model for. */+const TITLE_BREAK = /\s+[—–-]\s+/;++/**+ * A pane title split for a two-line plate.+ *+ * Recaps are written as "subject — result" ("Office map camera — controls+ * fix"), and one line clipped the result away: four plates read "Office+ * screens — live worker te…", so the half that told the panes apart was+ * the half nobody could see. The subject goes on top, the result below it,+ * each with its own width. A title with no break stays one line.+ */+export function plateTitle(title: string): PlateTitle {+ const text = title.trim();+ const found = TITLE_BREAK.exec(text);+ if (!found) return { subject: text, result: "" };+ const subject = text.slice(0, found.index).trim();+ const result = text.slice(found.index + found[0].length).trim();+ return subject && result ? { subject, result } : { subject: text, result: "" };+}+function workspaceLabel(pane: WorkspacePaneRow): string {const name = pane.workspace_name.trim();if (name) return name;diff --git a/jarvis/ui/web/frontend/src/components/society/office/office.css b/jarvis/ui/web/frontend/src/components/society/office/office.cssindex ebd461f013..377465e8c3 100644--- a/jarvis/ui/web/frontend/src/components/society/office/office.css+++ b/jarvis/ui/web/frontend/src/components/society/office/office.css@@ -36,6 +36,20 @@.office-plate[data-state="working"] .office-plate-state i { background:#4ade80; box-shadow:0 0 6px #4ade80; }.office-plate[data-state="waiting"] .office-plate-state i { background:#fbbf24; }.office-plate:focus-visible { outline:2px solid #93c5fd; outline-offset:2px; }+/* A coding pane's plate: subject on top, result + run state below; hovered, the whole title and its last ask. */+.office-plate[data-pane] { align-items:flex-start; gap:6px; padding:4px 10px 4px 4px; border-radius:12px; text-align:left; }+.office-plate[data-pane] .office-plate-badge { flex:none; margin-top:1px; }+.office-plate-text { display:flex; flex-direction:column; align-items:flex-start; gap:1px; min-width:0; line-height:1.25; }+.office-plate[data-pane] .office-plate-name { max-width:13em; }+.office-plate-line { display:inline-flex; align-items:center; gap:6px; max-width:17em; }+.office-plate-result { min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:11px; font-weight:600; color:#e2e8f0; }+.office-plate-line .office-plate-state { flex:none; }+.office-plate-sign { font-size:10px; font-weight:600; color:#94a3b8; }+.office-plate-asked { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; max-width:20em; margin-top:2px; font-size:11px; font-style:italic; font-weight:500; color:#cbd5e1; white-space:normal; }+.office-plate[data-pane][data-open] { background:rgb(24 26 32 / .96); }+.office-plate[data-pane][data-open] .office-plate-name,+.office-plate[data-pane][data-open] .office-plate-result { max-width:20em; white-space:normal; overflow:visible; }+.office-plate[data-pane][data-open] .office-plate-line { max-width:none; }/* Checkpoint label pills: same dark in-world pill as .office-plate, with a gold hexagon badge. */.office-checkpoint { transform-origin:center center; display:inline-flex; align-items:center; gap:6px; padding:3px 11px 3px 3px; border:1px solid rgb(245 184 61 / .55); border-radius:999px; background:rgb(24 26 32 / .86); color:#fff7ec; cursor:pointer; font-family:inherit; font-size:12px; font-weight:700; white-space:nowrap; user-select:none; box-shadow:0 2px 8px rgb(0 0 0 / .35); transition:background .15s, border-color .15s, box-shadow .15s; }.office-checkpoint:hover { background:rgb(36 39 48 / .95); border-color:#f5b83d; }