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.

feat(deck): the centre grows with its room and stands on a vignetted stage; a mask-core variant for the orb

Harald9f8fa50021bd
diff --git a/jarvis/ui/web/frontend/src/components/deck/OrbCore.tsx b/jarvis/ui/web/frontend/src/components/deck/OrbCore.tsx
new file mode 100644
index 0000000000..d2883e124a
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/deck/OrbCore.tsx
@@ -0,0 +1,102 @@
+import { useId } from "react";
+import type { VoiceState } from "@/store/events";
+import { cn } from "@/lib/utils";
+
+/**
+ * The mask inside the orb.
+ *
+ * The deck's centre used to be the whole mascot pasted onto a bright gold
+ * ball — a sticker on a moon. Now the mask IS the orb's core: a round, dark
+ * body sunk into the golden weather, with only the eyes and the mouth glowing
+ * gold out of it (maintainer's pick, 2026-08-18: "only the eyes in the dark
+ * core"). The silhouette is implied, never cut out, so nothing competes with
+ * the big mask in the wallpaper.
+ *
+ * The face reacts to the real voice state through the `data-voice` attribute
+ * — the CSS in index.css (`.deck-core*`) reuses the mascot's keyframes: it
+ * blinks, the pupils drift, the eyes prick up while listening, the head cocks
+ * while thinking, the mouth moves while speaking. Everything stops under
+ * reduced motion.
+ */
+export function OrbCore({
+ size,
+ voiceState,
+ className,
+}: {
+ size: number;
+ voiceState: VoiceState;
+ className?: string;
+}) {
+ const uid = useId();
+ const id = (name: string) => `${uid}${name}`;
+ return (
+ <svg
+ viewBox="0 0 256 256"
+ width={size}
+ height={size}
+ className={cn("deck-core", className)}
+ data-testid="orb-core"
+ data-voice={voiceState}
+ aria-hidden
+ >
+ <defs>
+ <radialGradient id={id("deckCoreBody")} cx="50%" cy="38%" r="62%">
+ <stop offset="0%" stopColor="#2a1d0a" />
+ <stop offset="55%" stopColor="#120c04" />
+ <stop offset="100%" stopColor="#070502" />
+ </radialGradient>
+ <linearGradient id={id("deckCoreGold")} x1="0%" y1="0%" x2="0%" y2="100%">
+ <stop offset="0%" stopColor="#fff1b8" />
+ <stop offset="55%" stopColor="#e7c46e" />
+ <stop offset="100%" stopColor="#d29318" />
+ </linearGradient>
+ <filter id={id("deckCoreGlow")} x="-60%" y="-60%" width="220%" height="220%">
+ <feGaussianBlur stdDeviation="4" result="b" />
+ <feMerge>
+ <feMergeNode in="b" />
+ <feMergeNode in="SourceGraphic" />
+ </feMerge>
+ </filter>
+ <filter id={id("deckCoreSoft")} x="-80%" y="-80%" width="260%" height="260%">
+ <feGaussianBlur stdDeviation="9" />
+ </filter>
+ </defs>
+
+ {/* The body: a dark disc with a hairline of gold where it meets the aura. */}
+ <circle cx={128} cy={128} r={124} fill={`url(#${id("deckCoreBody")})`} />
+ <circle
+ cx={128}
+ cy={128}
+ r={124}
+ fill="none"
+ stroke="#e7c46e"
+ strokeWidth={1.5}
+ opacity={0.38}
+ />
+
+ <g className="deck-core-face">
+ {/* Eye glow — the light the eyes throw onto the body. */}
+ <ellipse cx={84} cy={112} rx={26} ry={34} fill="#f8e297" opacity={0.3} filter={`url(#${id("deckCoreSoft")})`} />
+ <ellipse cx={172} cy={112} rx={26} ry={34} fill="#f8e297" opacity={0.3} filter={`url(#${id("deckCoreSoft")})`} />
+
+ {/* Eyes — they blink; pupils and sparkle live inside so they blink along. */}
+ <g className="deck-core-eyes">
+ <ellipse cx={84} cy={112} rx={17} ry={24} fill={`url(#${id("deckCoreGold")})`} filter={`url(#${id("deckCoreGlow")})`} />
+ <ellipse cx={172} cy={112} rx={17} ry={24} fill={`url(#${id("deckCoreGold")})`} filter={`url(#${id("deckCoreGlow")})`} />
+ <g className="deck-core-pupils">
+ <ellipse cx={87} cy={117} rx={6.5} ry={10} fill="#070502" />
+ <ellipse cx={175} cy={117} rx={6.5} ry={10} fill="#070502" />
+ <circle cx={90} cy={104} r={3.2} fill="#ffffff" />
+ <circle cx={178} cy={104} r={3.2} fill="#ffffff" />
+ </g>
+ </g>
+
+ {/* Mouth — breathes at rest, moves while speaking. */}
+ <g className="deck-core-mouth">
+ <ellipse cx={128} cy={170} rx={12} ry={17} fill={`url(#${id("deckCoreGold")})`} filter={`url(#${id("deckCoreGlow")})`} />
+ <ellipse cx={128} cy={170} rx={5} ry={8.5} fill="#070502" />
+ </g>
+ </g>
+ </svg>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/hooks/useElementSize.ts b/jarvis/ui/web/frontend/src/hooks/useElementSize.ts
new file mode 100644
index 0000000000..b584348189
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/hooks/useElementSize.ts
@@ -0,0 +1,37 @@
+import { useLayoutEffect, useState, type RefObject } from "react";
+
+export interface ElementSize {
+ width: number;
+ height: number;
+}
+
+/**
+ * The live content box of an element, in CSS pixels — `{0, 0}` until it has
+ * been laid out (and in environments without layout, such as jsdom).
+ *
+ * Measures once on mount and again on every resize; the state only changes
+ * when the numbers do, so a steady box causes no re-renders.
+ */
+export function useElementSize<T extends HTMLElement>(ref: RefObject<T | null>): ElementSize {
+ const [size, setSize] = useState<ElementSize>({ width: 0, height: 0 });
+
+ useLayoutEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+ const measure = () => {
+ const rect = el.getBoundingClientRect();
+ setSize((prev) =>
+ prev.width === rect.width && prev.height === rect.height
+ ? prev
+ : { width: rect.width, height: rect.height },
+ );
+ };
+ measure();
+ if (typeof ResizeObserver === "undefined") return;
+ const observer = new ResizeObserver(measure);
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, [ref]);
+
+ return size;
+}
diff --git a/jarvis/ui/web/frontend/src/index.css b/jarvis/ui/web/frontend/src/index.css
index ba6402d036..31a6242e36 100644
--- a/jarvis/ui/web/frontend/src/index.css
+++ b/jarvis/ui/web/frontend/src/index.css
@@ -2065,6 +2065,108 @@
animation: none !important;
}
}
+
+ /* ===========================================================
+ Deck orb — the mask inside the orb.
+ `.deck-core` is the dark core with the glowing eyes and mouth
+ (components/deck/OrbCore.tsx); `.deck-orb-glow` is the soft gold
+ halo behind the sphere. The face reuses the mascot's keyframes
+ (auto-blink, pupil drift, mouth breathing, ear-prick, speak,
+ thinking tilt) and reacts to the real voice state through
+ `data-voice`. Reduced motion stops all of it.
+ =========================================================== */
+ .deck-core {
+ display: block;
+ overflow: visible;
+ /* sunk into the aura: a soft shadow where the core meets the weather */
+ filter: drop-shadow(0 0 7px rgba(0, 0, 0, 0.55));
+ }
+ .deck-core .deck-core-face {
+ transform-box: fill-box;
+ transform-origin: 50% 50%;
+ }
+ .deck-core .deck-core-eyes {
+ transform-box: fill-box;
+ transform-origin: 50% 50%;
+ animation: gigi-auto-blink 7s ease-in-out infinite;
+ }
+ .deck-core .deck-core-pupils {
+ transform-box: fill-box;
+ transform-origin: 50% 50%;
+ animation: gigi-pupil-drift 11s ease-in-out infinite;
+ }
+ .deck-core .deck-core-mouth {
+ transform-box: fill-box;
+ transform-origin: 50% 50%;
+ animation: gigi-mouth-idle 5.8s ease-in-out infinite;
+ }
+ /* listening: the eyes prick up */
+ .deck-core[data-voice="listening"] .deck-core-eyes {
+ animation: gigi-ear-prick 1.2s ease-in-out infinite;
+ }
+ /* thinking: the head cocks and the eyes wander */
+ .deck-core[data-voice="thinking"] .deck-core-face {
+ animation: gigi-thinking-tilt 2.4s ease-in-out infinite;
+ }
+ .deck-core[data-voice="thinking"] .deck-core-pupils {
+ animation: deck-core-scan 2.4s ease-in-out infinite;
+ }
+ @keyframes deck-core-scan {
+ 0%,
+ 100% {
+ transform: translate(-6px, -2px);
+ }
+ 50% {
+ transform: translate(6px, -2px);
+ }
+ }
+ /* speaking: the mouth moves */
+ .deck-core[data-voice="speaking"] .deck-core-mouth {
+ animation: gigi-speak 0.35s ease-in-out infinite alternate;
+ }
+ /* error: the gold turns hot */
+ .deck-core[data-voice="error"] {
+ filter: drop-shadow(0 0 7px rgba(0, 0, 0, 0.55)) hue-rotate(-40deg) saturate(1.4);
+ }
+
+ .deck-orb-glow {
+ background: radial-gradient(
+ circle,
+ rgba(248, 226, 151, 0.5) 0%,
+ rgba(231, 196, 110, 0.28) 38%,
+ rgba(210, 147, 24, 0.1) 58%,
+ rgba(210, 147, 24, 0) 70%
+ );
+ opacity: 0.6;
+ transition: opacity 600ms ease;
+ }
+ .deck-orb-glow[data-voice="connecting"],
+ .deck-orb-glow[data-voice="thinking"] {
+ opacity: 0.9;
+ animation: deck-orb-glow-breathe 2.6s ease-in-out infinite;
+ }
+ .deck-orb-glow[data-voice="listening"],
+ .deck-orb-glow[data-voice="speaking"] {
+ opacity: 1;
+ animation: deck-orb-glow-breathe 1.6s ease-in-out infinite;
+ }
+ @keyframes deck-orb-glow-breathe {
+ 0%,
+ 100% {
+ transform: translate(-50%, -50%) scale(1);
+ }
+ 50% {
+ transform: translate(-50%, -50%) scale(1.07);
+ }
+ }
+
+ @media (prefers-reduced-motion: reduce) {
+ .deck-core,
+ .deck-core *,
+ .deck-orb-glow {
+ animation: none !important;
+ }
+ }
}
@layer components {
diff --git a/jarvis/ui/web/frontend/src/lib/deckStage.test.ts b/jarvis/ui/web/frontend/src/lib/deckStage.test.ts
new file mode 100644
index 0000000000..c0fbc91ac4
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/lib/deckStage.test.ts
@@ -0,0 +1,24 @@
+import { describe, expect, test } from "vitest";
+import { orbSizeFor, stageVignette } from "@/lib/deckStage";
+
+describe("orbSizeFor", () => {
+ test("is the maximum until the stage is measured", () => {
+ expect(orbSizeFor(0, 0)).toBe(320);
+ });
+
+ test("fits the room under the headline and stays inside the bounds", () => {
+ expect(orbSizeFor(600, 300)).toBe(228);
+ expect(orbSizeFor(220, 900)).toBe(204);
+ expect(orbSizeFor(120, 120)).toBe(200);
+ expect(orbSizeFor(2000, 2000)).toBe(320);
+ });
+});
+
+describe("stageVignette", () => {
+ test("uses the theme ground colour and scales with the reticle", () => {
+ const css = stageVignette(300);
+ expect(css).toContain("hsl(var(--background)");
+ expect(css).toContain("165px");
+ expect(css).toContain("315px");
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/lib/deckStage.ts b/jarvis/ui/web/frontend/src/lib/deckStage.ts
new file mode 100644
index 0000000000..701c25600e
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/lib/deckStage.ts
@@ -0,0 +1,33 @@
+/**
+ * The deck's centre stage: how large the orb reticle is for the room it has,
+ * and the vignette the wallpaper gets under it.
+ */
+
+const ORB_MIN = 200;
+const ORB_MAX = 320;
+/** Vertical room kept for the headline under the orb (two lines plus the gap). */
+const HEADLINE_RESERVE = 72;
+
+/**
+ * The reticle size for a stage of the given size — as large as the stage
+ * allows, never taller than the room left under the headline, and never past
+ * the point where the reticle stops reading as an instrument. The maximum
+ * until the stage has been measured.
+ */
+export function orbSizeFor(width: number, height: number): number {
+ if (!width || !height) return ORB_MAX;
+ const fit = Math.min(width - 16, height - HEADLINE_RESERVE);
+ return Math.max(ORB_MIN, Math.min(ORB_MAX, Math.floor(fit)));
+}
+
+/**
+ * The stage under the centre: the wallpaper darkens softly around the orb, in
+ * the theme's own ground colour (so it is a light pool in light mode), and the
+ * orb stands on a stage instead of sitting on whatever the wallpaper puts
+ * there. Sized off the reticle so it reads the same at every stage size.
+ */
+export function stageVignette(size: number): string {
+ const inner = Math.round(size * 0.55);
+ const outer = Math.round(size * 1.05);
+ return `radial-gradient(circle at 50% 46%, hsl(var(--background) / 0.9) 0px, hsl(var(--background) / 0.55) ${inner}px, hsl(var(--background) / 0) ${outer}px)`;
+}
diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx
index 6623348961..b942ffd4b2 100644
--- a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx
+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx
@@ -1,4 +1,4 @@
-import { useMemo, type ReactNode } from "react";
+import { useMemo, useRef, type ReactNode } from "react";
import { useEventStore, type VoiceState } from "@/store/events";
import { useDeckStore } from "@/store/deck";
import { VoiceWaveform, type WaveformPhase } from "@/components/overlay/VoiceWaveform";
@@ -19,6 +19,8 @@ import { WikiCard } from "@/components/deck/DeckWiki";
import { useVoiceReadiness } from "@/hooks/useVoiceReadiness";
import { useWakeWord } from "@/hooks/useWakeWord";
import { useVoiceCall } from "@/components/agentic/useVoiceCall";
+import { useElementSize } from "@/hooks/useElementSize";
+import { orbSizeFor, stageVignette } from "@/lib/deckStage";
import { writeDeckMode } from "@/lib/deckMode";
import { cn } from "@/lib/utils";
import { useT } from "@/i18n";
@@ -86,6 +88,13 @@ export function MissionDeckView({
const { config: wakeConfig } = useWakeWord();
const wakePhrase = wakeConfig?.phrase.trim() || assistantName;
+ // The centre grows with the room it has: as large as the stage allows, never
+ // taller than the room left under the headline, and never past the point
+ // where the reticle stops reading as an instrument.
+ const stageRef = useRef<HTMLDivElement>(null);
+ const stage = useElementSize(stageRef);
+ const orbSize = orbSizeFor(stage.width, stage.height);
+
const running = useMemo(
() => thinkingSteps.filter((s) => s.status === "active"),
[thinkingSteps],
@@ -205,11 +214,15 @@ export function MissionDeckView({
<TurnCard className="min-h-0" />
<ApiStatsCard className="min-h-0" />
</div>
- <div className="flex min-h-0 flex-1 flex-col items-center justify-center gap-2 px-2 text-center">
+ <div
+ ref={stageRef}
+ className="flex min-h-0 flex-1 flex-col items-center justify-center gap-2 px-2 text-center"
+ style={{ backgroundImage: stageVignette(orbSize) }}
+ >
<DeckOrb
steps={running}
busy={busy}
- size={236}
+ size={orbSize}
readouts={{
nw: t(`deck.mood_${mood}`),
ne: `${running.length} ${t("deck.orb_steps")}`,