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): sit in Mission Control's boss chair and see the monitors first person
rubenluetke10-beepfd35285938f4
diff --git a/jarvis/ui/web/frontend/src/components/society/office/CommandOffice.tsx b/jarvis/ui/web/frontend/src/components/society/office/CommandOffice.tsxindex 9e0a1c110e..03fad7b7f4 100644--- a/jarvis/ui/web/frontend/src/components/society/office/CommandOffice.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/CommandOffice.tsx@@ -14,6 +14,7 @@* stay inside their FURNITURE_SIZE box.*/import { useEffect, useMemo, useRef, useState, type RefObject } from "react";+import { Html } from "@react-three/drei";import { useFrame, type ThreeEvent } from "@react-three/fiber";import { CanvasTexture, CylinderGeometry, MeshBasicMaterial, MeshStandardMaterial, Quaternion, SRGBColorSpace, Vector3, type Group } from "three";import { useT } from "@/i18n";@@ -21,8 +22,8 @@ import { useWorkspacePanesStore } from "@/store/workspacePanes";import type { AgentRunState } from "../data";import { Box, MAT, matte, Rounded } from "./OfficeFurniture";import { paneOccupants } from "./codingFloor";-import { TaskChair } from "./OfficeChairs";import { COMMAND_DESK, COMMAND_DESK_OFFSET, type Furniture, type FurnitureKind } from "./officeLayout";+import { useLeadSeat } from "./leadSeat";import { MissionLiveScreen, preloadMissionScreens } from "./MissionScreens";import { useOfficeStore, type MonitorSection } from "./officeStore";@@ -328,12 +329,100 @@ const DESK_Z = -COMMAND_DESK_OFFSET;const CHAIR_Z = DESK_Z + COMMAND_DESK.chairZ;const MUG = new CylinderGeometry(0.04, 0.036, 0.1, 16);+/** The boss chair's leather and chrome. */+const BOSS = {+ leather: new MeshStandardMaterial({ color: "#17181b", roughness: 0.42, metalness: 0.05 }),+ seam: new MeshStandardMaterial({ color: "#0c0d0f", roughness: 0.6 }),+ chrome: new MeshStandardMaterial({ color: "#d4d8de", roughness: 0.16, metalness: 0.95 }),+ caster: new MeshStandardMaterial({ color: "#101113", roughness: 0.5 }),+};+const GAS_LIFT = new CylinderGeometry(0.032, 0.032, 0.26, 16);+const SHROUD = new CylinderGeometry(0.055, 0.075, 0.1, 20);+/** Mission Control's chair is a seat the person can take (leadSeat); its id is the desk's. */+const COMMAND_SEAT = "command";++/**+ * A high-back executive chair in black leather on a polished five-star base:+ * a thick seat, four channel-stitched back cushions leaning back, a headrest,+ * side bolsters and chrome armrests with leather pads. Local space: seat on+ * the floor at the origin, the sitter faces -z, the back is on the +z side.+ */+function BossChair() {+ return (+ <group>+ {/* Chrome star base with casters, a shroud and the gas lift. */}+ {[0, 1, 2, 3, 4].map((i) => (+ <group key={i} rotation={[0, (i * Math.PI * 2) / 5 + Math.PI / 5, 0]}>+ <Box size={[0.055, 0.035, 0.33]} position={[0, 0.085, 0.165]} material={BOSS.chrome} />+ <Box size={[0.05, 0.06, 0.07]} position={[0, 0.03, 0.31]} material={BOSS.caster} cast={false} />+ </group>+ ))}+ <mesh geometry={SHROUD} material={BOSS.leather} position={[0, 0.14, 0]} castShadow />+ <mesh geometry={GAS_LIFT} material={BOSS.chrome} position={[0, 0.27, 0]} castShadow />+ {/* Seat: a thick cushion on a dark frame, a stitch line round its top. */}+ <Box size={[0.5, 0.04, 0.46]} position={[0, 0.4, 0]} material={BOSS.seam} />+ <Rounded size={[0.62, 0.13, 0.58]} radius={0.055} position={[0, 0.48, -0.01]} material={BOSS.leather} />+ <Box size={[0.52, 0.006, 0.48]} position={[0, 0.547, -0.01]} material={BOSS.seam} cast={false} />+ {/* High back, leaning back: a shell, four stitched cushions, bolsters, the headrest. */}+ <group position={[0, 0.56, 0.27]} rotation={[0.14, 0, 0]}>+ <Rounded size={[0.6, 0.94, 0.07]} radius={0.04} position={[0, 0.47, 0.05]} material={BOSS.leather} />+ {[0.14, 0.34, 0.54, 0.74].map((y) => (+ <Rounded key={y} size={[0.48, 0.19, 0.1]} radius={0.045} position={[0, y, -0.01]} material={BOSS.leather} />+ ))}+ {[-0.28, 0.28].map((x) => (+ <Rounded key={x} size={[0.07, 0.86, 0.13]} radius={0.03} position={[x, 0.45, 0.0]} material={BOSS.leather} />+ ))}+ <Rounded size={[0.42, 0.18, 0.12]} radius={0.05} position={[0, 0.98, 0.0]} material={BOSS.leather} />+ </group>+ {/* Chrome loop armrests with leather pads. */}+ {[-0.34, 0.34].map((x) => (+ <group key={x}>+ <Box size={[0.03, 0.26, 0.03]} position={[x, 0.6, 0.12]} material={BOSS.chrome} />+ <Box size={[0.03, 0.2, 0.03]} position={[x, 0.58, -0.14]} material={BOSS.chrome} />+ <Rounded size={[0.08, 0.05, 0.36]} radius={0.02} position={[x, 0.74, -0.01]} material={BOSS.leather} />+ </group>+ ))}+ </group>+ );+}++/**+ * The chair behind the desk: click it (or press E beside it) to sit down. While+ * seated the camera looks through the person's eyes at the monitors, so the+ * chair steps out of the way; any movement stands them up again.+ */function ExecutiveChair() {- // The person faces north, towards the monitors: the chair's back is on its +z side,- // which is the task chair's own orientation.+ const t = useT();+ const seated = useLeadSeat((s) => s.seated === COMMAND_SEAT);+ const near = useLeadSeat((s) => s.near === COMMAND_SEAT);+ const hovered = useRef(false);+ useEffect(() => () => { if (hovered.current) document.body.style.cursor = ""; }, []);+ const takeSeat = (event: ThreeEvent<MouseEvent>) => {+ if (event.delta > 6) return;+ event.stopPropagation();+ const at = new Vector3(0, 0, CHAIR_Z);+ event.eventObject.parent?.localToWorld(at);+ useLeadSeat.getState().set({ pending: COMMAND_SEAT });+ useOfficeStore.getState().requestWalk({ x: at.x, z: at.z });+ };return (<group position={[0, 0, CHAIR_Z]}>- <TaskChair />+ <group visible={!seated} onClick={takeSeat}+ onPointerOver={(event) => { event.stopPropagation(); hovered.current = true; document.body.style.cursor = "pointer"; }}+ onPointerOut={() => { hovered.current = false; document.body.style.cursor = ""; }}>+ <BossChair />+ </group>+ {near && !seated && (+ <Html center position={[0, 1.75, 0]} zIndexRange={[24, 0]}>+ <span className="office-plate office-seat-prompt" data-office-ui><kbd>E</kbd>{t("society.office.seat_sit")}</span>+ </Html>+ )}+ {seated && (+ // In first person this floats just under the monitors, where the eyes are.+ <Html center position={[0, 0.86, -0.42]} zIndexRange={[24, 0]}>+ <span className="office-plate office-seat-prompt" data-office-ui>{t("society.office.seat_seated_mission")}</span>+ </Html>+ )}</group>);}diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeCameraRig.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeCameraRig.tsxindex 03e397e0b8..f036d2b1a6 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeCameraRig.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeCameraRig.tsx@@ -3,15 +3,18 @@* rotate and zoom; in follow mode the orbit target glides after the* character, so zooming out turns the same view into an overview without a* mode switch. A right-drag pan or a fly-to leaves follow mode; moving the- * character re-enters it.+ * character re-enters it. Seated at Mission Control's desk the camera glides+ * into the character's eyes (first person onto the monitors) and back out+ * when it stands up.*/import { useEffect, useRef } from "react";import { OrbitControls } from "@react-three/drei";import { useFrame, useThree } from "@react-three/fiber";-import { MOUSE, Vector3 } from "three";+import { MOUSE, Vector3, type PerspectiveCamera } from "three";import type { OrbitControls as OrbitControlsImpl } from "three-stdlib";import { cameraHome, CAMERA_LIMITS, HOME_PITCH_RAD, HOME_YAW_RAD } from "./officeCamera";-import type { OfficeLayout } from "./officeLayout";+import { seatOf, type OfficeLayout } from "./officeLayout";+import { useLeadSeat } from "./leadSeat";import { cameraView, officeSession, player, useOfficeStore } from "./officeStore";/** Where the camera starts: close behind the character, south-east, looking down. */@@ -21,6 +24,12 @@ const TARGET_HEIGHT = 0.8;export const ZOOM_SECONDS = 1.15;/** Monitor screen size in metres (see LiveMonitors): the dive ends with it filling the view. */const SCREEN_W = 0.66, SCREEN_H = 0.38;+/**+ * First person at Mission Control: eye height, how far behind the seat centre+ * the eyes sit, the height looked at, a wider lens so all three monitors fit,+ * and how long the glide in and out takes.+ */+const FIRST_PERSON = { eyeY: 1.2, back: 0.3, lookY: 1.08, lookAhead: 0.2, fov: 64, seconds: 0.7 };/** How far in front of a screen the camera must stand for the screen to fill the view. */export function screenFillDistance(fovDeg: number, aspect: number, width = SCREEN_W, height = SCREEN_H): number {@@ -41,6 +50,10 @@ export function OfficeCameraRig({ layout, overview }: { layout: OfficeLayout; ovconst dive = useRef<{ fromEye: Vector3; toEye: Vector3; fromTarget: Vector3; toTarget: Vector3; t: number } | null>(null);const flight = useRef<{ from: Vector3; to: Vector3; t: number } | null>(null);const desired = useRef(new Vector3());+ // First person: 0 = the normal view, 1 = the character's eyes; the view it left is kept to glide back to.+ const seated = useRef<{ blend: number; before: { position: Vector3; target: Vector3; fov: number } | null }>({ blend: 0, before: null });+ const eye = useRef(new Vector3());+ const look = useRef(new Vector3());const delta = useRef(new Vector3());// Remember the view when leaving: the pose before a dive, never the inside of a monitor.@@ -114,6 +127,39 @@ export function OfficeCameraRig({ layout, overview }: { layout: OfficeLayout; ovcameraView.ready = true;const dt = Math.min(rawDt, 0.1);const store = useOfficeStore.getState();+ // Seated at Mission Control: glide into first person, and back out on standing up.+ const desk = layout.command;+ const inSeat = !!desk && useLeadSeat.getState().seated === desk.id;+ const fp = seated.current;+ // A monitor dive from the chair runs as usual, starting from the eyes.+ const diving = !!dive.current || (!!store.zoom && store.zoom.seq !== lastZoom.current);+ if (desk && (inSeat || fp.blend > 0) && !diving) {+ const lensCam = camera as PerspectiveCamera;+ if (inSeat && !fp.before) fp.before = { position: camera.position.clone(), target: c.target.clone(), fov: lensCam.fov };+ fp.blend = Math.min(1, Math.max(0, fp.blend + ((inSeat ? 1 : -1) * dt) / FIRST_PERSON.seconds));+ const e = fp.blend < 0.5 ? 4 * fp.blend ** 3 : 1 - (-2 * fp.blend + 2) ** 3 / 2;+ const before = fp.before;+ if (before) {+ const seat = seatOf(desk);+ const dx = Math.sin(seat.facing), dz = Math.cos(seat.facing);+ eye.current.set(seat.x - dx * FIRST_PERSON.back, FIRST_PERSON.eyeY, seat.z - dz * FIRST_PERSON.back);+ look.current.set(desk.x + dx * FIRST_PERSON.lookAhead, FIRST_PERSON.lookY, desk.z + dz * FIRST_PERSON.lookAhead);+ camera.position.lerpVectors(before.position, eye.current, e);+ c.target.lerpVectors(before.target, look.current, e);+ lensCam.fov = before.fov + (FIRST_PERSON.fov - before.fov) * e;+ lensCam.updateProjectionMatrix();+ camera.lookAt(c.target);+ }+ // Orbit limits would pull the camera out of the chair; the controls rest until the glide back ends.+ c.enabled = false;+ if (fp.blend === 0) {+ if (before) { lensCam.fov = before.fov; lensCam.updateProjectionMatrix(); }+ fp.before = null;+ c.enabled = true;+ c.update();+ }+ return;+ }if (store.zoom && store.zoom.seq !== lastZoom.current) {lastZoom.current = store.zoom.seq;flight.current = null;diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficePlayer.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficePlayer.tsxindex aa0b8d96d3..8e7a8266e3 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficePlayer.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficePlayer.tsx@@ -17,7 +17,7 @@ import { officeSession, player, sameSelection, useOfficeStore, type Selection }import { agentPositions, bodiesExcept, companions } from "./walkerRegistry";import { OFFICE_FIGURE_HEIGHT_M } from "./OfficeAgents";import { seatOf, type OfficeLayout } from "./officeLayout";-import { chairInReach, useLeadSeat } from "./leadSeat";+import { chairInReach, seatDesks, useLeadSeat } from "./leadSeat";import { useOfficeDog } from "./dogLife";import { TreatBone } from "./dogProps";import { isRunning, useOfficeSettings } from "./officeSettings";@@ -139,6 +139,8 @@ export function OfficePlayer({ layout, grid, look, name, awake, reduced }: {}, []);const onJump = useMemo(() => () => pressJump(jump), [jump]);const hasBone = useOfficeDog((s) => s.hasBone);+ // Seated at Mission Control the camera is the character's eyes: its own figure would block the view.+ const firstPerson = useLeadSeat((s) => !!layout.command && s.seated === layout.command.id);const { pressed, run, jumpHeld } = useMoveKeys(awake, interact, onJump);// Arrive by the elevator once per app run; coming back to the map keeps the@@ -159,7 +161,7 @@ export function OfficePlayer({ layout, grid, look, name, awake, reduced }: {// Sitting on the lead's chair: hold the seat until the person moves, walks// somewhere else or presses E; then step out to the nearest free spot.const seatState = useLeadSeat.getState();- const seatDesk = seatState.seated ? layout.lead.desks.find((d) => d.id === seatState.seated) : undefined;+ const seatDesk = seatState.seated ? seatDesks(layout).find((d) => d.id === seatState.seated) : undefined;const walkRequested = !!store.walkTo && store.walkTo.seq !== lastWalk.current;if (seatState.seated && (!seatDesk || pressed.current.size > 0 || walkRequested)) seatState.set({ seated: null, standUp: true });if (useLeadSeat.getState().standUp) {@@ -183,7 +185,7 @@ export function OfficePlayer({ layout, grid, look, name, awake, reduced }: {}// Clicked the chair from afar: sit as soon as the walk there ends beside it.if (seatState.pending) {- const target = layout.lead.desks.find((d) => d.id === seatState.pending);+ const target = seatDesks(layout).find((d) => d.id === seatState.pending);if (!target || pressed.current.size > 0) seatState.set({ pending: null });else if (player.path.length === 0 && chairInReach([target], player)) seatState.set({ seated: target.id, pending: null });}@@ -251,7 +253,7 @@ export function OfficePlayer({ layout, grid, look, name, awake, reduced }: {if (ring.current) ring.current.scale.setScalar(1 - Math.min(0.35, jump.y * 0.6));if (ring.current) (ring.current.material as MeshBasicMaterial).opacity = reduced ? 0.8 : 0.6 + Math.sin(performance.now() / 400) * 0.2;// What can the character reach right now? The lead's chair has its own prompt beside it.- const chair = chairInReach(layout.lead.desks, player);+ const chair = chairInReach(seatDesks(layout), player);if (useLeadSeat.getState().near !== (chair?.id ?? null)) useLeadSeat.getState().set({ near: chair?.id ?? null });const nearby = chair ? null : nearestInteractable(layout);// Compared with the store too: a floor switch clears the store's reading while the character still stands at the elevator.@@ -259,19 +261,21 @@ export function OfficePlayer({ layout, grid, look, name, awake, reduced }: {});return (- <group ref={group}>+ <group ref={group} visible={!firstPerson}><mesh ref={ring} rotation={[-Math.PI / 2, 0, 0]} position={[0, 0.02, 0]}><ringGeometry args={[0.42, 0.52, 40]} /><meshBasicMaterial color="#f5b83d" transparent opacity={0.8} side={DoubleSide} depthWrite={false} /></mesh><group ref={body}><ToyFigure look={look} drive={drive} paused={!awake} heightM={OFFICE_FIGURE_HEIGHT_M} holding={hasBone ? <TreatBone scale={1.15} /> : undefined} />- <Html center position={[0, OFFICE_FIGURE_HEIGHT_M + 0.35, 0]} zIndexRange={[25, 0]}>- <span className="office-plate office-plate-player" data-office-ui>- <span className="office-plate-badge" style={{ background: "#f5b83d" }} aria-hidden>★</span>- <span className="office-plate-name">{name}</span>- </span>- </Html>+ {!firstPerson && (+ <Html center position={[0, OFFICE_FIGURE_HEIGHT_M + 0.35, 0]} zIndexRange={[25, 0]}>+ <span className="office-plate office-plate-player" data-office-ui>+ <span className="office-plate-badge" style={{ background: "#f5b83d" }} aria-hidden>★</span>+ <span className="office-plate-name">{name}</span>+ </span>+ </Html>+ )}</group></group>);diff --git a/jarvis/ui/web/frontend/src/components/society/office/leadSeat.test.ts b/jarvis/ui/web/frontend/src/components/society/office/leadSeat.test.tsindex a168d2d8d9..38cafdc391 100644--- a/jarvis/ui/web/frontend/src/components/society/office/leadSeat.test.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/leadSeat.test.ts@@ -1,7 +1,7 @@import { describe, expect, it } from "vitest";import { buildOfficeLayout, seatOf, type OfficeAgentInput } from "./officeLayout";import { buildNavGrid, findPath, isWalkable } from "./officeNav";-import { chairInReach, SEAT_REACH } from "./leadSeat";+import { chairInReach, SEAT_REACH, seatDesks } from "./leadSeat";const lead: OfficeAgentInput = { agentId: "lead", name: "Lead", tier: "lead", providerLabel: "", state: "idle", createdMs: 1 };const staff: OfficeAgentInput = { agentId: "s1", name: "S1", tier: "specialist", providerLabel: "codex", state: "idle", createdMs: 2 };@@ -34,3 +34,27 @@ describe("the lead's executive chair", () => {expect(layout.furniture.some((f) => f.kind === "dogBed" && f.room === "lead")).toBe(true);});});++describe("Mission Control's boss chair", () => {+ const layout = buildOfficeLayout([staff], { variant: "coding" });+ const grid = buildNavGrid(layout);+ const desk = layout.command!;+ const seat = seatOf(desk);++ it("is a seat on the coding floor only, facing the monitors (south)", () => {+ expect(desk.id).toBe("command");+ expect(buildOfficeLayout([lead, staff]).command).toBeUndefined();+ expect(seatDesks(layout)).toEqual([desk]);+ // The person sits north of the desk, between it and the wall, looking south at the monitors.+ expect(seat.z).toBeLessThan(desk.z);+ expect(seat.facing).toBe(0);+ });++ it("is solid, yet reachable to sit down, and within reach only from close by", () => {+ expect(isWalkable(grid, seat)).toBe(false);+ const path = findPath(grid, layout.spawn, seat);+ expect(path).not.toBeNull();+ expect(chairInReach(seatDesks(layout), { x: seat.x + 0.7, z: seat.z })?.id).toBe("command");+ expect(chairInReach(seatDesks(layout), { x: seat.x + SEAT_REACH + 0.2, z: seat.z })).toBeNull();+ });+});diff --git a/jarvis/ui/web/frontend/src/components/society/office/leadSeat.ts b/jarvis/ui/web/frontend/src/components/society/office/leadSeat.tsindex e1c346f0ef..5e4cd64e0e 100644--- a/jarvis/ui/web/frontend/src/components/society/office/leadSeat.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/leadSeat.ts@@ -1,13 +1,15 @@/**- * The person's character can take the lead's executive chair: walk up and press- * E (or click the chair), sit, then click the monitors to open the lead agent.+ * The person's character can take an executive chair: the lead's downstairs,+ * Mission Control's upstairs. Walk up and press E (or click the chair), sit,+ * then click the monitors (the lead agent, or the Mission Control panel).+ * Seated at Mission Control the view turns first person onto its monitors.* Any movement stands the character up again.*- * Kept apart from the general office store: only the executive chair is- * sittable, and its prompt lives in the scene next to the chair.+ * Kept apart from the general office store: only executive chairs are+ * sittable, and each chair's prompt lives in the scene next to it.*/import { create } from "zustand";-import { seatOf, type DeskSlot, type Point } from "./officeLayout";+import { seatOf, type DeskSlot, type OfficeLayout, type Point } from "./officeLayout";/** How close the character must stand to the chair to sit down with E, in metres. */export const SEAT_REACH = 1.1;@@ -32,7 +34,12 @@ export const useLeadSeat = create<LeadSeatState>((set) => ({set: (patch) => set((s) => (Object.entries(patch).every(([k, v]) => s[k as keyof typeof patch] === v) ? s : patch)),}));-/** The lead chair within reach of `at`, if any (lead desks carry a size; bench desks never do). */+/** Every desk whose chair the person can take on this floor: the lead desks, and Mission Control's. */+export function seatDesks(layout: Pick<OfficeLayout, "lead" | "command">): DeskSlot[] {+ return layout.command ? [...layout.lead.desks, layout.command] : layout.lead.desks;+}++/** The executive chair within reach of `at`, if any (sittable desks carry a size; bench desks never do). */export function chairInReach(desks: readonly DeskSlot[], at: Point): DeskSlot | null {let best: DeskSlot | null = null;let bestDistance = SEAT_REACH;diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.tsindex 32f46b5372..e1b0dde218 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts@@ -173,8 +173,9 @@ describe("office layout", () => {const chairZ = deskZ - COMMAND_DESK.chairZ;expect(isWalkable(grid, { x: stop.x, z: deskZ })).toBe(false);expect(isWalkable(grid, { x: stop.x, z: chairZ })).toBe(false);- expect(isWalkable(grid, { x: stop.x + 0.75, z: chairZ })).toBe(true);- expect(isWalkable(grid, { x: stop.x - 0.75, z: chairZ })).toBe(true);+ // Beside the chair, a step back from the desk edge, the floor is open on both sides.+ expect(isWalkable(grid, { x: stop.x + 0.75, z: chairZ - 0.25 })).toBe(true);+ expect(isWalkable(grid, { x: stop.x - 0.75, z: chairZ - 0.25 })).toBe(true);expect(isWalkable(grid, stop.approach!)).toBe(true);});diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.tsindex 1a8b460ff6..5fc04dac07 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts@@ -149,7 +149,7 @@ export const FURNITURE_SIZE: Record<FurnitureKind, { w: number; d: number; h: nu// Mission Control: a display on a floor stand; the box is the screen's width and the base plate's depth.commandWall: { w: 7.8, d: 0.3, h: 2.7, solid: true },// Desk and chair together; not a solid box, navigation walks round commandDeskObstacles.- commandDesk: { w: 2.8, d: 2.1, h: 1.45, solid: false },+ commandDesk: { w: 2.8, d: 2.1, h: 1.7, solid: false },// Server room: a row of five 42U racks, its ladder tray on top; the aisle between two rows (floor tiles,// overhead trays, a light) is walkable; the NOC console includes its stool.serverRack: { w: 3.0, d: 1.0, h: 2.3, solid: true },@@ -187,6 +187,8 @@ export interface OfficeLayout {departments: Department[];/** Lead desks live in the lead office; the coding floor has none (its rect is Mission Control). */lead: Rect & { desks: DeskSlot[] };+ /** Mission Control's desk on the coding floor, as a seat the person can take; absent downstairs. */+ command?: DeskSlot;rooms: Room[];walls: WallSegment[];furniture: Furniture[];@@ -228,7 +230,8 @@ const AISLE = 3.2;* from. On the floor the desk is turned round, so the chair stands between* it and the wall. The renderer and navigation both read these numbers.*/-export const COMMAND_DESK = { w: 2.6, d: 0.86, chairZ: 0.72 } as const;+/** `chairZ` equals SEAT_OFFSET, so the chair is exactly where seatOf() puts a seated person. */+export const COMMAND_DESK = { w: 2.6, d: 0.86, chairZ: 0.62 } as const;/** How far round Mission Control's desk the person can use it, from the desk's centre. */export const COMMAND_REACH = 1.9;/** The desk piece's origin sits this far from the desk's centre, towards the chair: its box covers desk and chair. */@@ -373,11 +376,12 @@ export function chairRect(seat: Point, half = CHAIR_HALF): Rect {/** What a walker bumps into at Mission Control's desk: the desk top and the chair, nothing in between. */export function commandDeskObstacles(desk: Point): Rect[] {- const { w, d, chairZ } = COMMAND_DESK;+ const { w, d } = COMMAND_DESK;return [{ minX: desk.x - w / 2, maxX: desk.x + w / 2, minZ: desk.z - d / 2, maxZ: desk.z + d / 2 },- // The desk is turned round on the floor: its chair stands north of it, towards the wall.- chairRect({ x: desk.x, z: desk.z - chairZ }),+ // The desk is turned round on the floor, facing south: its chair stands north of it,+ // towards the wall (seatOf). A boss chair, so it takes the executive chair's footprint.+ executiveChairRect({ x: desk.x, z: desk.z, facing: "south" }),];}@@ -717,6 +721,9 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:};return {variant, departments, lead, rooms, walls, furniture, spots, checkpoints, obstacles,+ // Its chair faces south, towards the door: seatOf() puts the person north of the desk.+ ...(coding ? { command: { id: "command", x: commandDeskAt.x, z: commandDeskAt.z, facing: "south" as const, agentId: null,+ size: { w: COMMAND_DESK.w, d: COMMAND_DESK.d } } } : {}),spawn: { x: rx0 + 1.4, z: bottomZ - 2.6 },floor,bounds: { minX: minX - EDGE, maxX: maxX + EDGE, minZ: topZ - EDGE, maxZ: bottomZ + EDGE },diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json b/jarvis/ui/web/frontend/src/i18n/locales/society/de.jsonindex 3e3b12b43f..61a5df6fa5 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/de.json@@ -991,6 +991,7 @@"dog_pet": "Hund streicheln","seat_sit": "Auf den Sessel setzen","seat_seated": "Klick auf die Bildschirme öffnet deinen Chef-Agenten · bewegen zum Aufstehen",+ "seat_seated_mission": "Klick auf einen Bildschirm öffnet ihn · bewegen zum Aufstehen","prompt_agent": "Mit {0} sprechen","prompt_checkpoint": "Benutzen: {0}","me": "Mir folgen",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json b/jarvis/ui/web/frontend/src/i18n/locales/society/en.jsonindex 6880dc1e0b..858adbe218 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/en.json@@ -991,6 +991,7 @@"dog_pet": "Pet the dog","seat_sit": "Sit in the chair","seat_seated": "Click the screens to open your lead · move to stand up",+ "seat_seated_mission": "Click a screen to open it · move to stand up","prompt_agent": "Talk to {0}","prompt_checkpoint": "Use: {0}","me": "Follow me",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json b/jarvis/ui/web/frontend/src/i18n/locales/society/es.jsonindex 61f5057f48..a9f5be86d1 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/es.json@@ -991,6 +991,7 @@"dog_pet": "Acariciar al perro","seat_sit": "Sentarse en el sillón","seat_seated": "Haz clic en las pantallas para abrir tu líder · muévete para levantarte",+ "seat_seated_mission": "Haz clic en una pantalla para abrirla · muévete para levantarte","prompt_agent": "Hablar con {0}","prompt_checkpoint": "Usar: {0}","me": "Seguirme",