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): ride the elevator from inside the car
rubenluetke10-beepaaaae6b7064d
diff --git a/jarvis/ui/web/frontend/src/components/society/office/ElevatorCar.tsx b/jarvis/ui/web/frontend/src/components/society/office/ElevatorCar.tsxnew file mode 100644index 0000000000..333e3042d4--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/society/office/ElevatorCar.tsx@@ -0,0 +1,183 @@+/**+ * Riding the elevator, from inside the car. Pressing the call button puts the+ * person in the car: its steel side walls, lit ceiling and stone floor frame+ * the stage, and through the open doors they still see the floor they are on.+ * On the wall beside the doors hangs the car's operating panel (a directory+ * plate and one round push button per floor, plus "doors open" to step out+ * again); above the doors the floor indicator. Pressing a floor lights its+ * button, the doors close, the car pulls away with a slight jolt while the+ * indicator counts the floors, it settles, and the doors open on the new+ * floor — then the person steps out.+ *+ * OfficeStage owns the phases and their timing (the floor switches while the+ * doors are shut); this component draws the phase it is given. It is a modal+ * dialog the whole time, so the character stands still (`ownsKeyboard`).+ * Part of the diorama: one palette in light and dark mode. Reduced motion:+ * no stepping in or out, no jolt or counting.+ */+import { useEffect, useRef, useState } from "react";+import { useT } from "@/i18n";+import { floorLevel, OFFICE_FLOORS, type OfficeFloor } from "./officeStore";++export type CarPhase = "boarding" | "closing" | "riding" | "opening" | "leaving";++/** The car's floor buttons, top floor first, like the panel in a real car. */+export const CAR_BUTTONS: readonly OfficeFloor[] = [...OFFICE_FLOORS].reverse();++/** How long the indicator shows each floor while the car moves. */+export const RIDE_STEP_MS = 650;++/** The floor a number key picks ("0" = ground floor), or null. */+export function floorForKey(key: string): OfficeFloor | null {+ const level = /^[0-9]$/.test(key) ? Number(key) : -1;+ return OFFICE_FLOORS[level] ?? null;+}++/** The floor levels a ride passes, from where it starts to where it stops (both included). */+export function rideLevels(from: OfficeFloor, to: OfficeFloor): number[] {+ const a = floorLevel(from), b = floorLevel(to);+ const step = b >= a ? 1 : -1;+ const out: number[] = [];+ for (let level = a; level !== b + step; level += step) out.push(level);+ return out;+}++/** How long the car should at least be under way so the indicator can show every floor it passes. */+export function minRideMs(from: OfficeFloor, to: OfficeFloor): number {+ return Math.max(1, rideLevels(from, to).length - 1) * RIDE_STEP_MS;+}++function Arrow({ down }: { down: boolean }) {+ return (+ <svg viewBox="0 0 24 24" className="office-car-arrow" data-down={down || undefined} aria-hidden>+ <path d="M12 4 L21 15 H3 Z" fill="currentColor" />+ </svg>+ );+}++/** The "doors open" symbol: two arrows pointing away from a centre line. */+function DoorsOpenGlyph() {+ return (+ <svg viewBox="0 0 24 24" aria-hidden>+ <path d="M11 12 L5 7 V17 Z M13 12 L19 7 V17 Z" fill="currentColor" />+ <rect x="11.4" y="5" width="1.2" height="14" fill="currentColor" />+ </svg>+ );+}++export function ElevatorCar({ phase, from, to, reduced, onPick, onLeave }: {+ phase: CarPhase;+ /** The floor the car is boarded on. */+ from: OfficeFloor;+ /** The floor pressed, once a button is pressed. */+ to: OfficeFloor | null;+ reduced: boolean;+ onPick: (floor: OfficeFloor) => void;+ onLeave: () => void;+}) {+ const t = useT();+ const panel = useRef<HTMLDivElement>(null);+ const boarding = phase === "boarding";+ const target = to ?? from;+ const levels = rideLevels(from, target);+ const up = floorLevel(target) > floorLevel(from);++ // The indicator: the boarded floor until the car moves, one floor per RIDE_STEP_MS under way, the stop on arrival.+ const [step, setStep] = useState(0);+ useEffect(() => {+ if (reduced || phase !== "riding") return;+ const timer = window.setInterval(() => setStep((s) => Math.min(levels.length - 1, s + 1)), RIDE_STEP_MS);+ return () => window.clearInterval(timer);+ }, [phase, reduced, levels.length]);+ const index = phase === "opening" || phase === "leaving" || (reduced && phase === "riding") ? levels.length - 1+ : phase === "riding" ? step : 0;+ const level = levels[index] ?? floorLevel(from);++ // Step in with the focus on the first floor button you can press; hand focus back when stepping out.+ useEffect(() => {+ const before = document.activeElement instanceof HTMLElement ? document.activeElement : null;+ panel.current?.querySelector<HTMLButtonElement>("button[data-floor]:not(:disabled)")?.focus({ preventScroll: true });+ return () => { before?.focus({ preventScroll: true }); };+ }, []);++ // Keys belong to the car while it is on screen (capture phase): a floor's number presses it, Escape or E steps out.+ const latest = useRef({ boarding, from, onPick, onLeave });+ latest.current = { boarding, from, onPick, onLeave };+ useEffect(() => {+ const onKey = (event: KeyboardEvent) => {+ const now = latest.current;+ if (event.key === "Escape" || event.code === "KeyE") {+ event.preventDefault(); event.stopPropagation();+ if (!event.repeat && now.boarding) now.onLeave();+ return;+ }+ const picked = event.ctrlKey || event.metaKey || event.altKey ? null : floorForKey(event.key);+ if (picked) {+ event.preventDefault(); event.stopPropagation();+ if (!event.repeat && now.boarding && picked !== now.from) now.onPick(picked);+ return;+ }+ if (event.key === "ArrowUp" || event.key === "ArrowDown") {+ event.preventDefault(); event.stopPropagation();+ const buttons = [...(panel.current?.querySelectorAll<HTMLButtonElement>("button:not(:disabled)") ?? [])];+ if (buttons.length === 0) return;+ const at = buttons.indexOf(document.activeElement as HTMLButtonElement);+ buttons[at < 0 ? 0 : (at + (event.key === "ArrowDown" ? 1 : -1) + buttons.length) % buttons.length].focus();+ }+ };+ document.addEventListener("keydown", onKey, true);+ return () => document.removeEventListener("keydown", onKey, true);+ }, []);++ const caption = to+ ? t(up ? "society.office.riding_up_to" : "society.office.riding_down_to").replace("{0}", t(`society.office.floor_name_${to}`))+ : t("society.office.elevator_choose");+ const moving = phase === "closing" || phase === "riding";+ return (+ <div className="office-car" data-phase={phase} data-direction={up ? "up" : "down"} data-reduced={reduced || undefined} data-office-ui+ role="dialog" data-state="open" aria-modal="true" aria-label={caption}>+ <div className="office-car-body">+ <i className="office-car-ceiling" aria-hidden><i className="office-car-light" /></i>+ <i className="office-car-floor" aria-hidden />+ <i className="office-car-wall" data-side="left" aria-hidden><i className="office-car-rail" /></i>+ <i className="office-car-wall" data-side="right" aria-hidden><i className="office-car-rail" /></i>+ <div className="office-car-front">+ <i className="office-car-lintel" aria-hidden />+ <i className="office-car-pier" data-side="left" aria-hidden />+ <i className="office-car-pier" data-side="right" aria-hidden />+ <div className="office-car-opening" aria-hidden>+ <i className="office-car-leaf" data-side="left" />+ <i className="office-car-leaf" data-side="right" />+ </div>+ <i className="office-car-frame" aria-hidden />+ <div className="office-car-display" aria-live="polite" aria-label={t(`society.office.floor_name_${OFFICE_FLOORS[level] ?? from}`)}>+ <span className="office-car-display-arrow" data-on={moving || undefined}><Arrow down={!up} /></span>+ <b key={level}>{level}</b>+ </div>+ <div ref={panel} className="office-car-panel" role="group" aria-label={t("society.office.elevator_choose")}>+ <ol className="office-car-directory">+ {CAR_BUTTONS.map((option) => (+ <li key={option}><b>{floorLevel(option)}</b><span>{t(`society.office.floor_name_${option}`)}</span></li>+ ))}+ </ol>+ {CAR_BUTTONS.map((option) => (+ <button key={option} type="button" className="office-car-button" data-floor={option}+ data-lit={to === option || undefined} aria-pressed={to === option}+ disabled={!boarding || option === from} aria-current={option === from ? "location" : undefined}+ aria-keyshortcuts={String(floorLevel(option))} aria-label={t(`society.office.floor_name_${option}`)}+ onClick={() => onPick(option)}>+ <span>{floorLevel(option)}</span>+ </button>+ ))}+ <i className="office-car-panel-gap" aria-hidden />+ <button type="button" className="office-car-button" data-kind="open" disabled={!boarding}+ aria-label={t("society.office.elevator_leave")} onClick={onLeave}>+ <span><DoorsOpenGlyph /></span>+ </button>+ </div>+ </div>+ </div>+ {boarding && <p className="office-car-hint">{t("society.office.elevator_keys")}</p>}+ </div>+ );+}diff --git a/jarvis/ui/web/frontend/src/components/society/office/ElevatorPanel.tsx b/jarvis/ui/web/frontend/src/components/society/office/ElevatorPanel.tsxdeleted file mode 100644index 0fdfa9f9f4..0000000000--- a/jarvis/ui/web/frontend/src/components/society/office/ElevatorPanel.tsx+++ /dev/null@@ -1,127 +0,0 @@-/**- * The elevator's floor picker: pressing the call button (click, or E at the- * doors) opens this panel, built like a real elevator's control panel: a- * display with the current floor on top, then one round, backlit key per- * floor, top floor first. The current floor's key glows but cannot be- * picked. A picked key lights up for a moment before the panel closes and- * the doors start to move.- *- * Keys: the floor's number (0, 1, 2) picks it, arrows move between keys,- * Escape (or E) closes. It is a dialog, so the character stands still while- * it is open (`ownsKeyboard`). Part of the diorama: one steel palette in- * light and dark mode.- */-import { useEffect, useRef, useState } from "react";-import { useReducedMotion } from "framer-motion";-import { useT } from "@/i18n";-import { floorLevel, OFFICE_FLOORS, type OfficeFloor } from "./officeStore";--/** The floors as the panel lists them: top floor first. */-export const PANEL_FLOORS: readonly OfficeFloor[] = [...OFFICE_FLOORS].reverse();--/** How long a pressed key stays lit before the panel hands the floor on. */-export const KEY_PRESS_MS = 260;--/** The floor a number key picks ("0" = ground floor), or null. */-export function floorForKey(key: string): OfficeFloor | null {- const level = /^[0-9]$/.test(key) ? Number(key) : -1;- return OFFICE_FLOORS[level] ?? null;-}--export function ElevatorPanel({ floor, counts, onPick, onClose }: {- floor: OfficeFloor;- /** A line under each floor's name (e.g. how many agents work there); null leaves it out. */- counts: Record<OfficeFloor, string | null>;- onPick: (floor: OfficeFloor) => void;- onClose: () => void;-}) {- const t = useT();- const reduced = useReducedMotion() ?? false;- const list = useRef<HTMLDivElement>(null);- const [pressed, setPressed] = useState<OfficeFloor | null>(null);- const pressTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);- useEffect(() => () => clearTimeout(pressTimer.current), []);-- // Light the key, then hand the floor on; one press per panel.- // A ref, so the capture-phase key listener always calls the current press without re-subscribing.- const press = useRef<(target: OfficeFloor) => void>(() => undefined);- press.current = (target: OfficeFloor) => {- if (pressed || target === floor) return;- setPressed(target);- if (reduced) { onPick(target); return; }- pressTimer.current = setTimeout(() => onPick(target), KEY_PRESS_MS);- };-- // Focus the nearest floor you can go to, and give focus back to the office when the panel closes.- useEffect(() => {- const before = document.activeElement instanceof HTMLElement ? document.activeElement : null;- list.current?.querySelector<HTMLButtonElement>("button:not(:disabled)")?.focus({ preventScroll: true });- return () => { before?.focus({ preventScroll: true }); };- }, []);-- // Capture phase: the office's own E, Escape and movement keys never see these.- useEffect(() => {- const onKey = (event: KeyboardEvent) => {- if (event.key === "Escape" || event.code === "KeyE") {- event.preventDefault(); event.stopPropagation();- if (!event.repeat) onClose();- return;- }- // Ctrl/Alt/Cmd + a digit belongs to the browser or the app, never to the panel.- const picked = event.ctrlKey || event.metaKey || event.altKey ? null : floorForKey(event.key);- if (picked) {- event.preventDefault(); event.stopPropagation();- if (!event.repeat) press.current(picked);- return;- }- if (event.key === "ArrowUp" || event.key === "ArrowDown") {- event.preventDefault(); event.stopPropagation();- const buttons = [...(list.current?.querySelectorAll<HTMLButtonElement>("button:not(:disabled)") ?? [])];- if (buttons.length === 0) return;- const at = buttons.indexOf(document.activeElement as HTMLButtonElement);- const next = at < 0 ? 0 : (at + (event.key === "ArrowDown" ? 1 : -1) + buttons.length) % buttons.length;- buttons[next].focus();- }- };- document.addEventListener("keydown", onKey, true);- return () => document.removeEventListener("keydown", onKey, true);- }, [onClose]);-- const target = pressed ?? floor;- const up = floorLevel(target) > floorLevel(floor);- return (- <div className="office-lift-backdrop" data-office-ui onPointerDown={(event) => { if (event.target === event.currentTarget) onClose(); }}>- <div className="office-lift" role="dialog" data-state="open" aria-modal="true" aria-labelledby="office-lift-title" data-reduced={reduced || undefined}>- <div className="office-lift-top">- <div className="office-lift-display" aria-hidden>- <svg viewBox="0 0 24 24" width="14" height="14" className="office-lift-display-arrow" data-dir={pressed ? (up ? "up" : "down") : "idle"}>- <path d="M12 5 L20 15 H4 Z" fill="currentColor" />- </svg>- <b>{floorLevel(floor)}</b>- </div>- <h2 id="office-lift-title">{t("society.office.elevator_choose")}</h2>- <button type="button" className="office-lift-close" onClick={onClose} aria-label={t("society.office.close")}>×</button>- </div>- <div ref={list} className="office-lift-floors">- {PANEL_FLOORS.map((option) => {- const here = option === floor;- const count = counts[option];- return (- <button key={option} type="button" className="office-lift-floor" disabled={here || (pressed !== null && pressed !== option)}- aria-current={here ? "location" : undefined} aria-pressed={pressed === option || undefined}- aria-keyshortcuts={String(floorLevel(option))} data-floor={option} data-here={here || undefined} data-pressed={pressed === option || undefined}- onClick={() => press.current(option)}>- <span className="office-lift-key" aria-hidden><span>{floorLevel(option)}</span></span>- <span className="office-lift-text">- <b>{t(`society.office.floor_name_${option}`)}</b>- <small>{here ? t("society.office.elevator_here") : count ?? t(`society.office.floor_about_${option}`)}</small>- </span>- </button>- );- })}- </div>- <p className="office-lift-keys">{t("society.office.elevator_keys")}</p>- </div>- </div>- );-}diff --git a/jarvis/ui/web/frontend/src/components/society/office/ElevatorRide.tsx b/jarvis/ui/web/frontend/src/components/society/office/ElevatorRide.tsxdeleted file mode 100644index aba92ccfde..0000000000--- a/jarvis/ui/web/frontend/src/components/society/office/ElevatorRide.tsx+++ /dev/null@@ -1,72 +0,0 @@-/**- * The elevator ride over the stage: two brushed-steel doors slide shut, a hall- * lantern on the seam counts through the floors with an arrow pointing the- * way, light bands sweep past while the car moves, and the doors open on the- * new floor. The floor switches behind the closed doors (OfficeStage owns the- * timing); this component only draws the phase it is given.- *- * Part of the diorama, like the call button's pill: it keeps one palette in- * light and dark mode. Reduced motion: no sliding, sweeping or counting —- * the lantern simply shows the floor being ridden to.- */-import { useEffect, useState } from "react";-import { useT } from "@/i18n";-import { floorLevel, OFFICE_FLOORS, type OfficeFloor } from "./officeStore";--export type RidePhase = "closing" | "riding" | "opening";--/** How long the lantern shows each floor while the car moves. */-export const RIDE_STEP_MS = 420;--/** The floor levels a ride passes, from where it starts to where it stops (both included). */-export function rideLevels(from: OfficeFloor, to: OfficeFloor): number[] {- const a = floorLevel(from), b = floorLevel(to);- const step = b >= a ? 1 : -1;- const out: number[] = [];- for (let level = a; level !== b + step; level += step) out.push(level);- return out;-}--/** How long the car should at least be under way so the lantern can count every floor. */-export function minRideMs(from: OfficeFloor, to: OfficeFloor): number {- return Math.max(1, rideLevels(from, to).length - 1) * RIDE_STEP_MS;-}--/** A chevron pointing up (or down when `down`). */-function Arrow({ down }: { down: boolean }) {- return (- <svg viewBox="0 0 24 24" width="22" height="22" aria-hidden className="office-elevator-arrow" data-down={down || undefined}>- <path d="M12 5 L20 15 H4 Z" fill="currentColor" />- </svg>- );-}--export function ElevatorRide({ from, to, phase, reduced }: { from: OfficeFloor; to: OfficeFloor; phase: RidePhase; reduced: boolean }) {- const t = useT();- const levels = rideLevels(from, to);- const up = floorLevel(to) > floorLevel(from);- // Which of the passed floors the lantern shows: the start while the doors close, one step per RIDE_STEP_MS under way, the stop on arrival.- const [step, setStep] = useState(0);- useEffect(() => {- if (reduced || phase !== "riding") return;- const timer = window.setInterval(() => setStep((s) => Math.min(levels.length - 1, s + 1)), RIDE_STEP_MS);- return () => window.clearInterval(timer);- }, [phase, reduced, levels.length]);- const index = reduced || phase === "opening" ? levels.length - 1 : phase === "closing" ? 0 : step;- const level = levels[index] ?? floorLevel(to);- const shown = OFFICE_FLOORS[level] ?? to;- const caption = t(up ? "society.office.riding_up_to" : "society.office.riding_down_to").replace("{0}", t(`society.office.floor_name_${to}`));- return (- <div className="office-elevator" data-phase={phase} data-direction={up ? "up" : "down"} data-reduced={reduced || undefined}- role="status" aria-live="polite" aria-label={caption}>- <i className="office-elevator-door" data-side="left" aria-hidden />- <i className="office-elevator-door" data-side="right" aria-hidden />- <i className="office-elevator-sweep" aria-hidden />- <div className="office-elevator-lantern" aria-hidden>- <Arrow down={!up} />- <b key={level} className="office-elevator-level">{level}</b>- <span className="office-elevator-name">{t(`society.office.floor_name_${shown}`)}</span>- </div>- </div>- );-}diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsxindex ba2d97bf61..a16c452a73 100644--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx@@ -39,8 +39,7 @@ import { PaneCommandPanel } from "./PaneCommandPanel";import type { WalkerContext } from "./OfficeAgents";import { ownsKeyboard } from "./OfficePlayer";import { ArcadeCabinet } from "./ArcadeCabinet";-import { ElevatorPanel } from "./ElevatorPanel";-import { ElevatorRide, minRideMs, type RidePhase } from "./ElevatorRide";+import { ElevatorCar, minRideMs, type CarPhase } from "./ElevatorCar";import { buildArcadeLayout } from "../arcade/arcadeFloorLayout";import { ARCADE_GAMES, gameForCabinet, type RetroGameId } from "../arcade/arcadeGames";import { useOfficeSettings, useReceptionTab } from "./officeSettings";@@ -69,11 +68,12 @@ const REFRESH_JITTER_MS = 1500;const EMPTY_OCCUPANTS: ReadonlyMap<string, PaneOccupant> = new Map();-/** Elevator doors: closing, the ride (held until the new floor has loaded and the lantern has counted the floors, capped), opening. */-const DOORS_MS = 620;-const RIDE_MAX_MS = 2200;-/** After a key on the floor picker lit up, the call button outside glows this long before the doors move. */-const PICKED_CALL_MS = 320;+/** The elevator car: its doors slide in CAR_DOORS_MS, stepping in or out takes CAR_STEP_MS, a ride is capped at RIDE_MAX_MS. */+const CAR_DOORS_MS = 760;+const CAR_STEP_MS = 420;+const RIDE_MAX_MS = 2800;+/** The call button glows this long before the person is in the car. */+const CALL_GLOW_MS = 280;class RenderBoundary extends Component<{ children: ReactNode; fallbackText: string }, { failed: boolean }> {state = { failed: false };@@ -234,68 +234,72 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpenopenTimer.current = setTimeout(() => { go(); setDiving(false); }, ZOOM_SECONDS * 1000 + 260);}, [sectionDive, compact, onOpenLedger, reduced]);- // The elevator: doors close, the floor switches behind them, doors open once- // the new floor has loaded (capped). Reduced motion switches at once.- const [ride, setRide] = useState<{ from: OfficeFloor; to: OfficeFloor; phase: RidePhase; startedMs: number } | null>(null);- const rideTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);- useEffect(() => () => clearTimeout(rideTimer.current), []);- const takeElevator = useCallback((to: OfficeFloor) => {- const from = useOfficeStore.getState().floor;- if (ride || to === from) return;- if (reduced) { switchFloor(to, true); return; }- useOfficeStore.getState().select(null);- setRide({ from, to, phase: "closing", startedMs: 0 });- rideTimer.current = setTimeout(() => {- switchFloor(to, true);- setRide({ from, to, phase: "riding", startedMs: performance.now() });- rideTimer.current = setTimeout(() => setRide((r) => (r?.phase === "riding" ? { ...r, phase: "opening" } : r)), RIDE_MAX_MS);- }, DOORS_MS);- }, [reduced, ride]);- // Riding takes a press of the call button beside the doors, standing at the- // elevator: the press opens the floor picker, picking a floor lights the- // button and the doors close. A press from afar (a click on the button, the+ // The elevator, ridden from inside the car (ElevatorCar): pressing the call+ // button at the doors puts the person in the car; pressing a floor there+ // closes the doors, the floor switches behind them, and the doors open once+ // the new floor has loaded and the indicator has counted the floors (capped);+ // then the person steps out. A press from afar (a click on the button, the// floor token or E anywhere) walks the character over instead; it never- // rides from a distance.+ // rides from a distance. Reduced motion switches floors at once.+ const [car, setCar] = useState<{ phase: CarPhase; from: OfficeFloor; to: OfficeFloor | null; startedMs: number } | null>(null);+ const carTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);+ useEffect(() => () => clearTimeout(carTimer.current), []);const [callLit, setCallLit] = useState(false);- const [picking, setPicking] = useState(false);- const callTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);- useEffect(() => () => clearTimeout(callTimer.current), []);const pressCall = useCallback(() => {- if (ride || callLit) return;+ if (car || callLit) return;const lift = layout.checkpoints.find((cp) => cp.id === "elevator");if (!atElevator(player, lift)) {if (lift) useOfficeStore.getState().requestWalk({ x: lift.x, z: lift.z });return;}- setPicking(true);- }, [ride, callLit, layout]);- const pickFloor = useCallback((to: OfficeFloor) => {- setPicking(false);- if (ride || callLit || to === useOfficeStore.getState().floor) return;+ // The button lights, then the doors are open and the person steps in.setCallLit(true);- callTimer.current = setTimeout(() => { setCallLit(false); takeElevator(to); }, PICKED_CALL_MS);- }, [ride, callLit, takeElevator]);- const closePicker = useCallback(() => setPicking(false), []);- // The picker belongs to the floor it was opened on.- useEffect(() => { setPicking(false); }, [floor]);- // E at the elevator, or a click on its floor token, presses the button instead of opening a panel.+ clearTimeout(carTimer.current);+ carTimer.current = setTimeout(() => {+ setCallLit(false);+ useOfficeStore.getState().select(null);+ setCar({ phase: "boarding", from: useOfficeStore.getState().floor, to: null, startedMs: 0 });+ }, CALL_GLOW_MS);+ }, [car, callLit, layout]);+ const pickFloor = useCallback((to: OfficeFloor) => {+ if (car?.phase !== "boarding" || to === car.from) return;+ if (reduced) { setCar(null); switchFloor(to, true); return; }+ setCar({ ...car, to, phase: "closing" });+ clearTimeout(carTimer.current);+ carTimer.current = setTimeout(() => {+ switchFloor(to, true);+ setCar((c) => (c ? { ...c, phase: "riding", startedMs: performance.now() } : c));+ carTimer.current = setTimeout(() => setCar((c) => (c?.phase === "riding" ? { ...c, phase: "opening" } : c)), RIDE_MAX_MS);+ }, CAR_DOORS_MS);+ }, [car, reduced]);+ const leaveCar = useCallback(() => {+ if (car?.phase !== "boarding") return;+ if (reduced) { setCar(null); return; }+ setCar({ ...car, phase: "leaving" });+ }, [car, reduced]);+ // E at the elevator, or a click on its floor token, presses the call button instead of opening a panel.useEffect(() => {if (selection?.kind !== "checkpoint" || selection.id !== "elevator") return;select(null);pressCall();}, [selection, select, pressCall]);useEffect(() => {- if (ride?.phase === "riding" && floor === ride.to && ready) {- // Open once the floor has loaded and the lantern has counted every floor passed.- const left = minRideMs(ride.from, ride.to) - (performance.now() - ride.startedMs);- clearTimeout(rideTimer.current);- rideTimer.current = setTimeout(() => setRide({ ...ride, phase: "opening" }), Math.max(160, left));+ if (car?.phase === "riding" && floor === car.to && ready && car.to) {+ // The car settles once the floor has loaded and the indicator has counted every floor passed.+ const left = minRideMs(car.from, car.to) - (performance.now() - car.startedMs);+ clearTimeout(carTimer.current);+ carTimer.current = setTimeout(() => setCar((c) => (c ? { ...c, phase: "opening" } : c)), Math.max(220, left));+ }+ if (car?.phase === "opening") {+ // The doors open, a short beat to look out, then the person steps out.+ clearTimeout(carTimer.current);+ carTimer.current = setTimeout(() => setCar((c) => (c ? { ...c, phase: "leaving" } : c)), CAR_DOORS_MS + 260);}- if (ride?.phase === "opening") {- clearTimeout(rideTimer.current);- rideTimer.current = setTimeout(() => setRide(null), DOORS_MS);+ if (car?.phase === "leaving") {+ clearTimeout(carTimer.current);+ carTimer.current = setTimeout(() => setCar(null), CAR_STEP_MS);}- }, [ride, floor, ready]);+ }, [car, floor, ready]);const counts = countStates(active);const updateProfile = useCallback((next: PlayerProfile) => { setProfile(next); saveProfile(next); }, []);@@ -379,11 +383,6 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpenconst playing = selection?.kind === "arcade" ? gameForCabinet(selection.id) : null;const playsAsteroids = selection?.kind === "arcade" && (!playing || playing.kind === "asteroid3d");const titleKey = arcade ? "society.office.arcade_floor_title" : coding ? "society.office.coding_title" : "society.office.title";- const floorCounts = useMemo<Record<OfficeFloor, string | null>>(() => ({- agents: roster.data ? t("society.office.subtitle").replace("{0}", String(jarvisAgents.length)) : null,- coding: codingFloor.loaded ? t("society.office.coding_subtitle").replace("{0}", String(codingFloor.occupants.length)) : null,- arcade: t("society.office.arcade_floor_subtitle").replace("{0}", String(ARCADE_GAMES.length)),- }), [t, roster.data, jarvisAgents.length, codingFloor.loaded, codingFloor.occupants.length]);const playerName = profile.name.trim() || t("society.office.you");const showHintBar = useOfficeSettings((s) => s.showHintBar);const receptionOpen = selection?.kind === "checkpoint" && selection.id === "create";@@ -408,7 +407,7 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpen<OfficeScene floor={floor} occupants={occupants} ready={ready} layout={layout} grid={grid} walkers={walkers} agents={agents} newcomers={newcomers}awake={awake} reduced={reduced} overview={overview} player={{ look: playerLook(profile), name: playerName }}selection={selection} nearby={nearby} chats={chats} onOpenScreen={openScreen}- elevatorCall={{ lit: callLit, picking, onPress: pressCall }} />+ elevatorCall={{ lit: callLit || !!car, picking: !!car, onPress: pressCall }} /></Canvas></Suspense></RenderBoundary>@@ -455,7 +454,7 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpen<RetroArcadeOverlay gameId={playing.id as RetroGameId} onClose={() => select(null)} /></Suspense>)}- {picking && !ride && <ElevatorPanel floor={floor} counts={floorCounts} onPick={pickFloor} onClose={closePicker} />}+{/* A coding session is a window of its own on the stage, not a panel in the corner slot. */}{selection?.kind === "agent" && selectedPane && (<PaneCommandPanel occupant={selectedPane} compact={compact} onOpen={() => openPaneSession(selectedPane.pane)} onClose={() => select(null)} />@@ -470,14 +469,14 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpen</div>)}- {nearbyLabel && !selection && !picking && (+ {nearbyLabel && !selection && !car && (<button type="button" className="office-hud office-prompt" data-office-ui onClick={() => nearby && select(nearby)}><kbd>E</kbd>{nearbyLabel}</button>)}{!compact && <OfficeCompass layout={layout} agents={agents} selectedId={selection?.kind === "agent" ? selection.id : null} />}{diving && <div className="office-dive-fade" aria-hidden />}- {ride && <ElevatorRide from={ride.from} to={ride.to} phase={ride.phase} reduced={reduced} />}+ {car && <ElevatorCar phase={car.phase} from={car.from} to={car.to} reduced={reduced} onPick={pickFloor} onLeave={leaveCar} />}{!compact && <OfficeMinimap layout={layout} agents={agents} selectedId={selection?.kind === "agent" ? selection.id : null}onOpenMap={() => setMapOpen(true)} />}<OfficeFullMap open={mapOpen} onOpen={() => setMapOpen(true)} onClose={() => setMapOpen(false)}diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeFloors.css b/jarvis/ui/web/frontend/src/components/society/office/officeFloors.cssindex 4e467e6e75..37ec05b648 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeFloors.css+++ b/jarvis/ui/web/frontend/src/components/society/office/officeFloors.css@@ -1,77 +1,146 @@/* Floors, the elevator ride and the compact (IDE side panel) HUD. Theme tokens only: light and dark mode both work. *//*- * The elevator ride (ElevatorRide): brushed-steel doors slide shut over the scene, a hall lantern on the seam- * counts the floors while light bands sweep past, and the doors open on the new floor. Part of the diorama,- * like the call button's pill: one palette in light and dark mode.+ * Inside the elevator car (ElevatorCar). The car frames the stage like standing in it: steel side walls+ * and a lit ceiling drawn in perspective, a stone floor, and the front wall with the door opening, the+ * floor indicator above it and the operating panel beside it. Through the opening the stage stays visible+ * until the doors close. Sizes follow the stage (container units), so the car fits the side panel too.+ * Part of the diorama: one palette in light and dark mode.*/-.office-elevator { position:absolute; inset:0; z-index:62; pointer-events:none; overflow:hidden; }-.office-elevator-door {- position:absolute; top:0; bottom:0; width:50%;+.office-car {+ --front-w:min(64cqw, 112cqh); --side:calc((100cqw - var(--front-w)) / 2); --ceil:10cqh; --floor:11cqh;+ --door-w:50%; --door-h:84%; --pier:calc((100% - var(--door-w)) / 2);+ --steel:repeating-linear-gradient(90deg, rgb(255 255 255 / .045) 0 1px, transparent 1px 3px), linear-gradient(180deg, #c6cbd1, #a9afb6 55%, #949aa2);+ position:absolute; inset:0; z-index:62; overflow:hidden; container-type:size;+}+.office-car-body { position:absolute; inset:0; animation:office-car-in 420ms cubic-bezier(.2,.75,.25,1); transform-origin:50% 55%; }+@keyframes office-car-in { from { opacity:0; transform:scale(1.14); } }+.office-car[data-phase="leaving"] .office-car-body { opacity:0; transform:scale(1.14); transition:opacity 420ms ease-in, transform 420ms cubic-bezier(.5,0,.75,.3); }+/* Under way: a jolt as the car pulls away, a faint hum, and it settles when it stops. */+.office-car[data-phase="riding"] .office-car-body { animation:office-car-pull 420ms cubic-bezier(.3,0,.3,1), office-car-hum 180ms linear 420ms infinite; }+.office-car[data-phase="opening"] .office-car-body { animation:office-car-settle 360ms cubic-bezier(.2,.8,.2,1); }+@keyframes office-car-pull { 30% { transform:translateY(calc(var(--pull, 1) * 0.5cqh)); } }+@keyframes office-car-hum { 50% { transform:translateY(0.08cqh); } }+@keyframes office-car-settle { 40% { transform:translateY(calc(var(--pull, 1) * -0.35cqh)); } }+.office-car[data-direction="down"] { --pull:-1; }++/* Ceiling with its light panel, floor, side walls: trapezoids meeting the front wall's edges. */+.office-car-ceiling {+ position:absolute; left:0; right:0; top:0; height:var(--ceil);+ clip-path:polygon(0 0, 100% 0, calc(100% - var(--side)) 100%, var(--side) 100%);+ background:linear-gradient(180deg, #24272c, #3a3e45);+}+.office-car-light {+ position:absolute; left:50%; bottom:22%; width:calc(var(--front-w) * .62); height:38%; transform:translateX(-50%); border-radius:3px;+ background:linear-gradient(180deg, #ffffff, #eef4ff); box-shadow:0 0 2.4cqh rgb(255 255 255 / .75), 0 0 6cqh rgb(220 235 255 / .35);+}+.office-car-floor {+ position:absolute; left:0; right:0; bottom:0; height:var(--floor);+ clip-path:polygon(var(--side) 0, calc(100% - var(--side)) 0, 100% 100%, 0 100%);background:- repeating-linear-gradient(90deg, rgb(255 255 255 / .035) 0 1px, transparent 1px 4px),- linear-gradient(90deg, #5f656e 0%, #a4aab2 30%, #cdd1d6 50%, #9aa0a8 72%, #686e77 100%);- transition:transform 600ms cubic-bezier(.65,0,.25,1);+ radial-gradient(circle at 20% 40%, rgb(255 255 255 / .06) 0 1px, transparent 1.5px) 0 0 / 7px 7px,+ radial-gradient(circle at 70% 60%, rgb(0 0 0 / .25) 0 1px, transparent 1.5px) 0 0 / 9px 9px,+ linear-gradient(180deg, #4a4a50, #26262a 70%, #1a1a1d);}-/* A recessed panel on each door, catching the light along its top edge. */-.office-elevator-door::before {- content:""; position:absolute; inset:8% 14%; border-radius:8px;- background:linear-gradient(180deg, rgb(255 255 255 / .08), rgb(0 0 0 / .06));- box-shadow:inset 0 0 0 1px rgb(0 0 0 / .16), inset 0 1px 0 rgb(255 255 255 / .4);+.office-car-wall {+ position:absolute; top:0; bottom:0; width:var(--side);+ /* Steel panels whose seams crowd together towards the front wall, as they would in perspective. */+ background:+ linear-gradient(90deg, transparent 0 34%, rgb(0 0 0 / .22) 34% 34.4%, rgb(255 255 255 / .18) 34.4% 34.7%, transparent 34.7% 62%,+ rgb(0 0 0 / .22) 62% 62.4%, rgb(255 255 255 / .18) 62.4% 62.7%, transparent 62.7% 82%,+ rgb(0 0 0 / .22) 82% 82.4%, rgb(255 255 255 / .18) 82.4% 82.7%, transparent 82.7%),+ repeating-linear-gradient(180deg, rgb(255 255 255 / .025) 0 1px, transparent 1px 3px),+ linear-gradient(90deg, #4b5057 0%, #7b8189 55%, #a1a7ae 100%);}-/* The rubber edge where the doors meet. */-.office-elevator-door::after { content:""; position:absolute; top:0; bottom:0; width:3px; background:#202227; }-.office-elevator-door[data-side="left"] { left:0; transform:translateX(-101%); box-shadow:inset -16px 0 24px -12px rgb(0 0 0 / .55); }-.office-elevator-door[data-side="left"]::after { right:0; }-.office-elevator-door[data-side="right"] { right:0; transform:translateX(101%); box-shadow:inset 16px 0 24px -12px rgb(0 0 0 / .55); }-.office-elevator-door[data-side="right"]::after { left:0; }-.office-elevator[data-phase="closing"] .office-elevator-door,-.office-elevator[data-phase="riding"] .office-elevator-door { transform:translateX(0); }-/* A fresh mount starts open, so closing animates from open; opening animates back out. */-.office-elevator[data-phase="closing"] .office-elevator-door { animation:office-door-close 600ms cubic-bezier(.65,0,.25,1); }-@keyframes office-door-close { from { transform:translateX(var(--office-door-from, 0)); } }-.office-elevator[data-phase="closing"] .office-elevator-door[data-side="left"] { --office-door-from:-101%; }-.office-elevator[data-phase="closing"] .office-elevator-door[data-side="right"] { --office-door-from:101%; }+.office-car-wall[data-side="left"] { left:0; clip-path:polygon(0 0, 100% var(--ceil), 100% calc(100% - var(--floor)), 0 100%); }+/* The right wall is the left one mirrored: same shape, rail and light falling off towards the viewer. */+.office-car-wall[data-side="right"] { right:0; clip-path:polygon(0 0, 100% var(--ceil), 100% calc(100% - var(--floor)), 0 100%); transform:scaleX(-1); }+/* A brushed handrail at hip height, running towards the front wall. */+.office-car-rail { position:absolute; inset:0; background:linear-gradient(180deg, #f6f8fa 58%, #6c727a 62%); clip-path:polygon(0 61.2%, 100% 57.5%, 100% 58.5%, 0 62.8%); }-/* Under way: soft light bands slide past the doors, against the direction of travel. */-.office-elevator-sweep {- position:absolute; inset:0; opacity:0;- background:repeating-linear-gradient(180deg, transparent 0 150px, rgb(255 255 255 / .2) 170px, transparent 190px 260px);- mix-blend-mode:overlay; transition:opacity 260ms ease;+/* The front wall: lintel, two piers and the door frame round the opening. */+.office-car-front { position:absolute; left:50%; top:var(--ceil); bottom:var(--floor); width:var(--front-w); transform:translateX(-50%); }+.office-car-lintel, .office-car-pier { position:absolute; background:var(--steel); }+.office-car-lintel { left:0; right:0; top:0; height:calc(100% - var(--door-h)); }+.office-car-pier { bottom:0; height:var(--door-h); width:var(--pier); }+.office-car-pier[data-side="left"] { left:0; box-shadow:inset -1px 0 0 rgb(0 0 0 / .12); }+.office-car-pier[data-side="right"] { right:0; box-shadow:inset 1px 0 0 rgb(0 0 0 / .12); }+.office-car-opening { position:absolute; bottom:0; left:var(--pier); width:var(--door-w); height:var(--door-h); overflow:hidden; }+.office-car-frame {+ position:absolute; bottom:0; left:var(--pier); width:var(--door-w); height:var(--door-h); pointer-events:none;+ box-shadow:0 0 0 0.9cqh #6d737b, 0 0 0 calc(0.9cqh + 1px) rgb(0 0 0 / .35), inset 0 0 0 1px rgb(0 0 0 / .4);}-.office-elevator[data-phase="riding"] .office-elevator-sweep { opacity:1; animation:office-ride-past-down 620ms linear infinite; }-.office-elevator[data-phase="riding"][data-direction="down"] .office-elevator-sweep { animation-name:office-ride-past-up; }-@keyframes office-ride-past-down { from { background-position:0 0; } to { background-position:0 260px; } }-@keyframes office-ride-past-up { from { background-position:0 260px; } to { background-position:0 0; } }+/* The doors: two brushed leaves that slide behind the piers. */+.office-car-leaf {+ position:absolute; top:0; bottom:0; width:50%;+ background:repeating-linear-gradient(90deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px), linear-gradient(90deg, #a2a8af, #c9cdd2 50%, #a7adb4);+ transition:transform 760ms cubic-bezier(.45,0,.2,1);+}+.office-car-leaf[data-side="left"] { left:0; transform:translateX(-100%); box-shadow:inset -2px 0 0 #3b3f45, inset -10px 0 14px -10px rgb(0 0 0 / .45); }+.office-car-leaf[data-side="right"] { right:0; transform:translateX(100%); box-shadow:inset 2px 0 0 #3b3f45, inset 10px 0 14px -10px rgb(0 0 0 / .45); }+.office-car[data-phase="closing"] .office-car-leaf,+.office-car[data-phase="riding"] .office-car-leaf { transform:translateX(0); }++/* The floor indicator above the doors: black glass, an orange dot-matrix number and the direction arrow. */+.office-car-display {+ position:absolute; left:50%; top:calc((100% - var(--door-h)) / 2); transform:translate(-50%, -50%);+ display:flex; align-items:center; justify-content:center; gap:0.8cqh; height:62%; max-height:9cqh; aspect-ratio:2.2;+ border-radius:0.6cqh; background:linear-gradient(180deg, #121316, #050506); box-shadow:inset 0 0 0 1px rgb(255 255 255 / .07), 0 1px 0 rgb(255 255 255 / .35);+ color:#ff8a1f; font-family:'Pixelify Sans', ui-monospace, monospace; font-weight:600; line-height:1;+}+.office-car-display b { font-size:min(6.2cqh, 9cqw); text-shadow:0 0 0.8cqh rgb(255 138 31 / .7); animation:office-car-digit 260ms ease-out; }+@keyframes office-car-digit { from { opacity:.15; } }+.office-car-display-arrow { width:min(2.8cqh, 4cqw); opacity:.18; transition:opacity 200ms ease; }+.office-car-display-arrow[data-on] { opacity:1; filter:drop-shadow(0 0 0.5cqh rgb(255 138 31 / .7)); }+.office-car-arrow { display:block; width:100%; height:auto; }+.office-car-arrow[data-down] { transform:rotate(180deg); }+.office-car[data-phase="opening"] .office-car-display { animation:office-car-chime 520ms ease-out; }+@keyframes office-car-chime { 35% { box-shadow:inset 0 0 0 1px rgb(255 255 255 / .07), 0 0 2.4cqh rgb(255 138 31 / .55); } }-/* The hall lantern: a dark glass display on the seam with the arrow, the floor number and its name. */-.office-elevator-lantern {- position:absolute; left:50%; top:24%; display:flex; flex-direction:column; align-items:center; gap:4px;- min-width:150px; padding:12px 22px 11px; border-radius:18px;- background:linear-gradient(180deg, #17181d, #0b0c10); border:1px solid rgb(255 255 255 / .1);- box-shadow:0 14px 36px rgb(0 0 0 / .45), inset 0 1px 0 rgb(255 255 255 / .07), 0 0 0 6px rgb(18 19 23 / .35);- color:#f5b83d; opacity:0; transform:translate(-50%, 10px) scale(.96);- transition:opacity 220ms ease, transform 360ms cubic-bezier(.2,.8,.2,1);+/* The operating panel on the right pier: a steel plate with a directory, one push button per floor and "doors open". */+.office-car-panel {+ position:absolute; right:calc(var(--pier) * .22); top:14%; width:calc(var(--pier) * .5); min-width:58px; max-width:120px;+ display:flex; flex-direction:column; align-items:center; gap:1.1cqh; padding:1.4cqh 0.9cqh 1.6cqh; border-radius:0.8cqh;+ background:+ radial-gradient(circle, #6a7078 0 1.6px, transparent 2.2px) left 2px top 2px / 14px 14px no-repeat,+ radial-gradient(circle, #6a7078 0 1.6px, transparent 2.2px) right 2px top 2px / 14px 14px no-repeat,+ radial-gradient(circle, #6a7078 0 1.6px, transparent 2.2px) left 2px bottom 2px / 14px 14px no-repeat,+ radial-gradient(circle, #6a7078 0 1.6px, transparent 2.2px) right 2px bottom 2px / 14px 14px no-repeat,+ repeating-linear-gradient(90deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px), linear-gradient(180deg, #d3d7dc, #aeb4bb);+ box-shadow:0 0.4cqh 1cqh rgb(0 0 0 / .3), inset 0 1px 0 rgb(255 255 255 / .6), inset 0 0 0 1px rgb(0 0 0 / .14);+}+.office-car-directory { list-style:none; margin:0 0 0.3cqh; padding:0.6cqh 0.7cqh; width:100%; border-radius:0.4cqh; background:rgb(0 0 0 / .06); box-shadow:inset 0 1px 1px rgb(0 0 0 / .18); }+.office-car-directory li { display:flex; gap:0.6em; align-items:baseline; font-size:clamp(8px, 1.15cqh, 11px); line-height:1.35; color:#353a41; text-shadow:0 1px 0 rgb(255 255 255 / .55); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }+.office-car-directory b { flex:none; font-weight:700; }+.office-car-directory span { overflow:hidden; text-overflow:ellipsis; }+.office-car-panel-gap { width:70%; height:1px; margin:0.2cqh 0; background:rgb(0 0 0 / .18); box-shadow:0 1px 0 rgb(255 255 255 / .45); }+/* A push button: a polished ring round a satin face with the engraved number; its rim lights up when pressed. */+.office-car-button {+ position:relative; width:62%; aspect-ratio:1; padding:0; border:0; border-radius:50%; cursor:pointer;+ background:radial-gradient(circle at 35% 30%, #fdfdfd, #b6bcc3 55%, #737980);+ box-shadow:0 0.25cqh 0.45cqh rgb(0 0 0 / .4), inset 0 -1px 2px rgb(0 0 0 / .25);+ transition:box-shadow 160ms ease, transform 90ms ease;+}+.office-car-button span {+ position:absolute; inset:13%; display:grid; place-items:center; border-radius:50%;+ background:radial-gradient(circle at 50% 38%, #e2e5e9, #b3b9c0); color:#40454c;+ font-family:'Inter Variable', Inter, system-ui, sans-serif; font-weight:650; font-size:min(2.1cqh, 15px);+ text-shadow:0 1px 0 rgb(255 255 255 / .65); box-shadow:inset 0 1px 2px rgb(0 0 0 / .25), 0 0 0 2px transparent;+ transition:box-shadow 180ms ease, color 180ms ease;}-.office-elevator[data-phase="closing"] .office-elevator-lantern { opacity:1; transform:translate(-50%, 0) scale(1); transition-delay:320ms; }-.office-elevator[data-phase="riding"] .office-elevator-lantern { opacity:1; transform:translate(-50%, 0) scale(1); }-.office-elevator-arrow { display:block; filter:drop-shadow(0 0 6px rgb(245 184 61 / .75)); }-.office-elevator-arrow[data-down] { transform:rotate(180deg); }-.office-elevator[data-phase="riding"] .office-elevator-arrow { animation:office-arrow-up 900ms ease-in-out infinite; }-.office-elevator[data-phase="riding"] .office-elevator-arrow[data-down] { animation-name:office-arrow-down; }-@keyframes office-arrow-up { 0% { transform:translateY(4px); opacity:.45; } 50% { opacity:1; } 100% { transform:translateY(-4px); opacity:.45; } }-@keyframes office-arrow-down { 0% { transform:rotate(180deg) translateY(4px); opacity:.45; } 50% { opacity:1; } 100% { transform:rotate(180deg) translateY(-4px); opacity:.45; } }-.office-elevator-level {- font-family:'JetBrains Mono', ui-monospace, monospace; font-size:56px; line-height:1; font-weight:700; font-variant-numeric:tabular-nums;- text-shadow:0 0 16px rgb(245 184 61 / .65); animation:office-level-in 280ms cubic-bezier(.2,.8,.2,1);+.office-car-button span svg { width:58%; height:58%; }+.office-car-button:enabled:hover span { background:radial-gradient(circle at 50% 38%, #edf0f3, #bfc5cb); }+.office-car-button:enabled:active { transform:scale(.96); }+.office-car-button:focus-visible { outline:2px solid #8fd8ff; outline-offset:3px; }+.office-car-button:disabled { cursor:default; }+.office-car-button[data-lit] span { color:#1f6f96; box-shadow:inset 0 1px 2px rgb(0 0 0 / .2), 0 0 0 2px #8fd8ff, 0 0 1.4cqh rgb(143 216 255 / .9); }+.office-car-hint {+ position:absolute; left:50%; bottom:2.2cqh; transform:translateX(-50%); margin:0; padding:0.5cqh 1.4cqh; border-radius:999px;+ background:rgb(10 11 14 / .55); color:rgb(240 242 245 / .85); font-size:11px; white-space:nowrap;}-/* A new floor number rolls in from the direction of travel. */-@keyframes office-level-in { from { transform:translateY(var(--office-level-from, 16px)); opacity:0; } }-.office-elevator[data-direction="down"] .office-elevator-level { --office-level-from:-16px; }-.office-elevator-name { font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:rgb(245 184 61 / .82); white-space:nowrap; }-.office-elevator[data-reduced] *, .office-elevator[data-reduced] *::before, .office-elevator[data-reduced] *::after { animation:none !important; transition:none !important; }+.office-car[data-reduced] *, .office-car[data-reduced] *::before, .office-car[data-reduced] *::after { animation:none !important; transition:none !important; }@media (prefers-reduced-motion: reduce) {- .office-elevator *, .office-elevator *::before, .office-elevator *::after { animation:none !important; transition:none !important; }+ .office-car *, .office-car *::before, .office-car *::after { animation:none !important; transition:none !important; }}/* The pill over the elevator's call button. Like the name pills it is part of the diorama, which keeps one palette in both modes. */@@ -95,84 +164,3 @@.office-stage-compact .office-panel-slot { top:auto; bottom:48px; right:8px; width:calc(100% - 16px); max-height:62%; }.office-stage-compact .office-prompt { bottom:48px; max-width:calc(100% - 16px); font-size:12px; }.office-stage-compact .office-note { font-size:11px; }--/*- * The elevator's floor picker (ElevatorPanel), built like a real control panel: brushed steel, a display- * with the current floor, one round backlit key per floor, top floor first. Each floor has its own accent;- * the key of the floor you are on glows amber, a pressed key lights up fully. Part of the diorama: one- * palette in light and dark mode.- */-.office-lift-backdrop { position:absolute; inset:0; z-index:64; display:flex; align-items:center; justify-content:center; padding:16px; background:rgb(8 9 12 / .36); }-.office-lift {- width:min(344px, 100%); padding:14px; border-radius:20px; color:#eef0f3;- background:- repeating-linear-gradient(90deg, rgb(255 255 255 / .02) 0 1px, transparent 1px 3px),- linear-gradient(160deg, #3b3f47 0%, #24272d 55%, #1b1d22 100%);- border:1px solid rgb(255 255 255 / .1);- box-shadow:0 24px 60px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .12), inset 0 -1px 0 rgb(0 0 0 / .45);- animation:office-lift-in 220ms cubic-bezier(.2,.8,.2,1);-}-@keyframes office-lift-in { from { opacity:0; transform:translateY(10px) scale(.97); } }-.office-lift-top { display:flex; align-items:center; gap:10px; margin-bottom:12px; }-.office-lift-display {- display:inline-flex; align-items:center; justify-content:center; gap:6px; min-width:58px; padding:6px 10px; border-radius:10px;- background:#0b0c10; border:1px solid rgb(255 255 255 / .08); box-shadow:inset 0 2px 6px rgb(0 0 0 / .65);- color:#f5b83d; font-family:'JetBrains Mono', ui-monospace, monospace; font-size:20px; font-weight:700; line-height:1;- text-shadow:0 0 10px rgb(245 184 61 / .6);-}-.office-lift-display-arrow { transition:opacity 160ms ease, transform 160ms ease; }-.office-lift-display-arrow[data-dir="idle"] { opacity:.25; }-.office-lift-display-arrow[data-dir="down"] { transform:rotate(180deg); }-.office-lift-top h2 { flex:1; min-width:0; margin:0; font-size:14px; font-weight:700; }-.office-lift-close { flex:none; width:28px; height:28px; border:0; border-radius:8px; background:rgb(255 255 255 / .06); color:#c9ced6; font-size:18px; line-height:1; cursor:pointer; }-.office-lift-close:hover { background:rgb(255 255 255 / .12); color:#ffffff; }-.office-lift-close:focus-visible { outline:2px solid #f5b83d; outline-offset:2px; }-.office-lift-floors { display:flex; flex-direction:column; gap:8px; }-.office-lift-floor {- --lift-accent:#f5b83d;- position:relative; display:flex; align-items:center; gap:12px; width:100%; padding:9px 12px 9px 14px; border-radius:14px;- border:1px solid rgb(255 255 255 / .07); background:linear-gradient(180deg, rgb(255 255 255 / .055), rgb(255 255 255 / .02));- color:inherit; text-align:left; cursor:pointer;- transition:background 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 120ms ease;-}-.office-lift-floor[data-floor="agents"] { --lift-accent:#9fd8a8; }-.office-lift-floor[data-floor="coding"] { --lift-accent:#ffb86b; }-.office-lift-floor[data-floor="arcade"] { --lift-accent:#ff6fb5; }-/* The floor's colour as a slim bar along the key's edge. */-.office-lift-floor::before { content:""; position:absolute; left:5px; top:14px; bottom:14px; width:3px; border-radius:3px; background:var(--lift-accent); opacity:.6; }-.office-lift-floor:hover:not(:disabled), .office-lift-floor:focus-visible { background:linear-gradient(180deg, rgb(255 255 255 / .1), rgb(255 255 255 / .04)); border-color:color-mix(in srgb, var(--lift-accent) 55%, transparent); }-.office-lift-floor:focus-visible { outline:2px solid var(--lift-accent); outline-offset:2px; }-.office-lift-floor:active:not(:disabled) { transform:scale(.985); }-.office-lift-floor:disabled { cursor:default; }-.office-lift-floor:disabled:not([data-here]):not([data-pressed]) { opacity:.42; }-.office-lift-floor[data-pressed] { border-color:rgb(245 184 61 / .65); }-/* The key: a polished steel ring round a dark button with the floor's number. */-.office-lift-key {- flex:none; display:grid; place-items:center; width:42px; height:42px; border-radius:50%;- background:radial-gradient(circle at 35% 30%, #f3f5f7, #aab0b8 55%, #686e77);- box-shadow:0 2px 4px rgb(0 0 0 / .45), inset 0 -2px 3px rgb(0 0 0 / .25);-}-.office-lift-key span {- display:grid; place-items:center; width:32px; height:32px; border-radius:50%;- background:radial-gradient(circle at 50% 35%, #30333b, #15171c); color:#e8eaee;- font-family:'JetBrains Mono', ui-monospace, monospace; font-size:15px; font-weight:700;- box-shadow:inset 0 0 0 2px rgb(255 255 255 / .06);- transition:color 160ms ease, box-shadow 160ms ease, background 160ms ease;-}-.office-lift-floor:hover:not(:disabled) .office-lift-key span, .office-lift-floor:focus-visible .office-lift-key span {- color:var(--lift-accent); box-shadow:inset 0 0 0 2px var(--lift-accent), 0 0 12px color-mix(in srgb, var(--lift-accent) 55%, transparent);-}-.office-lift-floor[data-here] .office-lift-key span { color:#f5b83d; box-shadow:inset 0 0 0 2px #f5b83d, 0 0 12px rgb(245 184 61 / .5); }-.office-lift-floor[data-pressed] .office-lift-key span {- background:radial-gradient(circle at 50% 40%, #fff6d1, #f5b83d 58%, #b97a1d); color:#2b1900;- box-shadow:0 0 0 2px rgb(255 214 120 / .7), 0 0 20px rgb(245 184 61 / .9);-}-.office-lift-text { display:flex; flex-direction:column; gap:1px; min-width:0; }-.office-lift-text b { font-size:14px; font-weight:650; color:#f4f5f7; }-.office-lift-text small { font-size:11.5px; color:#a7adb7; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }-.office-lift-floor[data-here] .office-lift-text small { color:#f5b83d; }-.office-lift-keys { margin:12px 2px 0; font-size:10.5px; color:#8d939d; }-.office-lift[data-reduced], .office-lift[data-reduced] * { animation:none !important; transition:none !important; }-@media (prefers-reduced-motion: reduce) {- .office-lift, .office-lift * { animation:none !important; transition:none !important; }-}diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeFloors.test.ts b/jarvis/ui/web/frontend/src/components/society/office/officeFloors.test.tsindex 0d7fd976d6..33dd2382cf 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeFloors.test.ts+++ b/jarvis/ui/web/frontend/src/components/society/office/officeFloors.test.ts@@ -3,9 +3,8 @@ import { buildOfficeLayout, type OfficeAgentInput } from "./officeLayout";import { buildNavGrid, isWalkable } from "./officeNav";import { arrivalPose, knownOnFloor, noteArrivals } from "./officeFloors";import { floorLevel, OFFICE_FLOORS, officeSession, player, switchFloor, useOfficeStore } from "./officeStore";-import { floorForKey, PANEL_FLOORS } from "./ElevatorPanel";import { callDirection } from "./ElevatorCallButton";-import { minRideMs, RIDE_STEP_MS, rideLevels } from "./ElevatorRide";+import { CAR_BUTTONS, floorForKey, minRideMs, RIDE_STEP_MS, rideLevels } from "./ElevatorCar";import { buildArcadeLayout } from "../arcade/arcadeFloorLayout";const AGENTS: OfficeAgentInput[] = [@@ -24,10 +23,10 @@ function resetBuilding() {afterEach(resetBuilding);describe("floors", () => {- it("stacks the floors bottom to top, and the elevator panel lists them top first", () => {+ it("stacks the floors bottom to top, and the car's panel lists them top first", () => {expect(OFFICE_FLOORS).toEqual(["agents", "coding", "arcade"]);expect(OFFICE_FLOORS.map(floorLevel)).toEqual([0, 1, 2]);- expect(PANEL_FLOORS).toEqual(["arcade", "coding", "agents"]);+ expect(CAR_BUTTONS).toEqual(["arcade", "coding", "agents"]);expect(callDirection("agents")).toBe("up");expect(callDirection("coding")).toBe("both");expect(callDirection("arcade")).toBe("down");diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json b/jarvis/ui/web/frontend/src/i18n/locales/society/de.jsonindex 4fa2d6e9c5..3091e9cea1 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/de.json@@ -819,14 +819,11 @@"cp_elevator": "Aufzug","cp_elevator_hint": "Den Ruf-Knopf neben den Türen drücken","elevator_choose": "Etage wählen",- "elevator_here": "Du bist hier",- "elevator_keys": "0–2 wählt die Etage · ↑/↓ wechseln · Esc schließt",+ "elevator_leave": "Aussteigen",+ "elevator_keys": "0–2 wählt die Etage · Esc zum Aussteigen","floor_name_agents": "Agenten-Etage","floor_name_coding": "Coding-Etage","floor_name_arcade": "Arcade-Etage",- "floor_about_agents": "Deine Jarvis-Agenten bei der Arbeit",- "floor_about_coding": "Coding-Sessions aus der IDE",- "floor_about_arcade": "Retro-Automaten zum Spielen","riding_up_to": "Aufwärts · {0}","riding_down_to": "Abwärts · {0}","arcade_floor_title": "Arcade-Etage",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json b/jarvis/ui/web/frontend/src/i18n/locales/society/en.jsonindex b0a4cf254f..221f2a4036 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/en.json@@ -819,14 +819,11 @@"cp_elevator": "Elevator","cp_elevator_hint": "Press the call button beside the doors","elevator_choose": "Choose a floor",- "elevator_here": "You are here",- "elevator_keys": "0–2 picks a floor · ↑/↓ move · Esc closes",+ "elevator_leave": "Step out",+ "elevator_keys": "0–2 picks a floor · Esc steps out","floor_name_agents": "Agents floor","floor_name_coding": "Coding floor","floor_name_arcade": "Arcade floor",- "floor_about_agents": "Your Jarvis agents at work",- "floor_about_coding": "Coding sessions from the IDE",- "floor_about_arcade": "Retro cabinets to play","riding_up_to": "Going up · {0}","riding_down_to": "Going down · {0}","arcade_floor_title": "Arcade floor",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json b/jarvis/ui/web/frontend/src/i18n/locales/society/es.jsonindex b8fab1b343..daaa46f579 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/es.json@@ -819,14 +819,11 @@"cp_elevator": "Ascensor","cp_elevator_hint": "Pulsa el botón de llamada junto a las puertas","elevator_choose": "Elige una planta",- "elevator_here": "Estás aquí",- "elevator_keys": "0–2 elige planta · ↑/↓ moverse · Esc cierra",+ "elevator_leave": "Salir",+ "elevator_keys": "0–2 elige planta · Esc para salir","floor_name_agents": "Planta de agentes","floor_name_coding": "Planta de código","floor_name_arcade": "Planta arcade",- "floor_about_agents": "Tus agentes de Jarvis trabajando",- "floor_about_coding": "Sesiones de código del IDE",- "floor_about_arcade": "Máquinas retro para jugar","riding_up_to": "Subiendo · {0}","riding_down_to": "Bajando · {0}","arcade_floor_title": "Planta arcade",