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): keep the window caption over Settings and drop the back rows
rubenluetke10-beep8f9e2499f5cd
diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsxindex d279ef3699..1b0f9a6940 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx@@ -59,8 +59,6 @@ test("IDE rail keeps workspace options and Jarvis Live reachable", () => {expect(options.disabled).toBe(false);fireEvent.click(options);expect(useIdeProjectsStore.getState().action).toMatchObject({ kind: "workspace-options", workspaceId: "w1" });- fireEvent.click(screen.getByTestId("ide-back-to-jarvis"));- expect(useEventStore.getState().activeSection).toBe("chats");cleanup();});@@ -72,8 +70,9 @@ test("IDE sidebar puts Projects first and returns to the normal chat navigation"expect(screen.queryByTestId("ide-workspace-agents")).toBeNull();expect(screen.queryByTestId("sidebar-new-chat")).toBeNull();expect(screen.queryByTestId("nav-row-agentic-ide")).toBeNull();- fireEvent.click(screen.getByTestId("ide-back-to-jarvis"));- expect(useEventStore.getState().activeSection).toBe("chats");+ // No "Back to Jarvis" row: the caption's back arrow leaves the IDE.+ expect(screen.queryByTestId("ide-back-to-jarvis")).toBeNull();+ act(() => useEventStore.setState({ activeSection: "chats" }));expect(screen.getByTestId("sidebar-new-chat")).toBeDefined();cleanup();});diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsxindex 36610145f1..0b71137acd 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx@@ -2,7 +2,6 @@ import {Loader2,Mic,ChevronDown,- ChevronLeft,MoreHorizontal,Plus,} from "lucide-react";@@ -511,13 +510,10 @@ export function Sidebar({</div><div className="flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-jarvis">- {onIdeSection ? <nav aria-label="IDE navigation" className="px-2 pt-2">- <button type="button" data-testid="ide-back-to-jarvis" onClick={() => setActive("chats")}- className="flex min-h-8 w-full items-center gap-2 rounded-md px-2 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <ChevronLeft aria-hidden className="h-3.5 w-3.5 shrink-0" />- {!railed && <span>Back to Jarvis</span>}- </button>- {railed && <div className="mt-2 flex flex-col items-center gap-1 border-t border-border/60 pt-2">+ {/* The IDE has no "back" row: the caption's back arrow leaves it, so+ the workspace tree starts right under the sidebar header. */}+ {onIdeSection ? (railed && <nav aria-label="IDE navigation" className="px-2 pt-2">+ <div className="flex flex-col items-center gap-1"><button type="button" aria-label="Workspace options" title="Workspace options"disabled={!activeIdeWorkspaceId}onClick={() => { if (activeIdeWorkspaceId) openIdeWorkspaceOptions(activeIdeWorkspaceId); }}@@ -528,8 +524,8 @@ export function Sidebar({className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><Mic aria-hidden className="h-4 w-4" /></button>- </div>}- </nav> : <nav aria-label={t("sidebar.sections")} className="space-y-px px-2 py-2">+ </div>+ </nav>) : <nav aria-label={t("sidebar.sections")} className="space-y-px px-2 py-2"><ul className="space-y-px">{/* One door: a fresh typed chat. Voice is a mode INSIDE the chatnow (its top bar's button), so there is nothing to choosediff --git a/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsx b/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsxindex dc7c7cdc97..c05726a54f 100644--- a/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsx@@ -85,8 +85,7 @@ vi.mock("@/views/feedback/FeedbackView", () => ({import { SettingsHubDialog, SettingsHubView as HubView } from "@/views/SettingsHubView";-const noop = () => {};-const SettingsHubView = () => <HubView onClose={noop} />;+const SettingsHubView = () => <HubView />;const NAV_IDS = ["settings",@@ -111,15 +110,21 @@ afterEach(() => {});describe("SettingsHubView header and navigation", () => {- it("separates the navigation from the content and closes through its X", async () => {- const onClose = vi.fn();- render(<HubView onClose={onClose} />);+ it("separates the navigation from the content and opens with the heading", async () => {+ render(<HubView />);await screen.findByTestId("TAB_SETTINGS");expect(screen.getByTestId("settings-hub-sidebar").className).toContain("jarvis-nav-surface");expect(screen.getByTestId("settings-hub-content").parentElement?.className).toContain("jarvis-sheet");- fireEvent.click(screen.getByTestId("settings-hub-close"));- expect(onClose).toHaveBeenCalledOnce();- expect(mockState.setActiveSection).not.toHaveBeenCalled();+ // The caption's back arrow leaves the page; the nav has no row for it.+ expect(screen.queryByTestId("settings-hub-close")).toBeNull();+ expect(screen.queryByText("settings_hub.back_to_app")).toBeNull();+ });++ it("starts below the window caption so its controls stay visible", async () => {+ render(<SettingsHubDialog onClose={vi.fn()} />);+ const dialog = await screen.findByTestId("settings-hub-dialog");+ expect(dialog.className).toContain("top-8");+ expect(dialog.className).not.toContain("inset-0");});it("opens as a named dialog that Escape closes", async () => {diff --git a/jarvis/ui/web/frontend/src/views/SettingsHubView.tsx b/jarvis/ui/web/frontend/src/views/SettingsHubView.tsxindex a8db970871..b95937ab0a 100644--- a/jarvis/ui/web/frontend/src/views/SettingsHubView.tsx+++ b/jarvis/ui/web/frontend/src/views/SettingsHubView.tsx@@ -1,7 +1,7 @@import * as Dialog from "@radix-ui/react-dialog";import { isTourEvent } from "@/components/onboarding/tourEvents";import { lazy, Suspense, useEffect, useMemo, useRef, useState, type ComponentType, type LazyExoticComponent } from "react";-import { ArrowLeft, Loader2, Search, X } from "lucide-react";+import { Loader2, Search, X } from "lucide-react";import {NAV_FOOTER_ITEMS,NAV_GROUPS,@@ -212,7 +212,7 @@ function HubLoadingFallback() {);}-export function SettingsHubView({ onClose }: { onClose: () => void }) {+export function SettingsHubView() {const t = useT();const language = useUiLanguage();const active = useEventStore((s) => s.activeSection);@@ -307,14 +307,9 @@ export function SettingsHubView({ onClose }: { onClose: () => void }) {className="jarvis-nav-surface flex max-h-72 w-full shrink-0 flex-col border-b border-border md:max-h-none md:w-60 md:border-b-0"><div className="px-3 pb-1 pt-3">- {/* The page covers the whole window, so its way out sits where a- full-page settings screen keeps it: first in its own nav. */}- <button type="button" onClick={onClose} data-testid="settings-hub-close"- className="flex h-8 w-full items-center gap-2 rounded-md px-2.5 text-sm text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <ArrowLeft className="h-4 w-4 shrink-0" aria-hidden />- <span className="min-w-0 flex-1 truncate text-left">{t("settings_hub.back_to_app")}</span>- </button>- <p className="px-2.5 pb-3 pt-4 font-display text-lg font-semibold text-foreground-strong">+ {/* No way-out row of its own: the caption's back arrow and Escape+ leave the page, so the heading opens the nav. */}+ <p className="px-2.5 pb-3 pt-1 font-display text-lg font-semibold text-foreground-strong">{t("nav.settings")}</p><div className="relative">@@ -418,11 +413,13 @@ export function SettingsHubView({ onClose }: { onClose: () => void }) {/*** The hub as a full-window page over the current section: it covers the app* sidebar and the stage, wears the same gray ground + rounded reading sheet as- * the app shell, and leaves the 32 px window caption (window controls, drag- * strip) visible above it. Closing it — the X or Escape — returns to the- * section behind it.+ * the app shell, and starts BELOW the 32 px window caption, so back/forward,+ * the drag strip and the window controls stay visible and live. The app root+ * is `isolate`, so the caption's own z-index cannot lift it over this portal;+ * leaving the strip uncovered is the only way it shows. Closing it — the+ * caption's back arrow or Escape — returns to the section behind it.*- * Positioned with `inset-0` rather than a transform: a transform would turn+ * Positioned with fixed insets rather than a transform: a transform would turn* the dialog into the containing block of every `position: fixed` layer a tab* renders inline (an image preview, view-level dialogs) and trap them inside* the page instead of covering the screen.@@ -446,7 +443,7 @@ export function SettingsHubDialog({ onClose }: { onClose: () => void }) {return (<Dialog.Root open onOpenChange={(open) => { if (!open) onClose(); }}><Dialog.Portal>- <Dialog.Overlay className="fixed inset-0 z-40 jarvis-nav-surface" />+ <Dialog.Overlay className="fixed inset-x-0 bottom-0 top-8 z-40 jarvis-nav-surface" /><Dialog.Contentdata-testid="settings-hub-dialog"ref={content}@@ -478,10 +475,10 @@ export function SettingsHubDialog({ onClose }: { onClose: () => void }) {event.preventDefault();}}}- className="jarvis-nav-surface fixed inset-0 z-40 flex flex-col overflow-hidden pt-8 text-foreground outline-none"+ className="jarvis-nav-surface fixed inset-x-0 bottom-0 top-8 z-40 flex flex-col overflow-hidden text-foreground outline-none"><Dialog.Title className="sr-only">{t("nav.settings")}</Dialog.Title>- <SettingsHubView onClose={onClose} />+ <SettingsHubView /></Dialog.Content></Dialog.Portal></Dialog.Root>