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(verse): loading screen and a visible deck switch (#868)

Ruben Lütke5d57047c27e9
diff --git a/dodaios/ui/web/frontend/public/verse/loading.webp b/dodaios/ui/web/frontend/public/verse/loading.webp
new file mode 100644
index 0000000000..693063791d
Binary files /dev/null and b/dodaios/ui/web/frontend/public/verse/loading.webp differ
diff --git a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/OfficeTab.tsx b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/OfficeTab.tsx
index f40bf56604..34be72a4d4 100644
--- a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/OfficeTab.tsx
+++ b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/OfficeTab.tsx
@@ -2,6 +2,7 @@ import { Component, Suspense, lazy, type ErrorInfo, type ReactNode } from "react
import { AlertTriangle, RotateCcw } from "lucide-react";
import { translate, useLocaleChunk } from "@/i18n";
import { useIdeSidePanelStore } from "@/store/ideSidePanel";
+import { VerseLoadingScreen } from "@/components/society/verse/VerseLoadingScreen";
// The ship is a WebGL scene with its own chunk: nothing of it loads until
// someone opens this tab.
@@ -52,7 +53,7 @@ export function OfficeTab() {
<div data-testid="ide-office-tab" className="h-full min-h-0 w-full">
<OfficeTabBoundary>
{ready && (
- <Suspense fallback={<div className="h-full w-full animate-pulse bg-secondary" aria-hidden />}>
+ <Suspense fallback={<div className="relative h-full w-full"><VerseLoadingScreen /></div>}>
<VerseStage initialDeck="engineering" compact onOpenLedger={() => openTab("agents")} />
</Suspense>
)}
diff --git a/dodaios/ui/web/frontend/src/components/society/verse/VerseLoadingScreen.test.tsx b/dodaios/ui/web/frontend/src/components/society/verse/VerseLoadingScreen.test.tsx
new file mode 100644
index 0000000000..9bc6e7994c
--- /dev/null
+++ b/dodaios/ui/web/frontend/src/components/society/verse/VerseLoadingScreen.test.tsx
@@ -0,0 +1,31 @@
+import { act, render, screen } from "@testing-library/react";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { VerseLoadingScreen } from "./VerseLoadingScreen";
+
+describe("VerseLoadingScreen", () => {
+ beforeEach(() => vi.useFakeTimers());
+ afterEach(() => vi.useRealTimers());
+
+ it("shows a busy progress bar below 100 % while the deck loads", () => {
+ render(<VerseLoadingScreen />);
+ const bar = screen.getByRole("progressbar");
+ act(() => { vi.advanceTimersByTime(60_000); });
+ expect(Number(bar.getAttribute("aria-valuenow"))).toBeLessThan(100);
+ expect(screen.getByRole("status").getAttribute("aria-busy")).toBe("true");
+ });
+
+ it("fills the bar, fades out and reports gone once the deck is ready", () => {
+ const onGone = vi.fn();
+ const { rerender } = render(<VerseLoadingScreen onGone={onGone} />);
+ rerender(<VerseLoadingScreen ready onGone={onGone} />);
+ // It never just flashes: the bar fills only after the minimum time on screen.
+ expect(screen.getByRole("progressbar").getAttribute("aria-valuenow")).not.toBe("100");
+ act(() => { vi.advanceTimersByTime(1200); });
+ expect(screen.getByRole("progressbar").getAttribute("aria-valuenow")).toBe("100");
+ act(() => { vi.advanceTimersByTime(300); });
+ expect(screen.getByRole("status").dataset.leaving).toBe("true");
+ expect(onGone).not.toHaveBeenCalled();
+ act(() => { vi.advanceTimersByTime(600); });
+ expect(onGone).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/dodaios/ui/web/frontend/src/components/society/verse/VerseLoadingScreen.tsx b/dodaios/ui/web/frontend/src/components/society/verse/VerseLoadingScreen.tsx
new file mode 100644
index 0000000000..79d213b02a
--- /dev/null
+++ b/dodaios/ui/web/frontend/src/components/society/verse/VerseLoadingScreen.tsx
@@ -0,0 +1,109 @@
+/**
+ * The Verse's loading screen: a full-bleed key art with a big "Loading" title,
+ * a tip and a progress bar laid over it, shown while the ship opens the first
+ * time (code chunk, deck manifest, deck plate). It fades out once the deck is
+ * on screen.
+ *
+ * Kept free of three.js and the stage's other modules so the lazy-loading
+ * fallbacks in front of the stage can show it too. All instances share one
+ * clock, so the bar keeps going instead of restarting when the fallback hands
+ * over to the stage.
+ */
+import { useEffect, useRef, useState } from "react";
+import { useT } from "@/i18n";
+import "./verseLoading.css";
+
+export const LOADING_ART = "/verse/loading.webp";
+
+/** True once the key art is decoded; later instances show it without the fade. */
+let artLoaded = false;
+/** When the first loading screen appeared; shared by every instance. */
+let startedAt: number | null = null;
+/** One tip per opening, the same in every instance. */
+let tipIndex = 0;
+const TIP_COUNT = 3;
+/** A clock older than this belongs to an opening that was abandoned. */
+const STALE_MS = 30_000;
+
+/** Eases toward 92 % within a few seconds; the last bit waits for the real "ready". */
+function guessProgress(elapsedMs: number): number {
+ return 0.92 * (1 - Math.exp(-elapsedMs / 2200));
+}
+
+/** Starts fetching the key art early (on hover over the Verse tab), so the screen never opens blank. */
+export function preloadLoadingArt(): void {
+ if (typeof Image === "undefined") return;
+ const img = new Image();
+ img.fetchPriority = "high";
+ img.src = LOADING_ART;
+}
+
+interface Props {
+ /** True once the deck is on screen: the bar fills and the screen fades out. */
+ ready?: boolean;
+ /** Called after the fade-out, when the screen can be removed. */
+ onGone?: () => void;
+}
+
+const FADE_MS = 520;
+/** A deck that loads in a blink would only flash the screen; it stays at least this long. */
+const MIN_SHOW_MS = 1200;
+
+export function VerseLoadingScreen({ ready = false, onGone }: Props) {
+ const t = useT();
+ // Checked once per instance: a fresh opening starts the clock, a hand-over keeps it.
+ useState(() => {
+ if (startedAt === null || performance.now() - startedAt > STALE_MS) {
+ startedAt = performance.now();
+ tipIndex = Math.floor(Math.random() * TIP_COUNT);
+ }
+ return null;
+ });
+ const title = t("society.office.loading_title");
+ const subtitle = t("society.office.title");
+ const tip = t(`society.office.loading_tip_${tipIndex + 1}`);
+ const [progress, setProgress] = useState(() => guessProgress(performance.now() - (startedAt ?? 0)));
+ const [leaving, setLeaving] = useState(false);
+ // The art fades in once fully decoded; a half-loaded image would paint top-down.
+ const [art, setArt] = useState(artLoaded);
+ const onArt = () => { artLoaded = true; setArt(true); };
+ const gone = useRef(onGone);
+ gone.current = onGone;
+
+ useEffect(() => {
+ if (ready) return;
+ const timer = setInterval(() => setProgress(guessProgress(performance.now() - (startedAt ?? 0))), 120);
+ return () => clearInterval(timer);
+ }, [ready]);
+
+ useEffect(() => {
+ if (!ready) return;
+ const hold = Math.max(0, (startedAt ?? 0) + MIN_SHOW_MS - performance.now());
+ const fill = setTimeout(() => setProgress(1), hold);
+ // Let the full bar show for a beat, then fade.
+ const fade = setTimeout(() => setLeaving(true), hold + 260);
+ const done = setTimeout(() => {
+ startedAt = null;
+ gone.current?.();
+ }, hold + 260 + FADE_MS);
+ return () => { clearTimeout(fill); clearTimeout(fade); clearTimeout(done); };
+ }, [ready]);
+
+ const percent = Math.round(progress * 100);
+ return (
+ <div className="verse-loading" data-leaving={leaving} role="status" aria-live="polite" aria-busy={!ready}>
+ <div className="verse-loading-blur" aria-hidden />
+ <img className="verse-loading-art" fetchPriority="high" src={LOADING_ART} alt="" aria-hidden data-loaded={art} onLoad={onArt} decoding="async" draggable={false} />
+ <div className="verse-loading-shade" aria-hidden />
+ <div className="verse-loading-copy">
+ {subtitle && <span className="verse-loading-sub">{subtitle}</span>}
+ {title && <span className="verse-loading-title">{title}</span>}
+ </div>
+ {tip && <p className="verse-loading-tip">{tip}</p>}
+ <div className="verse-loading-bar" role="progressbar" aria-valuemin={0} aria-valuemax={100} aria-valuenow={percent}>
+ <i style={{ transform: `scaleX(${progress})` }} />
+ <span className="verse-loading-percent" aria-hidden>{percent}%</span>
+ </div>
+ </div>
+ );
+}
diff --git a/dodaios/ui/web/frontend/src/components/society/verse/VerseStage.tsx b/dodaios/ui/web/frontend/src/components/society/verse/VerseStage.tsx
index 6375a05a3c..00115f20ae 100644
--- a/dodaios/ui/web/frontend/src/components/society/verse/VerseStage.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/verse/VerseStage.tsx
@@ -29,7 +29,7 @@ import { openPaneSession } from "../crewFeeds/codingNavigate";
import { useProgressionSync } from "../progression/useProgressionSync";
import { useProgression } from "../progression/progressionStore";
import { RankCard, RanksOverlay, rankForLevel, useCommanderRank, useCommanderUniform } from "./ranks";
-import type { DeckId } from "./decks";
+import { type DeckId } from "./decks";
import type { Deck, Station } from "./content/deck";
import { useDeck } from "./content/useDeck";
import { CAMERA_FAR } from "./engine/plateCamera";
@@ -72,6 +72,7 @@ import { LauncherPanel } from "./hud/LauncherPanel";
import { SimulatorPanel } from "./hud/SimulatorPanel";
import { ViewSettingsPanel } from "./hud/ViewSettingsPanel";
import { StageRuntime } from "./runtime";
+import { VerseLoadingScreen } from "./VerseLoadingScreen";
import { REACTOR_ARENA } from "./combat/arenaReactor";
import { DuelController, type DuelDifficulty } from "./duel/duelController";
import { attachDuelInput } from "./duel/duelInput";
@@ -165,6 +166,8 @@ export function VerseStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpenG
const [eyeDeck, setEyeDeck] = useState<Deck | null>(null);
const [eyeFailed, setEyeFailed] = useState<ReadonlySet<string>>(() => new Set());
const [failure, setFailure] = useState<Error | null>(null);
+ /** The loading screen stays until the first deck is on screen, then fades out for good. */
+ const [loading, setLoading] = useState(true);
const [debug, setDebug] = useState(false);
const [hover, setHover] = useState<Hover>(null);
const [selected, setSelected] = useState<string | null>(null);
@@ -883,7 +886,7 @@ export function VerseStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpenG
{chunkReady && (
<div className="verse-hud">
{!dueling && <FloatingLabels runtime={runtime} plates={plates} station={labelledStation} deck={deck} />}
- {!dueling && <DeckTitle deck={deckId} t={t} counts={counts} rankCard={<RankCard compact={compact} />} />}
+ {!dueling && <DeckTitle deck={deckId} t={t} counts={counts} rankCard={<RankCard compact={compact} />} onLift={() => setPanel("lift")} />}
{!dueling && <Toolbar
t={t}
view={view}
@@ -932,6 +935,7 @@ export function VerseStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpenG
<div className="verse-doors" data-shut={doors !== null} aria-hidden><i /><i /></div>
</div>
)}
+ {loading && <VerseLoadingScreen ready={chunkReady && (plateReady || !!problem || !webgl)} onGone={() => setLoading(false)} />}
</div>
);
}
diff --git a/dodaios/ui/web/frontend/src/components/society/verse/hud/DeckBar.tsx b/dodaios/ui/web/frontend/src/components/society/verse/hud/DeckBar.tsx
index b0035a333f..3c6183da39 100644
--- a/dodaios/ui/web/frontend/src/components/society/verse/hud/DeckBar.tsx
+++ b/dodaios/ui/web/frontend/src/components/society/verse/hud/DeckBar.tsx
@@ -15,9 +15,13 @@ interface TitleProps {
t: (key: string) => string;
counts: { aboard: number; working: number; waiting: number };
rankCard: ReactNode;
+ /** Opens the turbolift. The title is where people look for the other decks, so the switch sits right on it. */
+ onLift: () => void;
}
-export function DeckTitle({ deck, t, counts, rankCard }: TitleProps) {
+const LIFT_ICON = "M3.5 1.5v10M1 4l2.5-2.5L6 4M9.5 11.5v-10M7 9l2.5 2.5L12 9";
+
+export function DeckTitle({ deck, t, counts, rankCard, onLift }: TitleProps) {
return (
<div className="verse-deck">
<div className="verse-deck-head">
@@ -36,6 +40,10 @@ export function DeckTitle({ deck, t, counts, rankCard }: TitleProps) {
)}
</span>
</div>
+ <button type="button" className="verse-deck-switch" onClick={onLift} title={t("verse.tools.lift")}>
+ {icon(LIFT_ICON)}
+ <span>{t("verse.lift.switch")}</span>
+ </button>
</div>
{/* Below the title, never beside it: the two never compete for width. */}
{rankCard && <div className="verse-rank-slot">{rankCard}</div>}
@@ -97,7 +105,7 @@ export function Toolbar({ t, view, firstAvailable, onView, onLift, onCommander,
})}
</div>
<button type="button" className="verse-tool" onClick={onLift} title={t("verse.tools.lift")}>
- {icon("M3.5 1.5v10M1 4l2.5-2.5L6 4M9.5 11.5v-10M7 9l2.5 2.5L12 9")}
+ {icon(LIFT_ICON)}
<span className="verse-tool-text">{t("verse.tools.lift")}</span>
</button>
<button type="button" className="verse-tool" onClick={onCommander} title={t("verse.tools.commander")}>
diff --git a/dodaios/ui/web/frontend/src/components/society/verse/verse.css b/dodaios/ui/web/frontend/src/components/society/verse/verse.css
index cd742672cc..4d7b2ab3dc 100644
--- a/dodaios/ui/web/frontend/src/components/society/verse/verse.css
+++ b/dodaios/ui/web/frontend/src/components/society/verse/verse.css
@@ -102,6 +102,30 @@
.verse-deck-head { display: flex; align-items: stretch; gap: 10px; max-width: 100%; }
+/* The deck switch beside the title: the other decks must be findable without walking to the lift. */
+.verse-deck-switch {
+ pointer-events: auto;
+ align-self: center;
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ height: 26px;
+ padding: 0 10px;
+ font: inherit;
+ font-size: 10px;
+ font-weight: 600;
+ letter-spacing: 0.14em;
+ text-transform: uppercase;
+ white-space: nowrap;
+ color: var(--verse-ink);
+ background: var(--verse-panel);
+ border: 1px solid var(--verse-amber);
+ border-radius: 0;
+ cursor: pointer;
+}
+.verse-deck-switch:hover { border-color: var(--verse-ink); }
+.verse-deck-switch:focus-visible { outline: 1px solid var(--verse-amber); outline-offset: 1px; }
+
.verse-deck-number {
display: grid;
place-items: center;
@@ -378,7 +402,7 @@
/* The compact IDE side panel: tall and narrow. */
.verse-stage[data-compact="true"] .verse-deck { left: 10px; top: 10px; max-width: calc(100% - 20px); }
.verse-stage[data-compact="true"] .verse-deck-number { min-width: 28px; font-size: 15px; }
-.verse-stage[data-compact="true"] .verse-tools { right: 10px; top: auto; bottom: 10px; }
+.verse-stage[data-compact="true"] .verse-tools { right: 10px; top: 10px; }
.verse-stage[data-compact="true"] .verse-tool .verse-tool-text { display: none; }
.verse-stage[data-compact="true"] .verse-card { left: 10px; bottom: 50px; width: auto; right: 10px; }
diff --git a/dodaios/ui/web/frontend/src/components/society/verse/verseLoading.css b/dodaios/ui/web/frontend/src/components/society/verse/verseLoading.css
new file mode 100644
index 0000000000..8469012738
--- /dev/null
+++ b/dodaios/ui/web/frontend/src/components/society/verse/verseLoading.css
@@ -0,0 +1,155 @@
+/*
+ * The Verse loading screen: full-bleed key art, a dark shade at the bottom,
+ * a big slanted uppercase title bottom left, a tip bottom right and a thin
+ * gold progress bar along the bottom edge. Sizes follow the stage, not the
+ * window, so the compact IDE tab gets a smaller version.
+ */
+.verse-loading {
+ --verse-loading-gold: #e2b04a;
+ position: absolute;
+ inset: 0;
+ z-index: 40;
+ overflow: hidden;
+ container-type: size;
+ background: #05070b;
+ color: #f2f4f7;
+ font-family: "Inter Variable", Inter, system-ui, "Segoe UI", sans-serif;
+ opacity: 1;
+ transition: opacity 520ms ease;
+ user-select: none;
+}
+
+.verse-loading[data-leaving="true"] { opacity: 0; pointer-events: none; }
+
+/* A 40 px copy of the key art, inlined: it paints at once while the full image is on its way. */
+.verse-loading-blur {
+ position: absolute;
+ inset: -40px;
+ background: url("data:image/webp;base64,UklGRoYBAABXRUJQVlA4IHoBAADQBwCdASooABYAPrVOnkunJCKhqqoA4BaJQBOmaxyyWAToQfoetImu9XwG9hU7Ug6HSeoAivV8PoIvYjzHbpq/D6stIkpj8AD++FDosBEwKxv/HonVZ8TMW0SivFPGriI6faItIBva95b1o5WS7pQtLF9EVQNzzKm4KekQ195P3uGN8Mmq1N4UUfNf0ELIZ4YsUTWIunx5m7bed+FZ8JEfgF8MmtvW1ME2J0N7DhWxDBkfS2/6xtsoGwpnSCj64Z+Y5mcAhP4fVmnrT7m1H/InQEvRinxPk9lbfPvoHBU9IK+cbheXk3Nxi8MSagczYMES+2bK7MC8NImKrjwZmNjbX89yWnYhfWxNLmwId6MNP9yzyFnG402VM4u4UPHN3d4Aqcocehx3WX/LtN3cDzIu8DgRUubBkN0qayAd8hYw1ZXbBLVYG/P4/Vfym/mZaHU7jfF5SmkdvyT27bIiprNCvy0Tl2tlFesmpp0qF4bjmqekW3fSxyQAAAA=") center 40% / cover no-repeat;
+ filter: blur(24px) saturate(1.2);
+}
+
+.verse-loading-art {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ object-position: center 40%;
+ opacity: 0;
+ transition: opacity 700ms ease;
+ animation: verse-loading-drift 24s ease-in-out infinite alternate;
+}
+
+.verse-loading-art[data-loaded="true"] { opacity: 1; }
+
+/* A slow push-in so the still image feels alive, as on a game's loading screen. */
+@keyframes verse-loading-drift {
+ from { transform: scale(1.02); }
+ to { transform: scale(1.09) translate(-1%, -0.6%); }
+}
+
+.verse-loading-shade {
+ position: absolute;
+ inset: 0;
+ background:
+ linear-gradient(to top, rgba(3, 4, 8, 0.92) 0%, rgba(3, 4, 8, 0.55) 22%, rgba(3, 4, 8, 0) 48%),
+ linear-gradient(to right, rgba(3, 4, 8, 0.5) 0%, rgba(3, 4, 8, 0) 40%);
+}
+
+.verse-loading-copy {
+ position: absolute;
+ left: clamp(16px, 4cqw, 56px);
+ bottom: clamp(28px, 8cqh, 84px);
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ max-width: 70cqw;
+}
+
+.verse-loading-sub {
+ font-size: clamp(10px, 1.3cqw, 15px);
+ font-weight: 700;
+ letter-spacing: 0.22em;
+ text-transform: uppercase;
+ color: var(--verse-loading-gold);
+}
+
+.verse-loading-title {
+ font-size: clamp(30px, 8cqw, 112px);
+ font-weight: 900;
+ font-style: italic;
+ line-height: 0.9;
+ letter-spacing: -0.01em;
+ text-transform: uppercase;
+ transform: skewX(-6deg);
+ transform-origin: left bottom;
+ text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
+}
+
+/* The dots after the title pulse while loading. */
+.verse-loading-title::after {
+ content: "...";
+ display: inline-block;
+ width: 1.6em;
+ padding-right: 0.2em;
+ overflow: hidden;
+ vertical-align: bottom;
+ animation: verse-loading-dots 1.4s steps(4, end) infinite;
+}
+
+@keyframes verse-loading-dots {
+ from { width: 0; }
+ to { width: 1.6em; }
+}
+
+.verse-loading-tip {
+ position: absolute;
+ right: clamp(16px, 4cqw, 56px);
+ bottom: clamp(28px, 8cqh, 84px);
+ max-width: min(420px, 38cqw);
+ margin: 0;
+ font-size: clamp(11px, 1.15cqw, 14px);
+ line-height: 1.45;
+ text-align: right;
+ color: rgba(242, 244, 247, 0.82);
+}
+
+.verse-loading-bar {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: clamp(4px, 0.7cqh, 7px);
+ background: rgba(255, 255, 255, 0.12);
+}
+
+.verse-loading-bar i {
+ position: absolute;
+ inset: 0;
+ background: linear-gradient(to right, #b8862e, var(--verse-loading-gold) 70%, #fff3cf);
+ transform-origin: left center;
+ transition: transform 240ms ease-out;
+}
+
+.verse-loading-percent {
+ position: absolute;
+ right: clamp(16px, 4cqw, 56px);
+ bottom: calc(100% + 8px);
+ font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
+ font-size: clamp(10px, 1.1cqw, 13px);
+ font-weight: 600;
+ color: var(--verse-loading-gold);
+}
+
+/* Narrow stage (IDE side tab): the tip would crowd the title. */
+@container (max-width: 640px) {
+ .verse-loading-tip { display: none; }
+ .verse-loading-copy { max-width: none; right: 16px; }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .verse-loading-art { animation: none; transform: none; }
+ .verse-loading-title::after { animation: none; }
+ .verse-loading { transition: none; }
+}
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.de.json b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.de.json
index 8e6fe4e8cb..ca54fa04f3 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.de.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.de.json
@@ -120,6 +120,7 @@
},
"lift": {
"title": "Turbolift",
+ "switch": "Deck wechseln",
"here": "Dieses Deck"
},
"notice": {
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.en.json b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.en.json
index 62c2f806b4..85257297bb 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.en.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.en.json
@@ -120,6 +120,7 @@
},
"lift": {
"title": "Turbolift",
+ "switch": "Change deck",
"here": "This deck"
},
"notice": {
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.es.json b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.es.json
index 34ed1ecc3d..62aa4db227 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.es.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.es.json
@@ -120,6 +120,7 @@
},
"lift": {
"title": "Turboascensor",
+ "switch": "Cambiar cubierta",
"here": "Esta cubierta"
},
"notice": {
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.pt.json b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.pt.json
index f0a15e2807..d11be5553c 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.pt.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.pt.json
@@ -120,6 +120,7 @@
},
"lift": {
"title": "Turboelevador",
+ "switch": "Mudar de convés",
"here": "Este convés"
},
"notice": {
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.zh.json b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.zh.json
index af08384b40..fac8acc4e7 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.zh.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/ship/verse.zh.json
@@ -120,6 +120,7 @@
},
"lift": {
"title": "升降梯",
+ "switch": "切换甲板",
"here": "当前甲板"
},
"notice": {
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json b/dodaios/ui/web/frontend/src/i18n/locales/society/de.json
index 9d9fdc619c..91b4017dcd 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/de.json
@@ -1062,6 +1062,10 @@
},
"office": {
"title": "Dodaios Verse",
+ "loading_title": "Wird geladen",
+ "loading_tip_1": "Drücke 1 bis 4, um mit dem Turbolift direkt zu einem Deck zu fahren.",
+ "loading_tip_2": "Jeder Coding-Agent, den du startest, arbeitet an einem Terminal auf dem Deck Reaktortechnik.",
+ "loading_tip_3": "Drücke V für die Vogelperspektive über das ganze Deck.",
"viewport": "Dodaios Verse",
"loading": "Das Dodaios Verse wird geöffnet…",
"no_graphics": "3D-Darstellung ist hier nicht verfügbar. Den Status aller Agenten siehst du weiterhin in der Agentenliste.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json b/dodaios/ui/web/frontend/src/i18n/locales/society/en.json
index 7f61a4eef4..6ca01af25a 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/en.json
@@ -1062,6 +1062,10 @@
},
"office": {
"title": "Dodaios Verse",
+ "loading_title": "Loading",
+ "loading_tip_1": "Press 1 to 4 to ride the turbolift straight to a deck.",
+ "loading_tip_2": "Every coding agent you start works at a terminal on Reactor Engineering.",
+ "loading_tip_3": "Press V for a bird's-eye view of the whole deck.",
"viewport": "Dodaios Verse",
"loading": "Opening the Dodaios Verse…",
"no_graphics": "3D rendering is unavailable here. Every agent's status stays available in the agents list.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json b/dodaios/ui/web/frontend/src/i18n/locales/society/es.json
index 1b0557a8b4..9b71d8fe94 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/es.json
@@ -1062,6 +1062,10 @@
},
"office": {
"title": "Dodaios Verse",
+ "loading_title": "Cargando",
+ "loading_tip_1": "Pulsa del 1 al 4 para ir en turboascensor directamente a una cubierta.",
+ "loading_tip_2": "Cada agente de código que inicias trabaja en un terminal de Ingeniería del Reactor.",
+ "loading_tip_3": "Pulsa V para ver toda la cubierta a vista de pájaro.",
"viewport": "Dodaios Verse",
"loading": "Abriendo el Dodaios Verse…",
"no_graphics": "El renderizado 3D no está disponible aquí. El estado de cada agente sigue en la lista de agentes.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json
index 1439d71758..2ebf79cfbf 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json
@@ -1062,6 +1062,10 @@
},
"office": {
"title": "Dodaios Verse",
+ "loading_title": "Carregando",
+ "loading_tip_1": "Pressione de 1 a 4 para ir de turboelevador direto a um convés.",
+ "loading_tip_2": "Cada agente de código que você inicia trabalha em um terminal na Engenharia do Reator.",
+ "loading_tip_3": "Pressione V para ver o convés inteiro de cima.",
"viewport": "Dodaios Verse",
"loading": "A abrir o Dodaios Verse…",
"no_graphics": "A renderização 3D não está disponível aqui. O estado de cada agente continua disponível na lista de agentes.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json
index 937ed8b2c2..479f73af8f 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json
@@ -1062,6 +1062,10 @@
},
"office": {
"title": "Dodaios Verse",
+ "loading_title": "加载中",
+ "loading_tip_1": "按 1 到 4 乘坐升降梯直达对应甲板。",
+ "loading_tip_2": "你启动的每个编码智能体都在反应堆工程区的终端前工作。",
+ "loading_tip_3": "按 V 切换到整层甲板的鸟瞰视角。",
"viewport": "Dodaios Verse",
"loading": "正在打开 Dodaios Verse…",
"no_graphics": "此处无法进行 3D 渲染。每个智能体的状态仍可在智能体列表中查看。",
diff --git a/dodaios/ui/web/frontend/src/views/DodaiosAgentsView.tsx b/dodaios/ui/web/frontend/src/views/DodaiosAgentsView.tsx
index 98d39967e7..82824c5fa4 100644
--- a/dodaios/ui/web/frontend/src/views/DodaiosAgentsView.tsx
+++ b/dodaios/ui/web/frontend/src/views/DodaiosAgentsView.tsx
@@ -6,6 +6,7 @@
import { useLocaleChunk } from "@/i18n";
import type { PlaceId } from "@/components/society/world/islandLayout";
import { VerseStage } from "@/components/society/verse/VerseStage";
+import { VerseLoadingScreen } from "@/components/society/verse/VerseLoadingScreen";
export interface DodaiosAgentsViewProps {
onSelectAgent?: (agentId: string | null) => void;
@@ -18,7 +19,7 @@ export interface DodaiosAgentsViewProps {
export function DodaiosAgentsView({ onSelectAgent, onOpenAgents, onCreateAgent, onOpenGroup, active = true }: DodaiosAgentsViewProps) {
const ready = useLocaleChunk("society");
- if (!ready) return null;
+ if (!ready) return <div className="relative h-full"><VerseLoadingScreen /></div>;
return (
<div className="h-full min-h-0">
<VerseStage active={active} onOpenLedger={onOpenAgents} onSelectAgent={onSelectAgent} onCreateAgent={onCreateAgent} onOpenGroup={onOpenGroup} />
diff --git a/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx b/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx
index 8d4be48f38..260fa11829 100644
--- a/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx
+++ b/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx
@@ -32,9 +32,12 @@ const MODES = [
{ value: "agents", labelKey: "society.roster.title", Icon: Users },
] as const;
+// Small and three.js-free: the fallback in front of the lazy Verse chunk.
+import { VerseLoadingScreen, preloadLoadingArt } from "@/components/society/verse/VerseLoadingScreen";
+
const loadWorld = () => import("@/views/DodaiosAgentsView").then((m) => ({ default: m.DodaiosAgentsView }));
const JarvisAgentsBoard = lazy(loadWorld);
-const preloadWorld = () => { void loadWorld().catch((error) => console.debug("World preload unavailable", error)); };
+const preloadWorld = () => { preloadLoadingArt(); void loadWorld().catch((error) => console.debug("World preload unavailable", error)); };
// Do not evaluate either dialog's 3D dependencies until someone opens it.
const loadBuildingDialog = () => import("@/components/society/card/BuildingCardOverlay")
@@ -223,7 +226,7 @@ export function SocietyView() {
<div className={mode === "world" ? "relative flex min-h-0 flex-1" : "hidden"} data-testid="society-world-surface" aria-hidden={mode !== "world"}>
<div className="min-w-0 flex-1">
<CanvasActivity.Provider value={mode === "world" && !openPlace}>
- <Suspense fallback={<div className="flex h-full items-center justify-center text-sm text-muted-foreground" role="status">{t("society.office.loading")}</div>}>
+ <Suspense fallback={<div className="relative h-full"><VerseLoadingScreen /></div>}>
<JarvisAgentsBoard onSelectAgent={onIslandSelect} onSelectPlace={onIslandPlace} onOpenAgents={() => switchMode("agents")}
active={mode === "world"}
onCreateAgent={createAgent} onOpenGroup={(groupId) => { selectGroup(groupId); switchMode("agents"); }} />