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(sidebar): the Verse row opens the full-window playable Verse (#1115)
Ruben Lütked0f642452765
diff --git a/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsxindex 62762d73f8..4a0423dcd9 100644--- a/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsx+++ b/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsx@@ -8,7 +8,7 @@ import {SIDEBAR_RAIL_AT_WIDTH,SIDEBAR_RAIL_WIDTH,} from "@/components/layout/Sidebar";-import { useIdeSidePanelStore } from "@/store/ideSidePanel";+import { useVerseModeStore } from "@/store/verseMode";import { NAV_GROUPS, NAV_FOOTER_ITEMS, SETTINGS_HUB_IDS } from "@/components/layout/navGroups";import { isSectionId, useEventStore } from "@/store/events";import { useQuickSwitcher } from "@/store/quickSwitcher";@@ -716,14 +716,17 @@ describe("compact sidebar navigation", () => {expect(screen.queryByTestId("sidebar-more-panel")).toBeNull();});- test("the Verse row opens the IDE with the Verse over it", () => {- useIdeSidePanelStore.setState({ open: false, maximized: false });+ test("the Verse row opens Agents and asks for the full-window Verse", () => {+ useVerseModeStore.setState({ requested: false, open: false });renderSidebar();fireEvent.click(screen.getByTestId("nav-row-verse"));- expect(useEventStore.getState().activeSection).toBe("agentic-ide");- const panel = useIdeSidePanelStore.getState();- expect(panel.open && panel.maximized && panel.active === "office").toBe(true);- act(() => useIdeSidePanelStore.getState().setOpen(false));+ expect(useEventStore.getState().activeSection).toBe("agents");+ expect(useVerseModeStore.getState().requested).toBe(true);+ // Lit while the Verse is on screen, and the Agents row steps back.+ act(() => useVerseModeStore.setState({ requested: false, open: true }));+ expect(screen.getByTestId("nav-row-verse").className).toContain("jarvis-nav-active");+ expect(screen.getByTestId("nav-row-agents").className).not.toContain("jarvis-nav-active");+ act(() => useVerseModeStore.setState({ open: false }));});test("shows the agents, the IDE, the Verse, the voice, the extensions and the artifacts in that order", () => {diff --git a/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsx b/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsxindex fc1e8e70fe..cd238e2c15 100644--- a/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsx+++ b/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsx@@ -15,7 +15,7 @@ import {} from "@/components/layout/navGroups";import { useEventStore } from "@/store/events";import { useTilingStore } from "@/store/tiling";-import { useIdeSidePanelStore } from "@/store/ideSidePanel";+import { useVerseModeStore } from "@/store/verseMode";import { useSelfBuildWaiting } from "@/hooks/useSelfBuild";import { useSectionPrefetch } from "@/hooks/useSectionPrefetch";import { useVoiceReadiness } from "@/hooks/useVoiceReadiness";@@ -340,29 +340,28 @@ export function Sidebar({// Rows read quietly: regular weight, light ink at// rest (muted grey made every entry look disabled), the icon in the same// ink, a lift on hover. Section labels and tail rows stay muted.- // The Verse is not a section of its own: it is the IDE's office tab- // maximized over the whole view (see IdeLayoutSwitch). Its row opens the- // IDE and switches that face on, so it is one click from anywhere.- const verseOn = useIdeSidePanelStore((s) => s.open && s.maximized && s.active === "office");+ // The Verse is not a section of its own: it is the Agents section's+ // full-window "Verse" face (the playable ship). Its row opens Agents and+ // switches that face on; Escape or the caption switch leads back.+ const verseOn = useVerseModeStore((s) => s.open);const verseItem: NavItem = {- ...findItem("agentic-ide"),+ ...findItem("agents"),labelKey: "nav.verse",fallbackLabel: "Verse",icon: Building2,matchIds: undefined,};const openVerse = () => {- setActive("agentic-ide");- useIdeSidePanelStore.getState().openTab("office");- useIdeSidePanelStore.getState().setMaximized(true);+ useVerseModeStore.getState().request();+ setActive("agents");};const rowClass = "flex min-h-8 w-full items-center gap-3 rounded-lg px-3 text-base text-foreground transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";const renderRow = (raw: NavItem, compact = railed) => {const item = presentNavItem(raw, surface);const isActive = item.matchIds ? item.matchIds.includes(active) : item.id === active;return <NavRow key={item.id} item={item} label={resolveNavLabel(t, item)} compact={compact}- // While the Verse covers the IDE, its own row is the lit one.- active={isActive && !(item.id === "agentic-ide" && verseOn)}+ // While the Verse covers the Agents section, its own row is the lit one.+ active={isActive && !(item.id === "agents" && verseOn)}badge={item.id === "agents" ? agentsCount : item.id === "self-build" ? selfBuildWaiting : undefined}betaLabel={item.beta ? t("nav.agentic_ide_beta") : undefined}alert={item.id === "apikeys" && apikeysHasError} alertTitle={t("sidebar.apikeys_alert")}@@ -565,7 +564,7 @@ export function Sidebar({{renderRow(findItem("agents"))}{renderRow(findItem("agentic-ide"))}<NavRow key="verse" rowId="verse" item={verseItem} label={resolveNavLabel(t, verseItem)}- compact={railed} active={active === "agentic-ide" && verseOn} onClick={openVerse} />+ compact={railed} active={active === "agents" && verseOn} onClick={openVerse} />{renderRow(findItem("dictation"))}</ul><ul className="space-y-px">diff --git a/dodaios/ui/web/frontend/src/store/verseMode.ts b/dodaios/ui/web/frontend/src/store/verseMode.tsnew file mode 100644index 0000000000..b2692b1d89--- /dev/null+++ b/dodaios/ui/web/frontend/src/store/verseMode.ts@@ -0,0 +1,29 @@+import { create } from "zustand";++/**+ * The full-window Verse lives in the Agents section (its "Verse" face). The+ * sidebar's Verse row asks for it from anywhere; the Agents view takes the+ * request when it mounts or while it is open, and reports back whether the+ * Verse is on screen so the row can light up.+ */+interface VerseModeState {+ /** Set by the sidebar row, cleared by the Agents view once it switched. */+ requested: boolean;+ /** True while the Agents view shows the Verse. */+ open: boolean;+ request: () => void;+ take: () => boolean;+ setOpen: (open: boolean) => void;+}++export const useVerseModeStore = create<VerseModeState>((set, get) => ({+ requested: false,+ open: false,+ request: () => set({ requested: true }),+ take: () => {+ if (!get().requested) return false;+ set({ requested: false });+ return true;+ },+ setOpen: (open) => set({ open }),+}));diff --git a/dodaios/ui/web/frontend/src/views/society/SocietyView.test.tsx b/dodaios/ui/web/frontend/src/views/society/SocietyView.test.tsxindex 183c8330bb..f1e033ef05 100644--- a/dodaios/ui/web/frontend/src/views/society/SocietyView.test.tsx+++ b/dodaios/ui/web/frontend/src/views/society/SocietyView.test.tsx@@ -1,5 +1,6 @@import { cleanup, fireEvent, render, screen } from "@testing-library/react";import { afterEach, beforeEach, expect, it, vi } from "vitest";+import { useVerseModeStore } from "@/store/verseMode";import { LAST_AGENT_STORAGE_KEY } from "./lastAgent";import { SocietyView } from "./SocietyView";@@ -62,6 +63,18 @@ it("opens a group from the agent rail and returns to an individual member chat",expect(screen.getByTestId("workspace").textContent).toContain("Specialist");});+it("opens straight into the full-window Verse when the sidebar asked for it", async () => {+ useVerseModeStore.setState({ requested: true, open: false });+ render(<SocietyView />);+ const map = await screen.findByTestId("map");+ expect(map.dataset.active).toBe("true");+ expect(useVerseModeStore.getState()).toMatchObject({ requested: false, open: true });+ fireEvent.click(screen.getByTestId("verse-back"));+ expect(screen.getByTestId("society-world-surface").getAttribute("aria-hidden")).toBe("true");+ expect(useVerseModeStore.getState().open).toBe(false);+ expect(screen.queryByTestId("verse-back")).toBeNull();+});+it("restores the most recently selected agent after the view is remounted", () => {const firstVisit = render(<SocietyView />);fireEvent.click(screen.getByText("Select specialist"));diff --git a/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx b/dodaios/ui/web/frontend/src/views/society/SocietyView.tsxindex 49ceb22288..9b26d3d64c 100644--- a/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx+++ b/dodaios/ui/web/frontend/src/views/society/SocietyView.tsx@@ -1,7 +1,10 @@import { lazy, Suspense, useCallback, useMemo, useState, useEffect } from "react";+import { createPortal } from "react-dom";import { useQueryClient } from "@tanstack/react-query";+import { ArrowLeft } from "lucide-react";import { setMapFullscreen } from "@/lib/mapFullscreen";+import { useVerseModeStore } from "@/store/verseMode";import { inDesktopShell } from "@/lib/nativeDrop";import { useLocaleChunk, useT } from "@/i18n";import { cn } from "@/lib/utils";@@ -148,6 +151,18 @@ export function SocietyView() {};}, []);+ // The sidebar's Verse row: open straight into the full-window Verse,+ // whether this view was already on screen or mounts because of the click.+ // After the mount reset above, so that reset cannot undo the fullscreen.+ const verseRequested = useVerseModeStore((s) => s.requested);+ useEffect(() => {+ if (verseRequested && useVerseModeStore.getState().take()) switchMode("world");+ }, [verseRequested, switchMode]);+ useEffect(() => {+ useVerseModeStore.getState().setOpen(mode === "world");+ }, [mode]);+ useEffect(() => () => useVerseModeStore.getState().setOpen(false), []);+useEffect(() => {const onKey = (event: KeyboardEvent) => {if (event.key === "Escape" && !event.defaultPrevented && !isProtectedMarsInteraction(event.target) && mode === "world" && !openPlace) switchMode("agents");@@ -213,6 +228,18 @@ export function SocietyView() {{createError && <p role="alert" className="bg-card px-4 py-2 text-sm text-destructive">{createError}</p>}{worldVisited ? (<div className={mode === "world" ? "relative flex min-h-0 flex-1" : "hidden"} data-testid="society-world-surface" aria-hidden={mode !== "world"}>+ {/* The way out of the full-window Verse besides Escape: one button+ in the window caption, centred where the old switch sat. */}+ {mode === "world" && createPortal(+ <div className="pointer-events-none fixed inset-x-0 top-0 z-[140] flex h-8 items-center justify-center">+ <button type="button" data-testid="verse-back" onClick={() => switchMode("agents")}+ className="pointer-events-auto inline-flex h-6 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs text-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">+ <ArrowLeft aria-hidden className="h-3.5 w-3.5" />+ {t("common.back")}+ </button>+ </div>,+ document.body,+ )}<div className="min-w-0 flex-1"><CanvasActivity.Provider value={mode === "world" && !openPlace}><Suspense fallback={<div className="relative h-full"><VerseLoadingScreen /></div>}>