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
fix(ui): put a compact Gigi in the deck top bar
Haraldce480078a78d
diff --git a/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx b/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsxindex e3eb83646a..d53539f0f8 100644--- a/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx+++ b/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx@@ -9,6 +9,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { TopBar } from "@/components/layout/TopBar";import { useEventStore } from "@/store/events";+vi.mock("@/components/MascotGigi", () => ({+ MascotGigi: () => <div data-testid="mascot-gigi" />,+}));+function mockUpdateStatus(body: Record<string, unknown>): void {vi.stubGlobal("fetch",diff --git a/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsxindex 7f5df97e4f..ae737d5b18 100644--- a/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx@@ -1,11 +1,15 @@-import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";+import { act, cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { TopBar, TopBarActions } from "./TopBar";import { useEventStore } from "@/store/events";+import { useDeckStore } from "@/store/deck";vi.mock("@/hooks/useUpdate", () => ({useUpdate: () => ({ status: { managed: false, update_available: false } }),}));+vi.mock("@/components/MascotGigi", () => ({+ MascotGigi: () => <div data-testid="mascot-gigi" />,+}));// The bar is section-aware now, so every test below states which screen it is// on rather than inheriting whatever a previous one left behind.@@ -145,6 +149,31 @@ describe("TopBar restart button", () => {* through that Restart button, so a refactor that quietly drops it from the IDE* would leave the section with no way to pick up its own rebuild.*/+describe("TopBar Gigi on the mission deck", () => {+ afterEach(() => {+ act(() => useDeckStore.setState({ mode: "deck" }));+ });++ it("sits in the top-left while the deck is the front page", () => {+ useDeckStore.setState({ mode: "deck" });+ render(<TopBar />);+ expect(screen.getByTestId("topbar-gigi")).toBeTruthy();+ });++ it("steps off on every other section — the sidebar already carries the mark", () => {+ useDeckStore.setState({ mode: "deck" });+ useEventStore.setState({ activeSection: "tasks" });+ render(<TopBar />);+ expect(screen.queryByTestId("topbar-gigi")).toBeNull();+ });++ it("steps off classic chat, where the sidebar is back", () => {+ useDeckStore.setState({ mode: "classic" });+ render(<TopBar />);+ expect(screen.queryByTestId("topbar-gigi")).toBeNull();+ });+});+describe("TopBar in the classic terminal grid", () => {it("renders no bar of its own there", () => {useEventStore.setState({ activeSection: "agentic-ide-classic" });diff --git a/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx b/jarvis/ui/web/frontend/src/components/layout/TopBar.tsxindex e7a4b9e3f7..fda7ac12e7 100644--- a/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx@@ -2,10 +2,12 @@ import { useCallback, useEffect, useRef, useState } from "react";import { AppWindow, Download, RotateCw } from "lucide-react";import { useEventStore, type SectionId } from "@/store/events";+import { useDeckStore } from "@/store/deck";import { useUpdate } from "@/hooks/useUpdate";import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { CodingModeBadge } from "@/components/layout/CodingModeBadge";+import { MascotGigi } from "@/components/MascotGigi";import { hasEmbeddedDesktopBridge } from "@/components/voice/BrowserRealtimeControl";import { openExternalUrl } from "@/lib/openExternal";@@ -49,6 +51,7 @@ export function TopBar() {const activeSection = useEventStore((s) => s.activeSection);const solo = useEventStore((s) => s.solo);const detachedViews = useEventStore((s) => s.detachedViews);+ const deckMode = useDeckStore((s) => s.mode);// The coding workspace takes the actions into its own toolbar row, under// every id that reaches it. The rule is "the section carries the actions// itself" — a section that does not would lose Restart, which is the one@@ -61,8 +64,24 @@ export function TopBar() {return null;}+ /*+ * The deck hides the sidebar, and the sidebar is where Gigi lives on every+ * other screen. Without him here the top-left of the front page is a blank+ * strip. He stays a compact header mark — not the wallpaper overlay that+ * used to sit in every empty section corner.+ */+ const showGigi = activeSection === "chats" && deckMode === "deck";+return (<div className="jarvis-shell-surface flex h-10 shrink-0 items-center justify-end gap-2 border-b border-border px-4 backdrop-blur-md">+ {showGigi ? (+ <span+ className="mr-auto flex h-8 w-8 shrink-0 items-center justify-center"+ data-testid="topbar-gigi"+ >+ <MascotGigi size={32} reactToVoice enableComments={false} />+ </span>+ ) : null}{/* Status, not an action — carries its own `mr-auto` so it sits at theleft end of this right-aligned bar and never crowds the buttons. */}<CodingModeBadge />