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): open the agents section across the whole window

rubenluetke10-beep3c34f62d0fd6
diff --git a/jarvis/ui/web/frontend/src/App.detached.test.tsx b/jarvis/ui/web/frontend/src/App.detached.test.tsx
index da7ba1dd3e..b797c6197c 100644
--- a/jarvis/ui/web/frontend/src/App.detached.test.tsx
+++ b/jarvis/ui/web/frontend/src/App.detached.test.tsx
@@ -102,6 +102,16 @@ 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" });
+
+ render(<App />);
+
+ expect(screen.queryByTestId("sidebar")).toBeNull();
+ expect(screen.queryByTestId("sidebar-resizer")).toBeNull();
+ expect(screen.getByTestId("main-view")).toBeTruthy();
+ });
+
it("keeps the sidebar reachable in the main window", () => {
useEventStore.setState({
activeSection: "agentic-ide",
diff --git a/jarvis/ui/web/frontend/src/App.tsx b/jarvis/ui/web/frontend/src/App.tsx
index 7755221a47..e48799febd 100644
--- a/jarvis/ui/web/frontend/src/App.tsx
+++ b/jarvis/ui/web/frontend/src/App.tsx
@@ -266,6 +266,9 @@ 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";
const solo = useEventStore((s) => s.solo);
const detachedViews = useEventStore((s) => s.detachedViews);
@@ -333,20 +336,24 @@ export default function App() {
{brokerMounted && <SubscriptionRealtimeTransportBroker />}
<BrowserRealtimeControl controlOnly />
- <Sidebar
- width={sidebar.size}
- collapsed={activeSection === "agents" ? false : navCollapsed}
- />
+ {!agentsFullscreen && (
+ <>
+ <Sidebar
+ width={sidebar.size}
+ collapsed={navCollapsed}
+ />
- <PaneResizer
- showLine={false}
- orientation="vertical"
- onPointerDown={startSidebarResize}
- onDoubleClick={sidebar.reset}
- onNudge={sidebar.nudge}
- active={sidebar.isResizing}
- title="Drag to resize the sidebar — double-click to reset"
- />
+ <PaneResizer
+ showLine={false}
+ orientation="vertical"
+ onPointerDown={startSidebarResize}
+ onDoubleClick={sidebar.reset}
+ onNudge={sidebar.nudge}
+ active={sidebar.isResizing}
+ title="Drag to resize the sidebar — double-click to reset"
+ />
+ </>
+ )}
{/*
The stage column carries NO z-index, and must not get one back.
diff --git a/jarvis/ui/web/frontend/src/components/layout/SectionNavButtons.test.tsx b/jarvis/ui/web/frontend/src/components/layout/SectionNavButtons.test.tsx
index f1f718f078..1f9594cc64 100644
--- a/jarvis/ui/web/frontend/src/components/layout/SectionNavButtons.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/SectionNavButtons.test.tsx
@@ -44,6 +44,15 @@ describe("SectionNavButtons", () => {
}
});
+ it("leaves a freshly opened agents section for the front page", () => {
+ useEventStore.setState({ activeSection: "agents" });
+ render(<SectionNavButtons />);
+
+ expect(backButton().disabled).toBe(false);
+ fireEvent.click(backButton());
+ expect(useEventStore.getState().activeSection).toBe("chats");
+ });
+
it("walks back to the last visited section on every section", () => {
render(<SectionNavButtons />);
diff --git a/jarvis/ui/web/frontend/src/hooks/useSectionHistory.test.ts b/jarvis/ui/web/frontend/src/hooks/useSectionHistory.test.ts
index b0b0088a6e..5e4b2b0f42 100644
--- a/jarvis/ui/web/frontend/src/hooks/useSectionHistory.test.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useSectionHistory.test.ts
@@ -109,6 +109,24 @@ describe("useSectionHistory", () => {
expect(useEventStore.getState().activeSection).toBe("agents");
});
+ it("leaves a freshly opened agents section for the front page", () => {
+ useEventStore.setState({ activeSection: "agents" });
+ const { result } = renderHook(() => useSectionHistory());
+
+ expect(result.current.canGoBack).toBe(true);
+ expect(result.current.canGoForward).toBe(false);
+
+ let target: string | null = null;
+ act(() => {
+ target = result.current.goBack();
+ });
+
+ expect(target).toBe("chats");
+ expect(useEventStore.getState().activeSection).toBe("chats");
+ expect(result.current.canGoBack).toBe(false);
+ expect(result.current.canGoForward).toBe(true);
+ });
+
it("ignores a back step with no history", () => {
const { result } = renderHook(() => useSectionHistory());
expect(result.current.canGoBack).toBe(false);
diff --git a/jarvis/ui/web/frontend/src/hooks/useSectionHistory.ts b/jarvis/ui/web/frontend/src/hooks/useSectionHistory.ts
index 40e808f7ef..ea3ad55179 100644
--- a/jarvis/ui/web/frontend/src/hooks/useSectionHistory.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useSectionHistory.ts
@@ -63,6 +63,19 @@ export const useSectionNavHistory = create<SectionNavHistoryState>((set, get) =>
goBack: () => {
const { current, past, future } = get();
+ const section = current ?? useEventStore.getState().activeSection;
+ // Agents has no sidebar. With no earlier visit, back still leaves it
+ // for the front page — that is what replaced the sidebar toggle.
+ if (section === "agents" && past.length === 0) {
+ set({
+ current: "chats",
+ past: [],
+ future: ["agents", ...future].slice(0, MAX_HISTORY),
+ navigating: true,
+ });
+ useEventStore.getState().setActiveSection("chats");
+ return "chats";
+ }
if (current === null || past.length === 0) return null;
const target = past[past.length - 1];
if (target === current) {
@@ -121,7 +134,8 @@ export interface SectionHistory {
* path would cover one. "Back" returns to the previously visited section and
* "forward" only re-applies an undone step: it stays disabled until a step was
* undone, and any new visit clears the redo stack, because a section never
- * visited cannot be gone to.
+ * visited cannot be gone to. Agents is the exception: it fills the window and
+ * has no sidebar, so back leaves it for the front page even on the first visit.
*/
export function useSectionHistory(): SectionHistory {
const activeSection = useEventStore((s) => s.activeSection);
@@ -136,7 +150,7 @@ export function useSectionHistory(): SectionHistory {
}, [activeSection, record]);
return {
- canGoBack: past.length > 0,
+ canGoBack: past.length > 0 || activeSection === "agents",
canGoForward: future.length > 0,
goBack,
goForward,
diff --git a/jarvis/ui/web/frontend/src/views/society/SocietyView.test.tsx b/jarvis/ui/web/frontend/src/views/society/SocietyView.test.tsx
index b597467b60..941758a099 100644
--- a/jarvis/ui/web/frontend/src/views/society/SocietyView.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/society/SocietyView.test.tsx
@@ -120,7 +120,7 @@ it("navigates back through the window caption instead of a sections toggle", ()
render(<SocietyView />);
expect(screen.queryByRole("button", { name: "society.world.toggle_sections" })).toBeNull();
expect(screen.queryByRole("button", { name: "settings_hub.back_to_app" })).toBeNull();
- // The caption sidebar toggle (owned by TopBar) is the way back to the app.
+ // The caption back button leaves this fullscreen section. The sidebar toggle is gone.
expect(screen.getByTestId("mode-switch")).toBeTruthy();
});