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): team room with real meetings, team cards and a live team board
rubenluetke10-beep4010a805c362
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsxindex 17d75a924c..51917f6aed 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx@@ -254,13 +254,14 @@ function Walker({ agent, desk, ctx, arrivesByElevator, awake, reduced, selected,}if (followingRef.current) { followingRef.current = false; setFollowing(false); }companions.delete(agent.agentId);- const sKey = calledTo ? `${calledTo.x.toFixed(2)},${calledTo.z.toFixed(2)}` : "";+ const calledSeat = calledTo ? summon.spotId ?? null : null;+ const sKey = calledTo ? `${calledTo.x.toFixed(2)},${calledTo.z.toFixed(2)},${calledSeat ?? ""}` : "";const needsPlan = !plan.current || planState.current !== agent.state || summonKey.current !== sKey|| (phase.current === "dwell" && now >= dwellUntil.current);if (needsPlan) {const next = planFor({agentId: agent.agentId, state: agent.state, desk, layout: ctx.layout, grid: ctx.grid, rng, book: ctx.book,- previous: plan.current?.kind ?? null, workingColleagues: ctx.colleagues().filter((c) => c.agentId !== agent.agentId), calledTo,+ previous: plan.current?.kind ?? null, workingColleagues: ctx.colleagues().filter((c) => c.agentId !== agent.agentId), calledTo, calledSeat,});// Reduced motion: no idle wandering — a placement holds until the state changes.if (reduced && !calledTo) next.dwellMs = Infinity;diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsxindex c1bd2da640..a9c2e74d1a 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx@@ -5,9 +5,7 @@* agent card/chat, chat groups — the office adds no new backend contract.*/import { useEffect, useId, useRef, useState } from "react";-import { useQueryClient } from "@tanstack/react-query";import { useT } from "@/i18n";-import { createSocietyChatGroup, useSocietyChatGroups } from "@/lib/societyChatGroups";import type { SocietyAgent } from "../data";import type { CheckpointKind, OfficeLayout, Point } from "./officeLayout";import { otherFloor, player, useOfficeStore, type OfficeFloor } from "./officeStore";@@ -17,6 +15,7 @@ import { AgentTalkPanel, CALL_MS } from "./AgentTalkPanel";import type { PlayerProfile } from "./playerProfile";import { WardrobePanel } from "./WardrobePanel";import { ReceptionPanel } from "./ReceptionPanel";+import { TeamRoomPanel } from "./TeamRoomPanel";import { CHECKPOINT_ICON, IconSvg, type CheckpointIcon } from "./CheckpointMarker";@@ -55,7 +54,7 @@ function PanelShell({ title, subtitle, icon, kind, onClose, children }: {);}-function spotCentre(layout: OfficeLayout, kind: "meeting" | "couch"): Point {+function spotCentre(layout: OfficeLayout, kind: "couch"): Point {const spots = layout.spots.filter((s) => s.kind === kind);if (spots.length === 0) return layout.spawn;return { x: spots.reduce((s, p) => s + p.x, 0) / spots.length, z: spots.reduce((s, p) => s + p.z, 0) / spots.length };@@ -163,88 +162,6 @@ function ManagePanel({ agents, actions }: { agents: SocietyAgent[]; actions: Off);}-function TeamPanel({ agents, layout, sample, actions }: { agents: SocietyAgent[]; layout: OfficeLayout; sample: boolean; actions: OfficeActions }) {- const t = useT();- const store = useOfficeStore();- const client = useQueryClient();- const groups = useSocietyChatGroups(!sample);- const [name, setName] = useState("");- const [busy, setBusy] = useState(false);- const [error, setError] = useState("");- const [created, setCreated] = useState<{ id: string; name: string } | null>(null);- const table = spotCentre(layout, "meeting");- const members = store.teamDraft.filter((id) => agents.some((a) => a.agentId === id));- const canCreate = !sample && !busy && members.length >= 2;- const create = async () => {- if (!canCreate) return;- setBusy(true); setError(""); setCreated(null);- try {- const names = members.map((id) => agents.find((a) => a.agentId === id)?.name ?? id);- const group = await createSocietyChatGroup(name.trim() || names.join(" + "), members);- await client.invalidateQueries({ queryKey: ["society", "chat-groups"] });- store.summon(members, table, CALL_MS);- store.clearDraft();- setName("");- setCreated({ id: group.group_id, name: group.name });- } catch (err) {- setError(err instanceof Error ? err.message : String(err));- } finally {- setBusy(false);- }- };- return (- <>- <p>{t("society.office.team_body")}</p>- {sample && <p className="office-note-inline">{t("society.office.sample")}</p>}- <label className="office-field">- <span>{t("society.office.team_name")}</span>- <input value={name} maxLength={60} onChange={(e) => setName(e.target.value)} placeholder={t("society.office.team_name_placeholder")}- onKeyDown={(e) => { if (e.key === "Enter") { e.preventDefault(); void create(); } }} />- </label>- {agents.length === 0 ? <p className="office-note-inline">{t("society.office.manage_empty")}</p> : (- <ul className="office-list office-list-check">- {agents.map((agent) => (- <li key={agent.agentId}>- <label>- <input type="checkbox" checked={store.teamDraft.includes(agent.agentId)} onChange={() => store.toggleDraft(agent.agentId)} />- <StateDot state={agent.state} /><span className="office-list-name" title={agent.name}>{agent.name}</span>- </label>- </li>- ))}- </ul>- )}- <button type="button" className="office-action office-action-primary" disabled={!canCreate} aria-busy={busy} onClick={() => void create()}>- {t("society.office.team_create").replace("{0}", String(members.length))}- </button>- {!sample && members.length < 2 && agents.length >= 2 && <p className="office-hint">{t("society.office.team_need_more")}</p>}- {error && <p role="alert" className="office-error">{error}</p>}- {created && (- <p className="office-success" role="status">- {t("society.office.team_created").replace("{0}", created.name)}- {actions.onOpenGroup && <button type="button" className="office-link" onClick={() => actions.onOpenGroup?.(created.id)}>{t("society.office.team_open")}</button>}- </p>- )}- {(groups.data?.length ?? 0) > 0 && (- <>- <h4 className="office-subhead">{t("society.office.team_existing")}</h4>- <ul className="office-list">- {groups.data!.map((group) => (- <li key={group.group_id}>- <span className="office-list-name" title={group.name}>{group.name}</span>- <button type="button" className="office-mini" aria-label={t("society.office.team_gather_label").replace("{0}", group.name)}- onClick={() => store.summon(group.members, table, CALL_MS)}>{t("society.office.team_gather")}</button>- {actions.onOpenGroup && <button type="button" className="office-mini" aria-label={t("society.office.team_open_label").replace("{0}", group.name)}- onClick={() => actions.onOpenGroup?.(group.group_id)}>{t("society.office.action_open")}</button>}- </li>- ))}- </ul>- </>- )}- </>- );-}--function LeadPanel({ agents, actions }: { agents: SocietyAgent[]; actions: OfficeActions }) {const t = useT();const store = useOfficeStore();@@ -308,7 +225,7 @@ export function CheckpointPanel({ id, floor = "agents", agents, layout, sample,<PanelShell title={t(`society.office.cp_${id}`)} subtitle={t(`society.office.cp_${id}_hint`)} icon={CHECKPOINT_ICON[id]} kind={id} onClose={onClose}>{id === "create" && <ReceptionPanel floor={floor} layout={layout} onCreateAgent={actions.onCreateAgent} />}{id === "manage" && <ManagePanel agents={agents} actions={actions} />}- {id === "team" && <TeamPanel agents={agents} layout={layout} sample={sample} actions={actions} />}+ {id === "team" && <TeamRoomPanel agents={agents} layout={layout} sample={sample} actions={actions} />}{id === "wardrobe" && <WardrobePanel profile={profile} onProfile={onProfile} agents={agents} sample={sample} />}{id === "lead" && <LeadPanel agents={agents} actions={actions} />}{id === "break" && <BreakPanel agents={agents} layout={layout} />}diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsxindex 3465e28d30..b25c7e7af1 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx@@ -20,6 +20,7 @@ import { GigiFlyer } from "./GigiFlyer";import { useEventStore } from "@/store/events";import type { DeskChat } from "./useDeskChats";import { FurniturePiece, MeetingChairs } from "./OfficeProps";+import { TeamBoardFace } from "./TeamBoardFace";import { RoomFloors, RoomSign, RoomWalls } from "./OfficeRooms";import { CHECKPOINT_ICON, CheckpointMarker } from "./CheckpointMarker";import { OFFICE_FIGURE_HEIGHT_M, OfficeAgents, type WalkerContext } from "./OfficeAgents";@@ -173,6 +174,7 @@ export function OfficeScene({ floor, occupants, ready, layout, grid, walkers, agconst span = Math.max(maxX - minX, maxZ - minZ);const select = useOfficeStore((s) => s.select);const table = layout.furniture.find((f) => f.kind === "meetingTable");+ const board = layout.furniture.find((f) => f.kind === "teamBoard");const onFloorClick = (event: ThreeEvent<MouseEvent>) => {// A drag that ends on the floor rotated the camera; only a real click walks.if (event.delta > 6) return;@@ -203,6 +205,7 @@ export function OfficeScene({ floor, occupants, ready, layout, grid, walkers, ag: <LiveMonitors desks={desks} agents={agents} chats={chats} onOpen={onOpenScreen} />}{layout.furniture.map((item) => <FurniturePiece key={item.id} item={item} />)}{table && <MeetingChairs table={table} />}+ {board && <TeamBoardFace board={board} enabled={floor === "agents"} />}{layout.checkpoints.map((cp) => (<CheckpointMarker key={cp.id} checkpoint={cp} label={t(`society.office.cp_${cp.id}`)} icon={CHECKPOINT_ICON[cp.id]}active={(nearby?.kind === "checkpoint" && nearby.id === cp.id) || (selection?.kind === "checkpoint" && selection.id === cp.id)}diff --git a/jarvis/ui/web/frontend/src/components/society/office/TeamBoardFace.tsx b/jarvis/ui/web/frontend/src/components/society/office/TeamBoardFace.tsxnew file mode 100644index 0000000000..8e2426a3a7--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/society/office/TeamBoardFace.tsx@@ -0,0 +1,101 @@+/**+ * The team room's whiteboard shows the real teams: up to four names with their+ * member counts, and the one meeting at the table right now marked "live".+ * Without any team the board keeps its drawn org chart.+ */+import { useEffect, useMemo } from "react";+import { CanvasTexture, SRGBColorSpace } from "three";+import { useT } from "@/i18n";+import { useSocietyChatGroups, type SocietyChatGroup } from "@/lib/societyChatGroups";+import type { Furniture } from "./officeLayout";+import { useOfficeStore } from "./officeStore";++const W = 1024, H = 478;+/** Board face in the teamBoard prop's local space (OfficeProps `TeamBoard`), a hair in front of the drawn panel. */+const FACE = { y: 1.25, z: -0.011, w: 2.4, h: 1.12 };+const MAX_ROWS = 4;+const NOTE_COLOURS = ["#fde68a", "#bbf7d0", "#bfdbfe", "#fbcfe8"];++function clipped(ctx: CanvasRenderingContext2D, text: string, maxWidth: number): string {+ if (ctx.measureText(text).width <= maxWidth) return text;+ let cut = text;+ while (cut.length > 1 && ctx.measureText(`${cut}…`).width > maxWidth) cut = cut.slice(0, -1);+ return `${cut}…`;+}++function drawBoard(ctx: CanvasRenderingContext2D, teams: SocietyChatGroup[], liveId: string | null, labels: { title: string; members: string; live: string }) {+ ctx.fillStyle = "#f4f4f0";+ ctx.fillRect(0, 0, W, H);+ ctx.fillStyle = "#2f3645";+ ctx.font = "700 52px system-ui, sans-serif";+ ctx.textBaseline = "middle";+ ctx.fillText(clipped(ctx, labels.title, W - 100), 50, 58);+ ctx.strokeStyle = "#3b4250";+ ctx.lineWidth = 5;+ ctx.lineCap = "round";+ ctx.beginPath(); ctx.moveTo(50, 100); ctx.lineTo(W - 50, 100); ctx.stroke();+ const rows = teams.slice(0, MAX_ROWS);+ const rowH = (H - 130) / MAX_ROWS;+ rows.forEach((team, i) => {+ const y = 125 + i * rowH + rowH / 2 - 6;+ const live = team.group_id === liveId;+ ctx.fillStyle = NOTE_COLOURS[i % NOTE_COLOURS.length];+ ctx.fillRect(50, y - rowH / 2 + 10, 26, rowH - 20);+ const count = labels.members.replace("{0}", String(team.members.length));+ ctx.font = "500 32px system-ui, sans-serif";+ const countW = ctx.measureText(count).width;+ const liveW = live ? 150 : 0;+ ctx.fillStyle = "#1f2430";+ ctx.font = "600 40px system-ui, sans-serif";+ ctx.fillText(clipped(ctx, team.name, W - 190 - countW - liveW), 100, y);+ ctx.font = "500 32px system-ui, sans-serif";+ ctx.fillStyle = "#5b6475";+ ctx.fillText(count, W - 50 - countW - liveW, y);+ if (live) {+ ctx.fillStyle = "#2f9e5b";+ ctx.beginPath(); ctx.roundRect(W - 180, y - 24, 130, 48, 24); ctx.fill();+ ctx.fillStyle = "#ffffff";+ ctx.font = "700 28px system-ui, sans-serif";+ ctx.fillText(clipped(ctx, labels.live, 100), W - 162, y + 1);+ }+ });+}++export function TeamBoardFace({ board, enabled }: { board: Furniture; enabled: boolean }) {+ const t = useT();+ const groups = useSocietyChatGroups(enabled);+ const liveId = useOfficeStore((s) => (s.meeting && s.meeting.untilMs > Date.now() ? s.meeting.groupId : null));+ const canvas = useMemo(() => {+ const el = typeof document === "undefined" ? null : document.createElement("canvas");+ if (el) { el.width = W; el.height = H; }+ return el;+ }, []);+ const texture = useMemo(() => {+ if (!canvas) return null;+ const tex = new CanvasTexture(canvas);+ tex.colorSpace = SRGBColorSpace;+ tex.anisotropy = 4;+ return tex;+ }, [canvas]);+ useEffect(() => () => texture?.dispose(), [texture]);+ const teams = useMemo(() => [...(groups.data ?? [])].sort((a, b) => b.updated_ms - a.updated_ms), [groups.data]);+ const labels = { title: t("society.office.team_yours"), members: t("society.office.team_members"), live: t("society.office.team_live") };+ const signature = JSON.stringify([teams.map((g) => [g.group_id, g.name, g.members.length]), liveId, labels]);+ useEffect(() => {+ const ctx = canvas?.getContext("2d");+ if (!ctx || !texture) return;+ drawBoard(ctx, teams, liveId, labels);+ texture.needsUpdate = true;+ // `signature` covers teams, liveId and labels.+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [signature, canvas, texture]);+ if (!texture || teams.length === 0) return null;+ return (+ <group position={[board.x, 0, board.z]} rotation={[0, board.rotationY, 0]}>+ <mesh position={[0, FACE.y, FACE.z]}>+ <planeGeometry args={[FACE.w, FACE.h]} />+ <meshStandardMaterial map={texture} roughness={0.7} />+ </mesh>+ </group>+ );+}diff --git a/jarvis/ui/web/frontend/src/components/society/office/TeamRoomPanel.tsx b/jarvis/ui/web/frontend/src/components/society/office/TeamRoomPanel.tsxnew file mode 100644index 0000000000..c0f1a2c80a--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/society/office/TeamRoomPanel.tsx@@ -0,0 +1,332 @@+/**+ * The team room checkpoint: your teams as cards (meet at the table, open the+ * team chat, rename, change members, delete), a live meeting banner while a+ * team sits at the table, and a quick way to put a new team together.+ *+ * Teams are the existing society chat groups; the office adds no backend+ * contract. A meeting is purely spatial — members walk to the team room and+ * sit down — and never interrupts an agent that is working.+ */+import { useEffect, useMemo, useState } from "react";+import { useQueryClient } from "@tanstack/react-query";+import { useT } from "@/i18n";+import {+ createSocietyChatGroup, deleteSocietyChatGroup, updateSocietyChatGroup, useSocietyChatGroups, type SocietyChatGroup,+} from "@/lib/societyChatGroups";+import type { SocietyAgent } from "../data";+import type { OfficeLayout, Point } from "./officeLayout";+import { useOfficeStore } from "./officeStore";+import { agentPositions } from "./walkerRegistry";+import { MEETING_MS, meetingProgress, meetingSeats, minutesLeft } from "./teamMeeting";+import type { OfficeActions } from "./OfficePanels";+import "./teamRoom.css";++const GROUPS_KEY = ["society", "chat-groups"] as const;+/** Above this many agents the picker gets a search field. */+const SEARCH_FROM = 7;++function initials(name: string): string {+ const parts = name.trim().split(/\s+/).filter(Boolean);+ if (parts.length === 0) return "?";+ return (parts.length > 1 ? parts[0][0] + parts[1][0] : parts[0].slice(0, 2)).toUpperCase();+}++function errorText(err: unknown): string {+ return err instanceof Error ? err.message : String(err);+}++/** A member as a small round badge in the agent's colour, with its state dot. */+function MemberBadge({ agent }: { agent: SocietyAgent }) {+ const t = useT();+ return (+ <span className="team-badge" style={{ background: agent.palette.primary }}+ title={`${agent.name} · ${t(`society.office.state_${agent.state}`)}`}>+ {initials(agent.name)}+ <i className="office-dot" data-state={agent.state} aria-hidden />+ </span>+ );+}++/** Where the person stands to join a meeting: just south of the chairs, facing the table. */+function tableApproach(layout: OfficeLayout): Point | null {+ const table = layout.furniture.find((f) => f.kind === "meetingTable");+ return table ? { x: table.x, z: table.z + 2.1 } : null;+}++/** Checkbox list of agents with an optional search field and quick picks. */+function MemberPicker({ agents, selected, onToggle, onSet }: {+ agents: SocietyAgent[]; selected: string[]; onToggle: (id: string) => void; onSet: (ids: string[]) => void;+}) {+ const t = useT();+ const [query, setQuery] = useState("");+ const needle = query.trim().toLowerCase();+ const shown = needle ? agents.filter((a) => `${a.name} ${a.title}`.toLowerCase().includes(needle)) : agents;+ const free = agents.filter((a) => a.state === "idle").map((a) => a.agentId);+ return (+ <div className="team-picker">+ {agents.length >= SEARCH_FROM && (+ <label className="office-field">+ <span className="sr-only">{t("society.office.team_search")}</span>+ <input type="search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t("society.office.team_search")} />+ </label>+ )}+ <div className="office-actions">+ <button type="button" className="office-mini" disabled={free.length === 0} onClick={() => onSet([...new Set([...selected, ...free])])}>+ {t("society.office.team_pick_idle")}+ </button>+ <button type="button" className="office-mini" disabled={selected.length === 0} onClick={() => onSet([])}>+ {t("society.office.team_pick_clear")}+ </button>+ <span className="office-hint team-picker-count" aria-live="polite">+ {t("society.office.team_selected").replace("{0}", String(selected.length))}+ </span>+ </div>+ {shown.length === 0 ? <p className="office-note-inline">{t("society.office.team_no_match")}</p> : (+ <ul className="office-list office-list-check">+ {shown.map((agent) => (+ <li key={agent.agentId}>+ <label>+ <input type="checkbox" checked={selected.includes(agent.agentId)} onChange={() => onToggle(agent.agentId)} />+ <i className="office-dot" data-state={agent.state} aria-hidden />+ <span className="office-list-name" title={agent.title ? `${agent.name} · ${agent.title}` : agent.name}>{agent.name}</span>+ {agent.title && <span className="team-picker-title">{agent.title}</span>}+ </label>+ </li>+ ))}+ </ul>+ )}+ </div>+ );+}++/** The meeting at the table right now: who sits, who is coming, who keeps working. */+function MeetingBanner({ agents, layout, actions }: { agents: SocietyAgent[]; layout: OfficeLayout; actions: OfficeActions }) {+ const t = useT();+ const meeting = useOfficeStore((s) => s.meeting);+ const summons = useOfficeStore((s) => s.summons);+ const endMeeting = useOfficeStore((s) => s.endMeeting);+ const requestWalk = useOfficeStore((s) => s.requestWalk);+ const [now, setNow] = useState(() => Date.now());+ // Positions live outside React; a one-second tick keeps the seat count honest.+ useEffect(() => {+ if (!meeting) return;+ const timer = window.setInterval(() => setNow(Date.now()), 1000);+ return () => window.clearInterval(timer);+ }, [meeting]);+ useEffect(() => { if (meeting && meeting.untilMs <= now) endMeeting(); }, [meeting, now, endMeeting]);+ if (!meeting || meeting.untilMs <= now) return null;+ const progress = meetingProgress(meeting, agents, summons, agentPositions);+ const present = meeting.members.length - progress.missing.length;+ const nameOf = (id: string) => agents.find((a) => a.agentId === id)?.name ?? id;+ const approach = tableApproach(layout);+ return (+ <section className="team-meeting" aria-live="polite">+ <p className="team-meeting-title"><span className="team-meeting-live" aria-hidden />{t("society.office.meeting_title").replace("{0}", meeting.name)}</p>+ <p className="office-hint">+ {t("society.office.meeting_status")+ .replace("{0}", String(progress.seated.length)).replace("{1}", String(present))+ .replace("{2}", String(minutesLeft(meeting, now)))}+ </p>+ {progress.busy.length > 0 && (+ <p className="office-hint">{t("society.office.meeting_busy").replace("{0}", progress.busy.map(nameOf).join(", "))}</p>+ )}+ <div className="office-actions">+ {actions.onOpenGroup && (+ <button type="button" className="office-action office-action-primary" onClick={() => actions.onOpenGroup?.(meeting.groupId)}>+ {t("society.office.team_chat")}+ </button>+ )}+ {approach && <button type="button" className="office-action" onClick={() => requestWalk(approach)}>{t("society.office.meeting_join")}</button>}+ <button type="button" className="office-action" onClick={endMeeting}>{t("society.office.meeting_end")}</button>+ </div>+ </section>+ );+}++/** One team: members at a glance, meet / chat, and an inline editor. */+function TeamCard({ group, agents, layout, sample, actions }: {+ group: SocietyChatGroup; agents: SocietyAgent[]; layout: OfficeLayout; sample: boolean; actions: OfficeActions;+}) {+ const t = useT();+ const client = useQueryClient();+ const meeting = useOfficeStore((s) => s.meeting);+ const startMeeting = useOfficeStore((s) => s.startMeeting);+ const [editing, setEditing] = useState(false);+ const [name, setName] = useState(group.name);+ const [members, setMembers] = useState<string[]>(group.members);+ const [confirmDelete, setConfirmDelete] = useState(false);+ const [busy, setBusy] = useState(false);+ const [error, setError] = useState("");+ const present = group.members.map((id) => agents.find((a) => a.agentId === id)).filter((a): a is SocietyAgent => !!a);+ const working = present.filter((a) => a.state === "working").length;+ const inMeeting = !!meeting && meeting.groupId === group.group_id && meeting.untilMs > Date.now();++ const meet = () => {+ const ids = present.map((a) => a.agentId);+ startMeeting({ groupId: group.group_id, name: group.name, members: ids, untilMs: Date.now() + MEETING_MS }, meetingSeats(layout, ids));+ };+ const openEditor = () => { setName(group.name); setMembers(group.members); setConfirmDelete(false); setError(""); setEditing(true); };+ const save = async () => {+ if (members.length < 2 || busy) return;+ setBusy(true); setError("");+ try {+ await updateSocietyChatGroup(group.group_id, name.trim() || group.name, members);+ await client.invalidateQueries({ queryKey: GROUPS_KEY });+ setEditing(false);+ } catch (err) {+ setError(errorText(err));+ } finally {+ setBusy(false);+ }+ };+ const remove = async () => {+ if (busy) return;+ setBusy(true); setError("");+ try {+ await deleteSocietyChatGroup(group.group_id);+ if (inMeeting) useOfficeStore.getState().endMeeting();+ await client.invalidateQueries({ queryKey: GROUPS_KEY });+ } catch (err) {+ setError(errorText(err));+ setBusy(false);+ }+ };++ return (+ <li className="team-card" data-meeting={inMeeting || undefined}>+ <div className="team-card-head">+ <span className="team-card-name" title={group.name}>{group.name}</span>+ <span className="office-hint">+ {t("society.office.team_members").replace("{0}", String(present.length))}+ {working > 0 ? ` · ${t("society.office.team_working").replace("{0}", String(working))}` : ""}+ </span>+ </div>+ <div className="team-badges">+ {present.map((agent) => <MemberBadge key={agent.agentId} agent={agent} />)}+ </div>+ {!editing ? (+ <div className="office-actions">+ <button type="button" className="office-action office-action-primary" disabled={inMeeting || present.length === 0}+ aria-label={t("society.office.team_gather_label").replace("{0}", group.name)} onClick={meet}>+ {inMeeting ? t("society.office.team_meeting_now") : t("society.office.team_meet")}+ </button>+ {actions.onOpenGroup && (+ <button type="button" className="office-action" aria-label={t("society.office.team_open_label").replace("{0}", group.name)}+ onClick={() => actions.onOpenGroup?.(group.group_id)}>{t("society.office.team_chat")}</button>+ )}+ {!sample && <button type="button" className="office-action" onClick={openEditor}>{t("society.office.team_edit")}</button>}+ </div>+ ) : (+ <div className="team-editor">+ <label className="office-field">+ <span>{t("society.office.team_name")}</span>+ <input value={name} maxLength={60} onChange={(e) => setName(e.target.value)}+ onKeyDown={(e) => { if (e.key === "Enter") { e.preventDefault(); void save(); } }} />+ </label>+ <MemberPicker agents={agents} selected={members}+ onToggle={(id) => setMembers((m) => (m.includes(id) ? m.filter((x) => x !== id) : [...m, id]))} onSet={setMembers} />+ {members.length < 2 && <p className="office-hint">{t("society.office.team_edit_need_more")}</p>}+ <div className="office-actions">+ <button type="button" className="office-action office-action-primary" disabled={busy || members.length < 2} aria-busy={busy}+ onClick={() => void save()}>{t("society.office.team_save")}</button>+ <button type="button" className="office-action" disabled={busy} onClick={() => setEditing(false)}>{t("society.office.team_cancel")}</button>+ {confirmDelete ? (+ <button type="button" className="office-action team-danger" disabled={busy} onClick={() => void remove()}>+ {t("society.office.team_delete_confirm")}+ </button>+ ) : (+ <button type="button" className="office-action" disabled={busy} onClick={() => setConfirmDelete(true)}>{t("society.office.team_delete")}</button>+ )}+ </div>+ </div>+ )}+ {error && <p role="alert" className="office-error">{error}</p>}+ </li>+ );+}++export function TeamRoomPanel({ agents, layout, sample, actions }: { agents: SocietyAgent[]; layout: OfficeLayout; sample: boolean; actions: OfficeActions }) {+ const t = useT();+ const client = useQueryClient();+ const store = useOfficeStore();+ const groups = useSocietyChatGroups(!sample);+ const [name, setName] = useState("");+ const [busy, setBusy] = useState(false);+ const [error, setError] = useState("");+ const [created, setCreated] = useState("");+ const teams = useMemo(() => [...(groups.data ?? [])].sort((a, b) => b.updated_ms - a.updated_ms), [groups.data]);+ const members = store.teamDraft.filter((id) => agents.some((a) => a.agentId === id));+ // The new-team form stays folded behind a button once teams exist, unless agents were already picked on the map.+ const [composing, setComposing] = useState(false);+ const showComposer = composing || teams.length === 0 || members.length > 0;+ const canCreate = !sample && !busy && members.length >= 2;++ const setDraft = (ids: string[]) => {+ store.clearDraft();+ ids.forEach((id) => store.toggleDraft(id));+ };+ const create = async () => {+ if (!canCreate) return;+ setBusy(true); setError(""); setCreated("");+ try {+ const names = members.map((id) => agents.find((a) => a.agentId === id)?.name ?? id);+ const group = await createSocietyChatGroup(name.trim() || names.join(" + "), members);+ await client.invalidateQueries({ queryKey: GROUPS_KEY });+ store.startMeeting({ groupId: group.group_id, name: group.name, members, untilMs: Date.now() + MEETING_MS }, meetingSeats(layout, members));+ store.clearDraft();+ setName("");+ setComposing(false);+ setCreated(group.name);+ } catch (err) {+ setError(errorText(err));+ } finally {+ setBusy(false);+ }+ };++ return (+ <>+ <MeetingBanner agents={agents} layout={layout} actions={actions} />+ {sample && <p className="office-note-inline">{t("society.office.sample")}</p>}+ {created && <p className="office-success" role="status">{t("society.office.team_created").replace("{0}", created)}</p>}++ <h3 className="office-subhead">{t("society.office.team_yours")}</h3>+ {groups.isError && <p role="alert" className="office-error">{t("society.office.team_load_error").replace("{0}", errorText(groups.error))}</p>}+ {teams.length === 0 && !groups.isLoading && !groups.isError && <p className="office-note-inline">{t("society.office.team_none")}</p>}+ {teams.length > 0 && (+ <ul className="team-cards">+ {teams.map((group) => <TeamCard key={group.group_id} group={group} agents={agents} layout={layout} sample={sample} actions={actions} />)}+ </ul>+ )}++ {!showComposer ? (+ <button type="button" className="office-action" onClick={() => setComposing(true)}>{t("society.office.team_new")}</button>+ ) : (+ <section className="team-composer" aria-label={t("society.office.team_new")}>+ <h3 className="office-subhead">{t("society.office.team_new")}</h3>+ <p className="office-hint">{t("society.office.team_body")}</p>+ {agents.length === 0 ? <p className="office-note-inline">{t("society.office.manage_empty")}</p> : (+ <>+ <label className="office-field">+ <span>{t("society.office.team_name")}</span>+ <input value={name} maxLength={60} onChange={(e) => setName(e.target.value)} placeholder={t("society.office.team_name_placeholder")}+ onKeyDown={(e) => { if (e.key === "Enter") { e.preventDefault(); void create(); } }} />+ </label>+ <MemberPicker agents={agents} selected={members} onToggle={store.toggleDraft} onSet={setDraft} />+ </>+ )}+ <div className="office-actions">+ <button type="button" className="office-action office-action-primary" disabled={!canCreate} aria-busy={busy} onClick={() => void create()}>+ {t("society.office.team_create").replace("{0}", String(members.length))}+ </button>+ {teams.length > 0 && (+ <button type="button" className="office-action" onClick={() => { setComposing(false); store.clearDraft(); }}>{t("society.office.team_cancel")}</button>+ )}+ </div>+ {!sample && members.length < 2 && agents.length >= 2 && <p className="office-hint">{t("society.office.team_need_more")}</p>}+ {error && <p role="alert" className="office-error">{error}</p>}+ </section>+ )}+ </>+ );+}diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeBehavior.ts b/jarvis/ui/web/frontend/src/components/society/office/officeBehavior.tsindex 708adbdfe3..427702bb8b 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeBehavior.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/officeBehavior.ts@@ -98,6 +98,8 @@ export interface PlanInput {calledTo: Point | null;/** Where the agent currently is; lets a called agent stop on its own side of the caller. */position?: Point | null;+ /** A team meeting's chair for this agent (a `meeting-*` spot id); it sits there instead of standing by `calledTo`. */+ calledSeat?: string | null;}/** Idle activities and their relative weights. */@@ -212,7 +214,16 @@ export function planFor(input: PlanInput): Plan {book.release(agentId);// A working agent stays at its screen: the map mirrors real work and never interrupts it, not even visually.- if (input.calledTo && input.state !== "working") return calledPlan(input, input.calledTo);+ if (input.calledTo && input.state !== "working") {+ // A meeting seats its members: the assigned chair, else any free chair at the table, else standing by it.+ if (input.calledSeat) {+ const assigned = input.layout.spots.find((s) => s.id === input.calledSeat);+ if (assigned && book.claim(assigned.id, agentId)) return spotPlan("meeting", assigned, "sit", Infinity);+ const other = claimSpot(input, (s) => s.kind === "meeting");+ if (other) return spotPlan("meeting", other, "sit", Infinity);+ }+ return calledPlan(input, input.calledTo);+ }if (state === "working") {if (desk) {diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeStore.ts b/jarvis/ui/web/frontend/src/components/society/office/officeStore.tsindex 59205245ab..85d45b649a 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeStore.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/officeStore.ts@@ -23,7 +23,15 @@ export function otherFloor(floor: OfficeFloor): OfficeFloor {export interface PlayerBody { x: number; z: number; heading: number; path: Point[]; moving: boolean }/** Agents walking over to a point for a while (called by the person, or a team gathering). */-export interface Summon { target: Point; untilMs: number }+export interface Summon {+ target: Point;+ untilMs: number;+ /** A team meeting's chair (a `meeting-*` spot id): the agent sits there instead of standing by `target`. */+ spotId?: string;+}++/** A team meeting at the team-room table; its members hold summons with a chair each until it ends. */+export interface TeamMeeting { groupId: string; name: string; members: string[]; untilMs: number }interface OfficeState {/** The floor on screen; lives here so leaving the map and coming back keeps it. */@@ -42,6 +50,12 @@ interface OfficeState {/** One-shot camera fly-to request, consumed by the camera rig. */focus: { point: Point; seq: number } | null;summons: Record<string, Summon>;+ /** The meeting running in the team room, if any; one at a time. */+ meeting: TeamMeeting | null;+ /** Seat a team at the table (replacing any running meeting), each member on the chair `seats` gives it. */+ startMeeting: (meeting: TeamMeeting, seats: Record<string, { target: Point; spotId?: string }>) => void;+ /** End the running meeting: its members go back to their day. */+ endMeeting: () => void;/** One-shot camera dive into a desk monitor (then the chat opens), consumed by the camera rig. */zoom: { target: [number, number, number]; facing: number; seq: number } | null;/** Dive into a monitor centred on `target`, whose screen faces yaw `facing`. */@@ -66,13 +80,26 @@ let seq = 0;export const useOfficeStore = create<OfficeState>((set) => ({floor: "agents",setFloor: (floor) => set((s) => (s.floor === floor ? s : {- floor, selection: null, nearby: null, summons: {}, walkTo: null, zoom: null, focus: null, teamDraft: [], follow: true,+ floor, selection: null, nearby: null, summons: {}, meeting: null, walkTo: null, zoom: null, focus: null, teamDraft: [], follow: true,})),selection: null,nearby: null,follow: true,focus: null,summons: {},+ meeting: null,+ startMeeting: (meeting, seats) => set((s) => {+ const now = Date.now();+ const ended = new Set(s.meeting?.members ?? []);+ const next = Object.fromEntries(Object.entries(s.summons).filter(([id, summon]) => summon.untilMs > now && !ended.has(id)));+ for (const [id, seat] of Object.entries(seats)) next[id] = { ...seat, untilMs: meeting.untilMs };+ return { meeting, summons: next };+ }),+ endMeeting: () => set((s) => {+ if (!s.meeting) return s;+ const members = new Set(s.meeting.members);+ return { meeting: null, summons: Object.fromEntries(Object.entries(s.summons).filter(([id]) => !members.has(id))) };+ }),walkTo: null,zoom: null,zoomInto: (target, facing) => set({ zoom: { target, facing, seq: ++seq }, follow: false }),@@ -81,7 +108,7 @@ export const useOfficeStore = create<OfficeState>((set) => ({teamDraft: s.teamDraft.includes(agentId) ? s.teamDraft.filter((id) => id !== agentId) : [...s.teamDraft, agentId],})),clearDraft: () => set({ teamDraft: [] }),- clearSummons: () => set({ summons: {} }),+ clearSummons: () => set({ summons: {}, meeting: null }),select: (selection) => set({ selection }),setNearby: (nearby) => set((s) => (sameSelection(s.nearby, nearby) ? s : { nearby })),setFollow: (follow) => set((s) => (s.follow === follow ? s : { follow })),diff --git a/jarvis/ui/web/frontend/src/components/society/office/teamMeeting.test.ts b/jarvis/ui/web/frontend/src/components/society/office/teamMeeting.test.tsnew file mode 100644index 0000000000..fbd70bc7b7--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/society/office/teamMeeting.test.ts@@ -0,0 +1,94 @@+import { describe, expect, it } from "vitest";+import type { SocietyAgent } from "../data";+import { allDesks, buildOfficeLayout, type OfficeAgentInput } from "./officeLayout";+import { buildNavGrid, isWalkable } from "./officeNav";+import { createRng, planFor, SpotBook, type PlanInput } from "./officeBehavior";+import { MEETING_MS, meetingProgress, meetingSeats, minutesLeft } from "./teamMeeting";+import type { TeamMeeting } from "./officeStore";++const roster: OfficeAgentInput[] = Array.from({ length: 9 }, (_, i) => ({+ agentId: `a${i}`, name: `a${i}`, tier: "specialist", providerLabel: "Codex", state: "idle", createdMs: i,+}));+const layout = buildOfficeLayout(roster);+const grid = buildNavGrid(layout);+const ids = roster.map((r) => r.agentId);++function agent(agentId: string, state: SocietyAgent["state"]): SocietyAgent {+ return { agentId, name: agentId, state } as SocietyAgent;+}++function input(agentId: string, book: SpotBook, extra: Partial<PlanInput>): PlanInput {+ return {+ agentId, state: "idle", desk: allDesks(layout).find((d) => d.agentId === agentId) ?? null, layout, grid,+ rng: createRng(agentId), book, previous: null, workingColleagues: [], calledTo: null, ...extra,+ };+}++describe("meetingSeats", () => {+ it("gives every member its own chair, middle chairs first, facing pairs together", () => {+ const seats = meetingSeats(layout, ["a0", "a1"]);+ const [s0, s1] = [seats.a0, seats.a1];+ expect(s0.spotId).toMatch(/^meeting-/);+ expect(s1.spotId).toMatch(/^meeting-/);+ expect(s0.spotId).not.toBe(s1.spotId);+ // Across the table from each other: same x, opposite sides.+ expect(s0.target.x).toBeCloseTo(s1.target.x);+ expect(s0.target.z).not.toBeCloseTo(s1.target.z);+ });++ it("lets members beyond the chairs stand at the table's ends on walkable floor", () => {+ const seats = meetingSeats(layout, ids);+ const chairs = layout.spots.filter((s) => s.kind === "meeting").length;+ const standing = ids.filter((id) => !seats[id].spotId);+ expect(standing).toHaveLength(ids.length - chairs);+ for (const id of standing) expect(isWalkable(grid, seats[id].target)).toBe(true);+ });+});++describe("planFor with a meeting chair", () => {+ it("sits a called member on its chair", () => {+ const seat = meetingSeats(layout, ["a3"]).a3;+ const plan = planFor(input("a3", new SpotBook(), { calledTo: seat.target, calledSeat: seat.spotId }));+ expect(plan.kind).toBe("meeting");+ expect(plan.pose).toBe("sit");+ expect(plan.spotId).toBe(seat.spotId);+ expect(plan.target).toEqual(seat.target);+ });++ it("takes another free chair when its own is occupied", () => {+ const book = new SpotBook();+ const seat = meetingSeats(layout, ["a3"]).a3;+ book.claim(seat.spotId!, "stranger");+ const plan = planFor(input("a3", book, { calledTo: seat.target, calledSeat: seat.spotId }));+ expect(plan.kind).toBe("meeting");+ expect(plan.spotId).not.toBe(seat.spotId);+ expect(plan.spotId).toMatch(/^meeting-/);+ });++ it("never pulls a working agent away from its screen", () => {+ const seat = meetingSeats(layout, ["a3"]).a3;+ expect(planFor(input("a3", new SpotBook(), { state: "working", calledTo: seat.target, calledSeat: seat.spotId })).kind).toBe("work");+ });+});++describe("meetingProgress", () => {+ it("sorts members into seated, arriving, busy and missing", () => {+ const meeting: TeamMeeting = { groupId: "g", name: "Crew", members: ["a0", "a1", "a2", "gone"], untilMs: 1 };+ const seats = meetingSeats(layout, meeting.members);+ const summons = Object.fromEntries(Object.entries(seats).map(([id, s]) => [id, { ...s, untilMs: 1 }]));+ const positions = new Map([+ ["a0", seats.a0.target],+ ["a1", { x: seats.a1.target.x + 3, z: seats.a1.target.z }],+ ["a2", { x: 0, z: 0 }],+ ]);+ const progress = meetingProgress(meeting, [agent("a0", "idle"), agent("a1", "idle"), agent("a2", "working")], summons, positions);+ expect(progress).toEqual({ seated: ["a0"], arriving: ["a1"], busy: ["a2"], missing: ["gone"] });+ });++ it("counts minutes left, rounded up, and none after the end", () => {+ const meeting: TeamMeeting = { groupId: "g", name: "Crew", members: [], untilMs: 1_000 + MEETING_MS };+ expect(minutesLeft(meeting, 1_000)).toBe(10);+ expect(minutesLeft(meeting, 1_000 + MEETING_MS - 30_000)).toBe(1);+ expect(minutesLeft(meeting, 2_000 + MEETING_MS)).toBe(0);+ });+});diff --git a/jarvis/ui/web/frontend/src/components/society/office/teamMeeting.ts b/jarvis/ui/web/frontend/src/components/society/office/teamMeeting.tsnew file mode 100644index 0000000000..34890f1c73--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/society/office/teamMeeting.ts@@ -0,0 +1,73 @@+/**+ * Team meetings in the team room: which chair each member takes, and how far+ * the meeting has got (who already sits at the table, who is still on the way,+ * who keeps working at their desk). Pure, so the panel and tests share it.+ */+import type { SocietyAgent } from "../data";+import type { OfficeLayout, Point } from "./officeLayout";+import type { Summon, TeamMeeting } from "./officeStore";++/** A meeting holds its members at the table this long unless it is ended earlier. */+export const MEETING_MS = 10 * 60_000;++/** How close to its chair a member must be to count as seated, in metres. */+const SEATED_WITHIN_M = 0.35;+/** The same for a member without a chair, who stops about a step (1.2 m) from its point. */+const STANDING_WITHIN_M = 1.6;++export interface MeetingSeat { target: Point; spotId?: string }++/**+ * A chair for every member, middle chairs first and facing pairs together, so+ * a small team sits across from each other. Members beyond the chairs stand at+ * the table's short ends.+ */+export function meetingSeats(layout: OfficeLayout, members: readonly string[]): Record<string, MeetingSeat> {+ const table = layout.furniture.find((f) => f.kind === "meetingTable");+ const centre = table ? { x: table.x, z: table.z } : layout.spawn;+ const chairs = layout.spots.filter((s) => s.kind === "meeting")+ .sort((a, b) => Math.abs(a.x - centre.x) - Math.abs(b.x - centre.x) || a.x - b.x || a.z - b.z);+ const seats: Record<string, MeetingSeat> = {};+ members.forEach((id, i) => {+ const chair = chairs[i];+ if (chair) { seats[id] = { target: { x: chair.x, z: chair.z }, spotId: chair.id }; return; }+ const extra = i - chairs.length;+ const side = extra % 2 === 0 ? 1 : -1;+ seats[id] = { target: { x: centre.x + side * (2.4 + 0.5 * Math.floor(extra / 2)), z: centre.z } };+ });+ return seats;+}++export interface MeetingProgress {+ /** Members sitting (or standing) at their place at the table. */+ seated: string[];+ /** Members on their way to the table. */+ arriving: string[];+ /** Members that keep working at their desk: a meeting never interrupts real work. */+ busy: string[];+ /** Members no longer in the office (removed or retired agents). */+ missing: string[];+}++export function meetingProgress(+ meeting: TeamMeeting, agents: readonly SocietyAgent[], summons: Record<string, Summon>, positions: ReadonlyMap<string, Point>,+): MeetingProgress {+ const progress: MeetingProgress = { seated: [], arriving: [], busy: [], missing: [] };+ for (const id of meeting.members) {+ const agent = agents.find((a) => a.agentId === id);+ if (!agent) { progress.missing.push(id); continue; }+ if (agent.state === "working") { progress.busy.push(id); continue; }+ const where = positions.get(id);+ const summon = summons[id];+ // A chair is exact; a member standing at the table's end stops a step short of its point.+ const within = summon?.spotId ? SEATED_WITHIN_M : STANDING_WITHIN_M;+ if (where && summon && Math.hypot(where.x - summon.target.x, where.z - summon.target.z) <= within) progress.seated.push(id);+ else progress.arriving.push(id);+ }+ return progress;+}++/** Minutes left in a meeting, rounded up; 0 once it is over. */+export function minutesLeft(meeting: TeamMeeting, nowMs: number): number {+ return Math.max(0, Math.ceil((meeting.untilMs - nowMs) / 60_000));+}diff --git a/jarvis/ui/web/frontend/src/components/society/office/teamRoom.css b/jarvis/ui/web/frontend/src/components/society/office/teamRoom.cssnew file mode 100644index 0000000000..26d8408c0c--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/society/office/teamRoom.css@@ -0,0 +1,24 @@+/* Team room panel: theme tokens only, so light and dark mode both work. Member badges use each agent's own colour. */+.team-cards { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px; }+.team-card { display:flex; flex-direction:column; gap:7px; padding:9px 10px; border:1px solid hsl(var(--border)); border-radius:11px; background:hsl(var(--background) / .6); }+.team-card[data-meeting] { border-color:hsl(var(--success) / .7); box-shadow:inset 3px 0 0 hsl(var(--success)); }+.team-card-head { display:flex; flex-direction:column; gap:1px; min-width:0; }+.team-card-name { font-size:13px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }+.team-badges { display:flex; flex-wrap:wrap; gap:4px; }+.team-badge { position:relative; display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; color:#fff; font-size:10px; font-weight:700; letter-spacing:.02em; text-shadow:0 1px 1px rgb(0 0 0 / .35); box-shadow:inset 0 0 0 1px rgb(0 0 0 / .15); }+.team-badge .office-dot { position:absolute; right:-1px; bottom:-1px; width:9px; height:9px; box-shadow:0 0 0 2px hsl(var(--popover)); }+.team-badge .office-dot[data-state="paused"] { background:hsl(var(--popover)); box-shadow:0 0 0 2px hsl(var(--popover)), inset 0 0 0 1.5px hsl(var(--muted-foreground)); }+.team-editor, .team-composer, .team-picker { display:flex; flex-direction:column; gap:7px; }+.team-composer { padding-top:4px; border-top:1px solid hsl(var(--border)); }+.team-picker .office-actions { align-items:center; }+.team-picker .office-mini:disabled { opacity:.5; cursor:not-allowed; }+.team-picker-count { margin-left:auto; }+.team-picker-title { flex:none; max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:hsl(var(--muted-foreground)); }+.team-picker .office-list { max-height:190px; }+.team-danger { border-color:hsl(var(--destructive)); color:hsl(var(--destructive)); font-weight:600; }+.team-danger:hover:not(:disabled) { background:hsl(var(--destructive) / .1); }+.team-meeting { display:flex; flex-direction:column; gap:5px; padding:9px 10px; border-radius:11px; border:1px solid hsl(var(--success) / .55); background:hsl(var(--success) / .1); }+.team-meeting-title { display:flex; align-items:center; gap:7px; font-weight:700; overflow-wrap:anywhere; }+.team-meeting-live { flex:none; width:8px; height:8px; border-radius:50%; background:hsl(var(--success)); animation:team-live 1.6s ease-in-out infinite; }+@keyframes team-live { 50% { opacity:.35; } }+@media (prefers-reduced-motion: reduce) { .team-meeting-live { animation:none; } }diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json b/jarvis/ui/web/frontend/src/i18n/locales/society/de.jsonindex ee43f2f05f..c29a0929df 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/de.json@@ -752,14 +752,37 @@"action_show": "Zeigen","action_open": "Öffnen","manage_action": "Agentenverwaltung öffnen",- "team_body": "Wähle mindestens zwei Agenten und bündle sie zu einem Team mit gemeinsamem Chat. Sie treffen sich sofort am Tisch.",+ "team_body": "Wähle mindestens zwei Agenten. Das Team bekommt einen gemeinsamen Chat und trifft sich sofort am Tisch.","team_name": "Teamname","team_name_placeholder": "z. B. Launch-Crew",- "team_create": "Team erstellen ({0})",+ "team_create": "Team erstellen und treffen ({0})","team_created": "Team „{0}“ ist bereit.",- "team_open": "Team-Chat öffnen",- "team_existing": "Bestehende Teams",- "team_gather": "Versammeln",+ "team_yours": "Deine Teams",+ "team_none": "Noch keine Teams. Stell unten eins zusammen.",+ "team_members": "{0} Mitglieder",+ "team_working": "{0} arbeiten",+ "team_meet": "Am Tisch treffen",+ "team_meeting_now": "Im Meeting",+ "team_chat": "Team-Chat",+ "team_edit": "Bearbeiten",+ "team_save": "Speichern",+ "team_cancel": "Abbrechen",+ "team_delete": "Team löschen",+ "team_delete_confirm": "Wirklich löschen?",+ "team_new": "Neues Team",+ "team_search": "Agent suchen",+ "team_pick_idle": "Alle freien Agenten",+ "team_pick_clear": "Leeren",+ "team_selected": "{0} ausgewählt",+ "team_no_match": "Kein Agent passt.",+ "team_edit_need_more": "Ein Team braucht mindestens zwei Agenten.",+ "team_load_error": "Teams konnten nicht geladen werden: {0}",+ "meeting_title": "Meeting: {0}",+ "meeting_status": "{0} von {1} am Tisch · noch {2} Min.",+ "meeting_busy": "Arbeiten gerade und bleiben am Platz: {0}",+ "meeting_join": "Zum Tisch gehen",+ "meeting_end": "Meeting beenden",+ "team_live": "Läuft","wardrobe_name": "Dein Name","you": "Du","wardrobe_body": "Kleide dich oder einen Agenten ein: Outfit, Farben, Frisur und Brille.",@@ -774,7 +797,7 @@"cp_manage": "Agenten-Board","cp_manage_hint": "Alle Agenten sehen und verwalten","cp_team": "Teamraum",- "cp_team_hint": "Agenten zu einem Team bündeln",+ "cp_team_hint": "Deine Teams und ihre Meetings","cp_wardrobe": "Garderobe","cp_wardrobe_hint": "Deine Figur ändern","cp_lead": "Chefbüro",@@ -916,7 +939,7 @@"break_called": "Unterwegs: {0}","call_sent": "{0} kommt rüber.","show_agent": "{0} auf der Karte zeigen",- "team_gather_label": "{0} am Tisch versammeln",+ "team_gather_label": "Mit {0} am Tisch treffen","team_open_label": "Chat von {0} öffnen","team_need_more": "Wähle mindestens zwei Agenten, um ein Team zu erstellen.","manage_empty": "Noch keine Agenten. Am Empfang stellst du den ersten ein.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json b/jarvis/ui/web/frontend/src/i18n/locales/society/en.jsonindex e7bf5b9fa8..ee7ea0aae6 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/en.json@@ -752,14 +752,37 @@"action_show": "Show","action_open": "Open","manage_action": "Open agent management",- "team_body": "Pick at least two agents and bundle them into a team with a shared chat. They meet at the table right away.",+ "team_body": "Pick at least two agents. The team gets a shared chat and meets at the table right away.","team_name": "Team name","team_name_placeholder": "e.g. Launch crew",- "team_create": "Create team ({0})",+ "team_create": "Create team and meet ({0})","team_created": "Team “{0}” is ready.",- "team_open": "Open team chat",- "team_existing": "Existing teams",- "team_gather": "Gather",+ "team_yours": "Your teams",+ "team_none": "No teams yet. Put one together below.",+ "team_members": "{0} members",+ "team_working": "{0} working",+ "team_meet": "Meet at the table",+ "team_meeting_now": "In the meeting",+ "team_chat": "Team chat",+ "team_edit": "Edit",+ "team_save": "Save",+ "team_cancel": "Cancel",+ "team_delete": "Delete team",+ "team_delete_confirm": "Really delete?",+ "team_new": "New team",+ "team_search": "Find an agent",+ "team_pick_idle": "All free agents",+ "team_pick_clear": "Clear",+ "team_selected": "{0} selected",+ "team_no_match": "No agent matches.",+ "team_edit_need_more": "A team needs at least two agents.",+ "team_load_error": "Teams could not be loaded: {0}",+ "meeting_title": "Meeting: {0}",+ "meeting_status": "{0} of {1} at the table · {2} min left",+ "meeting_busy": "Working, so they stay at their desk: {0}",+ "meeting_join": "Go to the table",+ "meeting_end": "End meeting",+ "team_live": "Live","wardrobe_name": "Your name","you": "You","wardrobe_body": "Dress yourself or an agent: outfit, colours, hair and glasses.",@@ -774,7 +797,7 @@"cp_manage": "Agent board","cp_manage_hint": "See and manage every agent","cp_team": "Team room",- "cp_team_hint": "Bundle agents into a team",+ "cp_team_hint": "Your teams and their meetings","cp_wardrobe": "Wardrobe","cp_wardrobe_hint": "Change your character","cp_lead": "Lead office",@@ -916,7 +939,7 @@"break_called": "On their way: {0}","call_sent": "{0} is coming over.","show_agent": "Show {0} on the map",- "team_gather_label": "Gather {0} at the table",+ "team_gather_label": "Meet with {0} at the table","team_open_label": "Open the chat of {0}","team_need_more": "Pick at least two agents to create a team.","manage_empty": "No agents yet. Reception hires the first one.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json b/jarvis/ui/web/frontend/src/i18n/locales/society/es.jsonindex 2a57f6c9e4..4660ca1b69 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/es.json@@ -752,14 +752,37 @@"action_show": "Mostrar","action_open": "Abrir","manage_action": "Abrir gestión de agentes",- "team_body": "Elige al menos dos agentes y agrúpalos en un equipo con chat compartido. Se reúnen en la mesa enseguida.",+ "team_body": "Elige al menos dos agentes. El equipo recibe un chat compartido y se reúne en la mesa enseguida.","team_name": "Nombre del equipo","team_name_placeholder": "p. ej. Equipo de lanzamiento",- "team_create": "Crear equipo ({0})",+ "team_create": "Crear equipo y reunirse ({0})","team_created": "El equipo «{0}» está listo.",- "team_open": "Abrir chat del equipo",- "team_existing": "Equipos existentes",- "team_gather": "Reunir",+ "team_yours": "Tus equipos",+ "team_none": "Aún no hay equipos. Forma uno abajo.",+ "team_members": "{0} miembros",+ "team_working": "{0} trabajando",+ "team_meet": "Reunirse en la mesa",+ "team_meeting_now": "En la reunión",+ "team_chat": "Chat del equipo",+ "team_edit": "Editar",+ "team_save": "Guardar",+ "team_cancel": "Cancelar",+ "team_delete": "Eliminar equipo",+ "team_delete_confirm": "¿Eliminar de verdad?",+ "team_new": "Nuevo equipo",+ "team_search": "Buscar un agente",+ "team_pick_idle": "Todos los agentes libres",+ "team_pick_clear": "Vaciar",+ "team_selected": "{0} seleccionados",+ "team_no_match": "Ningún agente coincide.",+ "team_edit_need_more": "Un equipo necesita al menos dos agentes.",+ "team_load_error": "No se pudieron cargar los equipos: {0}",+ "meeting_title": "Reunión: {0}",+ "meeting_status": "{0} de {1} en la mesa · quedan {2} min",+ "meeting_busy": "Están trabajando y se quedan en su puesto: {0}",+ "meeting_join": "Ir a la mesa",+ "meeting_end": "Terminar la reunión",+ "team_live": "En curso","wardrobe_name": "Tu nombre","you": "Tú","wardrobe_body": "Viste a tu personaje o a un agente: atuendo, colores, peinado y gafas.",@@ -774,7 +797,7 @@"cp_manage": "Tablero de agentes","cp_manage_hint": "Ver y gestionar todos los agentes","cp_team": "Sala de equipos",- "cp_team_hint": "Agrupar agentes en un equipo",+ "cp_team_hint": "Tus equipos y sus reuniones","cp_wardrobe": "Vestuario","cp_wardrobe_hint": "Cambiar tu personaje","cp_lead": "Despacho del líder",@@ -916,7 +939,7 @@"break_called": "En camino: {0}","call_sent": "{0} viene hacia ti.","show_agent": "Mostrar a {0} en el mapa",- "team_gather_label": "Reunir a {0} en la mesa",+ "team_gather_label": "Reunirse con {0} en la mesa","team_open_label": "Abrir el chat de {0}","team_need_more": "Elige al menos dos agentes para crear un equipo.","manage_empty": "Aún no hay agentes. En recepción contratas al primero.",