Skip to content

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

fix(office): restore the bench planters and desk dressing the team-room commit dropped

rubenluetke10-beep0d58a046abca
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx
index 19262d45b9..db7148e7da 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeScene.tsx
@@ -12,6 +12,7 @@ import type { SocietyAgent } from "../data";
import type { ToyLook } from "./toyFigureModel";
import { Railing, SignWall } from "./OfficeFurniture";
import { DeskInstances } from "./DeskInstances";
+import { DeskDressing } from "./DeskDressing";
import { CodingSlab, CodingStudio } from "./CodingFloorLook";
import { ExecutiveDesks, LeadOfficeLight } from "./LeadSuite";
import { LiveMonitors } from "./LiveMonitors";
@@ -257,7 +258,10 @@ export function OfficeScene({ floor, occupants, ready, layout, grid, walkers, ag
<RoomWalls walls={layout.walls} />
{layout.rooms.map((room) => <RoomSign key={room.id} room={room} label={t(`society.office.room_${room.kind}`)} />)}
{coding
- ? layout.departments.map((dept) => <CodingStudio key={dept.id} dept={dept} agents={agents} />)
+ ? <>
+ {layout.departments.map((dept) => <CodingStudio key={dept.id} dept={dept} agents={agents} />)}
+ <DeskDressing desks={benchDesks} departments={layout.departments} />
+ </>
: <>
{layout.departments.map((dept) => <DepartmentArea key={dept.id} dept={dept} />)}
<DeskInstances desks={benchDesks} agents={agents} zones={zones} />
diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts
index 2c30ef99aa..a310c9d9d7 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts
+++ b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts
@@ -317,6 +317,32 @@ export function deskRect(desk: Pick<DeskSlot, "x" | "z" | "size">): Rect {
return { minX: desk.x - w / 2, maxX: desk.x + w / 2, minZ: desk.z - d / 2, maxZ: desk.z + d / 2 };
}
+/** A planter box at each end of a coding-floor bench: its width, length and the gap to the end desk. */
+export const BENCH_PLANTER = { w: 0.36, d: 1.56, gap: 0.14 } as const;
+
+/**
+ * The planter boxes closing off each bench of a department, west and east,
+ * keyed "<deptId>:<bench>:w|e". They stand in the dead end between the two
+ * desk rows, clear of the chairs and the walkway behind them.
+ */
+export function benchPlanters(dept: Pick<Department, "id" | "desks">): { key: string; rect: Rect }[] {
+ const benches = new Map<string, DeskSlot[]>();
+ for (const desk of dept.desks) {
+ const bench = desk.id.split(":").at(-3) ?? "0";
+ benches.set(bench, [...(benches.get(bench) ?? []), desk]);
+ }
+ const half = DESK_SIZE.w / 2 + BENCH_PLANTER.gap;
+ return [...benches.entries()].flatMap(([bench, desks]) => {
+ const z = desks.reduce((sum, d) => sum + d.z, 0) / desks.length;
+ const west = Math.min(...desks.map((d) => d.x)) - half, east = Math.max(...desks.map((d) => d.x)) + half;
+ const zs = { minZ: z - BENCH_PLANTER.d / 2, maxZ: z + BENCH_PLANTER.d / 2 };
+ return [
+ { key: `${dept.id}:${bench}:w`, rect: { minX: west - BENCH_PLANTER.w, maxX: west, ...zs } },
+ { key: `${dept.id}:${bench}:e`, rect: { minX: east, maxX: east + BENCH_PLANTER.w, ...zs } },
+ ];
+ });
+}
+
/** Half the width of the executive chair; unlike bench chairs it is solid, so nobody walks through it. */
export const EXECUTIVE_CHAIR_HALF = 0.32;
@@ -656,6 +682,8 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:
...departments.map((d) => ({ minX: d.minX + 0.2, maxX: d.maxX - 0.2, minZ: d.minZ + 0.02, maxZ: d.minZ + 0.2 })),
...furniture.filter((f) => FURNITURE_SIZE[f.kind].solid).map(footprint),
...(coding ? commandDeskObstacles(commandDeskAt) : []),
+ // Planter boxes at the bench ends on the coding floor.
+ ...(coding ? departments.flatMap(benchPlanters).map((p) => p.rect) : []),
// The posts of an open room's name arch are solid too; nobody walks through them.
...rooms.filter((r) => !r.walled).flatMap(archPosts).map((p) => ({
minX: p.x - ARCH.post / 2, maxX: p.x + ARCH.post / 2, minZ: p.z - ARCH.post / 2, maxZ: p.z + ARCH.post / 2,