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(docs): give the docs section the whole window

rubenluetke10-beep30107acd109e
diff --git a/jarvis/ui/web/frontend/src/App.detached.test.tsx b/jarvis/ui/web/frontend/src/App.detached.test.tsx
index 8470b1f054..aae507e954 100644
--- a/jarvis/ui/web/frontend/src/App.detached.test.tsx
+++ b/jarvis/ui/web/frontend/src/App.detached.test.tsx
@@ -99,8 +99,8 @@ describe("App shell around detached coding views", () => {
expect(document.documentElement.classList.contains("jarvis-wallpaper")).toBe(false);
});
- it("gives the agents section the whole window", () => {
- useEventStore.setState({ activeSection: "agents" });
+ it.each(["agents", "docs"] as const)("gives the %s section the whole window", (section) => {
+ useEventStore.setState({ activeSection: section });
render(<App />);
diff --git a/jarvis/ui/web/frontend/src/App.tsx b/jarvis/ui/web/frontend/src/App.tsx
index 2219595e18..18a30f3573 100644
--- a/jarvis/ui/web/frontend/src/App.tsx
+++ b/jarvis/ui/web/frontend/src/App.tsx
@@ -1,6 +1,6 @@
import { Suspense, lazy, useCallback, useEffect, useState } from "react";
-import { isSectionId, useEventStore } from "@/store/events";
+import { isSectionId, useEventStore, type SectionId } from "@/store/events";
import { useWebSocket } from "@/hooks/useWebSocket";
import { useBrainStatus } from "@/hooks/useBrainStatus";
import { useVoiceStatus } from "@/hooks/useVoiceStatus";
@@ -65,6 +65,9 @@ import { cn } from "@/lib/utils";
/** Where the collapsed/expanded choice for the nav sidebar is remembered. */
const NAV_COLLAPSED_KEY = "jarvis.sidebar.collapsed.v1";
+/** Sections that fill the whole window instead of sitting beside the nav. */
+const FULLSCREEN_SECTIONS: readonly SectionId[] = ["agents", "docs"];
+
/**
* The surface the active section is drawn on.
*
@@ -278,9 +281,10 @@ export default function App() {
);
const activeSection = useEventStore((s) => s.activeSection);
- // Agents fills the window. The caption's back button leaves it, so the
- // sidebar toggle that used to reveal this column is not needed.
- const agentsFullscreen = activeSection === "agents";
+ // Agents and Docs fill the window: each brings its own navigation column,
+ // and the caption's home/back buttons leave it, so the app sidebar and the
+ // toggle that used to reveal it are not needed there.
+ const sectionFullscreen = FULLSCREEN_SECTIONS.includes(activeSection);
const solo = useEventStore((s) => s.solo);
const detachedViews = useEventStore((s) => s.detachedViews);
@@ -348,7 +352,7 @@ export default function App() {
{brokerMounted && <SubscriptionRealtimeTransportBroker />}
<BrowserRealtimeControl controlOnly />
- {!agentsFullscreen && (
+ {!sectionFullscreen && (
<>
<Sidebar
width={sidebar.size}
@@ -386,7 +390,7 @@ export default function App() {
{/* Gray, like the sidebar. The content panel below rounds its
top-left corner so this gray shows in the curve. */}
<div className="h-8 shrink-0" data-testid="caption-rule" />
- <div className={activeSection === "agents" ? "flex min-h-0 min-w-0 flex-1 flex-col" : "jarvis-sheet flex min-h-0 min-w-0 flex-1 flex-col"}>
+ <div className={sectionFullscreen ? "flex min-h-0 min-w-0 flex-1 flex-col" : "jarvis-sheet flex min-h-0 min-w-0 flex-1 flex-col"}>
{/* Outside input software (dictation, text expanders, auto-type) cannot
reach an elevated window: an OS-level gate the user must be told
about, since nothing else reports it. */}