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
claude/sidebar order flyout (#889)
Ruben Lütkee310586f2828
diff --git a/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsxindex d9c9773cfb..fe4842b190 100644--- a/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsx+++ b/dodaios/ui/web/frontend/src/components/layout/Sidebar.test.tsx@@ -685,17 +685,40 @@ describe("compact sidebar navigation", () => {expect(useEventStore.getState().activeSection).toBe("visualization");});- test("expands tools through More without duplicating rows", () => {+ test("More opens a side panel that closes on a pick", () => {renderSidebar();+ expect(screen.queryByTestId("sidebar-more-panel")).toBeNull();fireEvent.click(screen.getByTestId("sidebar-more-toggle"));- expect(screen.getByTestId("nav-row-memory")).toBeTruthy();+ const panel = screen.getByTestId("sidebar-more-panel");+ // Portaled beside the column, not pushed into it.+ expect(screen.getByTestId("sidebar").contains(panel)).toBe(false);fireEvent.click(screen.getByTestId("nav-row-memory"));expect(useEventStore.getState().activeSection).toBe("memory");- fireEvent.click(screen.getByTestId("sidebar-more-toggle"));- expect(screen.queryByTestId("nav-row-memory")).toBeNull();+ expect(screen.queryByTestId("sidebar-more-panel")).toBeNull();expect(screen.getByTestId("recent-chats")).toBeTruthy();});+ test("More closes on Escape and on a second click", () => {+ renderSidebar();+ fireEvent.click(screen.getByTestId("sidebar-more-toggle"));+ fireEvent.keyDown(document, { key: "Escape" });+ expect(screen.queryByTestId("sidebar-more-panel")).toBeNull();+ fireEvent.click(screen.getByTestId("sidebar-more-toggle"));+ fireEvent.click(screen.getByTestId("sidebar-more-toggle"));+ expect(screen.queryByTestId("sidebar-more-panel")).toBeNull();+ });++ test("shows the agents, the IDE, built for you and the voice in that order", () => {+ renderSidebar();+ const order = ["agents", "agentic-ide", "self-build", "dictation", "plugins"].map(+ (id) => screen.getByTestId(`nav-row-${id}`),+ );+ for (let i = 1; i < order.length; i++) {+ expect(order[i - 1].compareDocumentPosition(order[i]) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+ }+ expect(screen.getByTestId("nav-row-agentic-ide").textContent).not.toContain("Beta");+ });+test("the profile button opens the hub — hub tabs are the hub's own tests", () => {// No popup anymore: entries like Spend live in the hub's left nav// (see SettingsHubView.test), so one click on the profile button is thediff --git a/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsx b/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsxindex 551195ced3..a6f30d5927 100644--- a/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsx+++ b/dodaios/ui/web/frontend/src/components/layout/Sidebar.tsx@@ -21,7 +21,7 @@ import { useSectionHealth } from "@/hooks/useProviders";import { usePluginAttention } from "@/hooks/usePluginAttention";import { clsx } from "clsx";import { cn } from "@/lib/utils";-import { lazy, Suspense, useMemo, useState, type ReactNode } from "react";+import { lazy, Suspense, useMemo, type ReactNode } from "react";import { useT } from "@/i18n";import { RecentChats } from "@/components/home/RecentChats";import { useHomeStore } from "@/store/home";@@ -29,6 +29,7 @@ import { LazyIdeProjectTree } from "@/components/agentic/LazyIdeProjectTree";import { IDE_SECTIONS } from "@/lib/ideSections";import { useIdeProjectsStore } from "@/store/ideProjects";import { SidebarSearchBar } from "@/components/layout/SidebarSearchBar";+import { SidebarMoreFlyout } from "@/components/layout/SidebarMoreFlyout";import { useQuickSwitchSettings } from "@/store/quickSwitchSettings";import { useAppInstance } from "@/hooks/useAppInstance";import { usePublishIdentity } from "@/hooks/usePublishIdentity";@@ -224,7 +225,6 @@ export function Sidebar({* long as any of them is running.*/const onIdeSection = IDE_SECTIONS.includes(active);- const [moreOpen, setMoreOpen] = useState(false);// An empty chat on the front page: nothing open, nothing being read.const onEmptyChat = useAgentChatStore((st) => active === "chats" && !st.activeSessionId && st.timeline.items.length === 0,@@ -531,22 +531,25 @@ export function Sidebar({<Plus aria-hidden strokeWidth={1.75} className="h-[18px] w-[18px] shrink-0" />{!railed && <span>{t("sidebar.new_chat")}</span>}</button></li>+ {/* The order the maintainer chose (2026-10-26): the agents, where+ they code, what they built on their own, the voice, then the+ extensions. */}{renderRow(findItem("agents"))}- {/* What the agents and the loop built on their own, beside them. */}+ {renderRow(findItem("agentic-ide"))}{renderRow(findItem("self-build"))}{renderRow(findItem("dictation"))}</ul><ul className="space-y-px">- {renderRow(findItem("visualization"))}- {renderRow(findItem("agentic-ide"))}{renderRow({ ...findItem("plugins"), labelKey: "sidebar.extensions_label" })}+ {renderRow(findItem("visualization"))}</ul>- <button type="button" onClick={() => { setMoreOpen(!moreOpen); }} aria-expanded={moreOpen}- aria-controls="sidebar-more" title={t("sidebar.more")} data-testid="sidebar-more-toggle" className={cn(rowClass, "text-muted-foreground")}>- <ChevronDown aria-hidden strokeWidth={1.75} className={cn("h-[18px] w-[18px] shrink-0 transition-transform", moreOpen && "rotate-180")} />- {!railed && <span>{t(moreOpen ? "sidebar.show_less" : "sidebar.more")}</span>}- </button>- {moreOpen && <ul id="sidebar-more" className="space-y-1">{moreItems.map((item) => renderRow(item))}</ul>}+ <SidebarMoreFlyout+ items={moreItems}+ railed={railed}+ rowClass={rowClass}+ label={t("sidebar.more")}+ renderRow={(item) => renderRow(item, false)}+ /></nav>}{!railed && (onIdeSection? <LazyIdeProjectTree />diff --git a/dodaios/ui/web/frontend/src/components/layout/SidebarMoreFlyout.tsx b/dodaios/ui/web/frontend/src/components/layout/SidebarMoreFlyout.tsxnew file mode 100644index 0000000000..af137e15a2--- /dev/null+++ b/dodaios/ui/web/frontend/src/components/layout/SidebarMoreFlyout.tsx@@ -0,0 +1,106 @@+import { MoreHorizontal } from "lucide-react";+import { useCallback, useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "react";+import { createPortal } from "react-dom";+import { cn } from "@/lib/utils";+import type { NavItem } from "@/components/layout/navGroups";++/**+ * "More" opens a panel BESIDE the sidebar instead of pushing the rest of the+ * column down (maintainer request 2026-10-26). The panel lives in a portal on+ * <body>, fixed to the viewport, so the sidebar's own scroller cannot clip it;+ * z-[70] is the app's floating level (see DockRail's label).+ *+ * It closes on a pick, a click outside, Escape, or a second click on "More".+ */+export function SidebarMoreFlyout({+ items,+ railed,+ rowClass,+ label,+ renderRow,+}: {+ items: NavItem[];+ railed: boolean;+ rowClass: string;+ label: string;+ renderRow: (item: NavItem) => ReactNode;+}) {+ const [open, setOpen] = useState(false);+ const [pos, setPos] = useState<{ top: number; left: number } | null>(null);+ const buttonRef = useRef<HTMLButtonElement>(null);+ const panelRef = useRef<HTMLDivElement>(null);++ const place = useCallback(() => {+ const rect = buttonRef.current?.getBoundingClientRect();+ if (!rect) return;+ const panelHeight = panelRef.current?.offsetHeight ?? 0;+ // Open level with the button; lift it when it would run off the bottom.+ const maxTop = window.innerHeight - panelHeight - 8;+ setPos({ top: Math.max(8, Math.min(rect.top, maxTop)), left: rect.right + 8 });+ }, []);++ useLayoutEffect(() => {+ if (open) place();+ }, [open, place]);++ useEffect(() => {+ if (!open) return;+ const onPointer = (event: PointerEvent) => {+ const target = event.target as Node;+ if (panelRef.current?.contains(target) || buttonRef.current?.contains(target)) return;+ setOpen(false);+ };+ const onKey = (event: KeyboardEvent) => {+ if (event.key === "Escape") {+ setOpen(false);+ buttonRef.current?.focus();+ }+ };+ document.addEventListener("pointerdown", onPointer);+ document.addEventListener("keydown", onKey);+ window.addEventListener("resize", place);+ return () => {+ document.removeEventListener("pointerdown", onPointer);+ document.removeEventListener("keydown", onKey);+ window.removeEventListener("resize", place);+ };+ }, [open, place]);++ return (+ <>+ <button+ ref={buttonRef}+ type="button"+ onClick={() => { setOpen((v) => !v); }}+ aria-expanded={open}+ aria-haspopup="menu"+ aria-controls="sidebar-more"+ title={label}+ data-testid="sidebar-more-toggle"+ className={cn(rowClass, "text-muted-foreground", open && "bg-secondary text-foreground")}+ >+ <MoreHorizontal aria-hidden strokeWidth={1.75} className="h-[18px] w-[18px] shrink-0" />+ {!railed && <span>{label}</span>}+ </button>+ {open &&+ createPortal(+ <div+ ref={panelRef}+ id="sidebar-more"+ role="menu"+ aria-label={label}+ data-testid="sidebar-more-panel"+ style={{ top: pos?.top ?? 0, left: pos?.left ?? 0, visibility: pos ? "visible" : "hidden" }}+ // A pick closes the panel; the row's own handler opens the section.+ onClick={(event) => {+ if ((event.target as HTMLElement).closest("button")) setOpen(false);+ }}+ className="fixed z-[70] max-h-[calc(100vh-16px)] w-60 overflow-y-auto rounded-xl border border-border bg-popover p-1.5 shadow-float scrollbar-jarvis"+ >+ <ul className="space-y-px">{items.map((item) => renderRow(item))}</ul>+ </div>,+ document.body,+ )}+ </>+ );+}diff --git a/dodaios/ui/web/frontend/src/components/layout/navGroups.ts b/dodaios/ui/web/frontend/src/components/layout/navGroups.tsindex 9d2a07a5a5..e90b40cc99 100644--- a/dodaios/ui/web/frontend/src/components/layout/navGroups.ts+++ b/dodaios/ui/web/frontend/src/components/layout/navGroups.ts@@ -176,7 +176,6 @@ export const NAV_GROUPS: NavItem[][] = [// concerned: someone who stepped back into it should still see where// they are in the navigation.matchIds: ["agentic-ide", "chat-workspace", "agentic-ide-classic"],- beta: true,},],// 3) You — what the assistant knows about the user, and the user's own