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.

fix(ui): fold the deck into one header row

Harald8131d4db6627
diff --git a/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx b/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx
index d53539f0f8..d4435d745b 100644
--- a/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx
+++ b/jarvis/ui/web/frontend/src/__tests__/topbarUpdateButton.test.tsx
@@ -8,10 +8,7 @@ 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" />,
-}));
+import { useDeckStore } from "@/store/deck";
function mockUpdateStatus(body: Record<string, unknown>): void {
vi.stubGlobal(
@@ -27,7 +24,13 @@ function mockUpdateStatus(body: Record<string, unknown>): void {
describe("TopBar update button", () => {
beforeEach(() => {
- useEventStore.setState({ assistantName: "Assistant", toasts: [] });
+ // The mission deck hides this bar; these tests need the global chrome.
+ useDeckStore.setState({ mode: "classic" });
+ useEventStore.setState({
+ assistantName: "Assistant",
+ toasts: [],
+ activeSection: "settings",
+ });
});
afterEach(() => {
cleanup();
diff --git a/jarvis/ui/web/frontend/src/components/layout/CodingModeBadge.tsx b/jarvis/ui/web/frontend/src/components/layout/CodingModeBadge.tsx
index 1f0047a57b..eee3c441f2 100644
--- a/jarvis/ui/web/frontend/src/components/layout/CodingModeBadge.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/CodingModeBadge.tsx
@@ -32,7 +32,7 @@ import { cn } from "@/lib/utils";
* not even visible — is a footgun. The real switch stays next to the panes it
* affects; this takes the user there.
*/
-export function CodingModeBadge() {
+export function CodingModeBadge({ className }: { className?: string }) {
const t = useT();
const mode = useEventStore((s) => s.codingMode);
const setActiveSection = useEventStore((s) => s.setActiveSection);
@@ -64,11 +64,12 @@ export function CodingModeBadge() {
// to exactly the users who depend on it most.
disabled={activeSection === "agentic-ide" || activeSection === "agentic-ide-classic"}
className={cn(
- "mr-auto inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1",
+ "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1",
"text-xs font-medium transition-colors disabled:cursor-default",
mode.active
? "border-primary/60 bg-primary/15 text-primary hover:bg-primary/25"
: "border-border bg-secondary/40 text-muted-foreground hover:border-primary/40 hover:text-foreground",
+ className,
)}
>
<Brain aria-hidden className="h-3.5 w-3.5" />
diff --git a/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx
index ae737d5b18..04f26b86ce 100644
--- a/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/TopBar.test.tsx
@@ -1,4 +1,4 @@
-import { act, cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { 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";
@@ -12,14 +12,17 @@ vi.mock("@/components/MascotGigi", () => ({
}));
// 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.
-beforeEach(() =>
+// on rather than inheriting whatever a previous one left behind. Classic
+// chat keeps the global bar; the mission deck renders no bar of its own
+// (the actions live in that header — see the deck describe below).
+beforeEach(() => {
useEventStore.setState({
activeSection: "chats",
solo: false,
detachedViews: [],
- }),
-);
+ });
+ useDeckStore.setState({ mode: "classic" });
+});
afterEach(() => vi.restoreAllMocks());
describe("TopBar detach button", () => {
@@ -149,28 +152,19 @@ 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", () => {
+describe("TopBar on the mission deck", () => {
+ it("renders no bar of its own there — the deck header carries the actions", () => {
useDeckStore.setState({ mode: "deck" });
- render(<TopBar />);
- expect(screen.getByTestId("topbar-gigi")).toBeTruthy();
+ const { container } = render(<TopBar />);
+ expect(container.firstChild).toBeNull();
});
- it("steps off on every other section — the sidebar already carries the mark", () => {
+ it("restores the global bar in the main window while chats is detached", () => {
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();
+ useEventStore.setState({ detachedViews: ["chats"] });
+ const { container } = render(<TopBar />);
+ expect(container.firstChild).not.toBeNull();
+ expect(screen.getByRole("button", { name: /^restart$/i })).toBeTruthy();
});
});
diff --git a/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx b/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx
index fda7ac12e7..4a408cf6b1 100644
--- a/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/TopBar.tsx
@@ -7,7 +7,6 @@ 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";
@@ -32,11 +31,13 @@ import { openExternalUrl } from "@/lib/openExternal";
* guard (409 → arm a force override) rather than killing live missions silently.
* We avoid a native ``window.confirm`` on purpose — it blocks the pywebview loop.
*
- * **One section renders the bar itself.** The Agentic IDE is a wall of terminal
- * output with a single header row of its own, and a second full-width bar above
- * it holding two buttons cost that view ~40 px it had better uses for. So the
- * IDE takes `TopBarActions` into its own row and this bar steps aside there —
- * the actions are still on that screen, which is the rule that matters; what
+ * **Two surfaces render the bar themselves.** The Agentic IDE is a wall of
+ * terminal output with a single header row of its own, and a second full-width
+ * bar above it holding two buttons cost that view ~40 px it had better uses
+ * for. The mission deck has the same shape: its HUD is already a header, and
+ * an empty chrome strip above it was a second, boring row. Both take
+ * `TopBarActions` into their own row and this bar steps aside there — the
+ * actions are still on that screen, which is the rule that matters; what
* moved is the furniture around them. Every other view keeps the bar.
*/
const CONFIRM_TIMEOUT_MS = 4000;
@@ -65,26 +66,23 @@ export function TopBar() {
}
/*
- * 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.
+ * The deck already has a header. A second empty strip above it was the
+ * boring row. Same rule as the IDE: this bar steps aside, the actions
+ * move into that header (`MissionDeckView`). While chats is detached the
+ * main window is a placeholder and needs the bar back.
*/
- const showGigi = activeSection === "chats" && deckMode === "deck";
+ const deckOnStage = activeSection === "chats" && deckMode === "deck";
+ const chatsDetached = !solo && detachedViews.includes("chats");
+ if (deckOnStage && !chatsDetached) {
+ return null;
+ }
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 the
- left end of this right-aligned bar and never crowds the buttons. */}
- <CodingModeBadge />
+ {/* Status, not an action — `mr-auto` pins it left so it never crowds
+ the buttons. The deck header does not pass this: it already sits
+ in a right-hand cluster. */}
+ <CodingModeBadge className="mr-auto" />
<TopBarActions />
</div>
);
diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx
index 517f247a33..634b51802f 100644
--- a/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx
@@ -56,6 +56,22 @@ vi.mock("@/lib/voiceApi", () => ({
requestVoiceCall: () => requestVoiceCall(),
requestVoiceHangup: async () => {},
}));
+vi.mock("@/components/MascotGigi", () => ({
+ MascotGigi: () => <div data-testid="mascot-gigi" />,
+}));
+vi.mock("@/components/layout/TopBar", () => ({
+ TopBarActions: () => (
+ <>
+ <button type="button">Restart</button>
+ <button type="button" data-testid="detach-view-button">
+ Own window
+ </button>
+ </>
+ ),
+}));
+vi.mock("@/components/layout/CodingModeBadge", () => ({
+ CodingModeBadge: () => null,
+}));
import { MissionDeckView } from "@/views/MissionDeckView";
import { useDeckStore } from "@/store/deck";
@@ -160,6 +176,13 @@ describe("MissionDeckView — the three acts", () => {
expect(requestVoiceCall).toHaveBeenCalledTimes(1);
});
+ test("the header carries Gigi and the chrome actions — one row, not two", () => {
+ render(<MissionDeckView />);
+ expect(screen.getByTestId("deck-header-gigi")).toBeTruthy();
+ expect(screen.getByRole("button", { name: /^restart$/i })).toBeTruthy();
+ expect(screen.getByTestId("detach-view-button")).toBeTruthy();
+ });
+
test("a deck that mounts into a running session is simply the board — no reveal", () => {
useEventStore.setState({
messages: [{ id: "m1", role: "assistant", content: "Hallo.", ts: Date.now() }],
diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx
index 0649711b2a..c1cd974c67 100644
--- a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx
+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx
@@ -5,6 +5,9 @@ import { useDeckStore } from "@/store/deck";
import { VoiceWaveform, type WaveformPhase } from "@/components/overlay/VoiceWaveform";
import { voiceInputLevelRef } from "@/lib/voiceInputLevel";
import { DockRail } from "@/components/layout/DockRail";
+import { TopBarActions } from "@/components/layout/TopBar";
+import { CodingModeBadge } from "@/components/layout/CodingModeBadge";
+import { MascotGigi } from "@/components/MascotGigi";
import { DeckOrb, type OrbReadouts } from "@/components/deck/DeckOrb";
import type { ThinkingStep } from "@/lib/thinkingSteps";
import { DeckStandby, ORB_TRAVEL } from "@/components/deck/DeckStandby";
@@ -39,7 +42,7 @@ import { useT } from "@/i18n";
* The layout follows the maintainer's sketch of 2026-08-17 (photographed
* rotated; read upright):
*
- * ┌ voice bars · lamps · live counter ─────────── name · brain · switch ┐
+ * ┌ gigi · voice bars · lamps · counter ── name · brain · switch · chrome ┐
* │ dock │ [log — the [response][api] [ WIKI — 3D, tall ] │
* │ │ terminal] ( ORB ) [ ] │
* │ │ [outputs][run] [capture] [terminals] [ide grid] │
@@ -208,9 +211,16 @@ export function MissionDeckView({
return (
<MotionConfig reducedMotion="user">
<div className="flex h-full min-h-0 flex-col">
- {/* Status bar: voice bars, lamps and the live counter left; identity,
- brain and the surface switch right. A thin bracket rule underneath. */}
- <header className="relative flex flex-wrap items-center gap-x-5 gap-y-2 px-4 py-2">
+ {/* One header. The shell TopBar steps aside on this screen (same
+ rule as the IDE): Gigi and the chrome actions live here so the
+ front page is not two bars with a hole between them. */}
+ <header className="relative flex flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2">
+ <span
+ className="flex h-8 w-8 shrink-0 items-center justify-center"
+ data-testid="deck-header-gigi"
+ >
+ <MascotGigi size={32} reactToVoice enableComments={false} />
+ </span>
<div className="flex items-center gap-3">
<VoiceWaveform
levelRef={voiceInputLevelRef}
@@ -238,7 +248,7 @@ export function MissionDeckView({
<LiveCounter />
- <div className="ml-auto flex flex-wrap items-center gap-x-5 gap-y-1">
+ <div className="ml-auto flex flex-wrap items-center gap-x-4 gap-y-1">
<span className="font-display text-sm font-bold uppercase tracking-[0.18em]">
{assistantName}
</span>
@@ -254,6 +264,8 @@ export function MissionDeckView({
onClick={() => setActiveSection("apikeys")}
/>
{headerAccessory}
+ <CodingModeBadge />
+ <TopBarActions />
</div>
<svg