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(sidebar): the Chat row folds its recent chats out, and the IDE's workspaces are a panel of their own

rubenluetke10-beep7ba34f364ebb
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceChats.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceChats.tsx
index ad6214711d..35b1c88fd2 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceChats.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceChats.tsx
@@ -119,8 +119,30 @@ export function WorkspaceChats() {
}, [pendingClose, pushToast]);
return (
- <div data-testid="workspace-chats">
- <div className="px-1 pb-3 pt-2">
+ <div
+ data-testid="workspace-chats"
+ // A framed panel with a heading, not the first rows of the column: the
+ // workspaces are one area and the sections under them are another, and
+ // the frame is the edge between the two. `shrink-0` because the panel
+ // is a child of the sidebar's flex scroll body: an `overflow-hidden`
+ // flex item may shrink to nothing when the column is taller than the
+ // window, and this one did — a two-pixel line where the list should be.
+ className="mx-2 mt-2 shrink-0 overflow-hidden rounded-lg border border-border/60 bg-card/40"
+ >
+ <div className="flex items-center justify-between px-3 pb-1 pt-2">
+ <span className="font-mono text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground">
+ {t("ide_chats.heading")}
+ </span>
+ {workspaces.length > 0 && (
+ <span
+ data-testid="workspace-chats-count"
+ className="font-mono text-[10px] tabular-nums text-muted-foreground/60"
+ >
+ {workspaces.length}
+ </span>
+ )}
+ </div>
+ <div className="px-1 pb-2">
{workspaces.length === 0 ? (
<p className="px-3 py-2 text-[11px] text-muted-foreground/70">
{t("ide_chats.no_workspaces")}
@@ -145,6 +167,10 @@ export function WorkspaceChats() {
);
})
)}
+ </div>
+ {/* The panel's foot: the two ways to add a workspace, on their own
+ shelf under a rule so they are not read as rows of the last band. */}
+ <div className="border-t border-border/50 px-1 py-1">
{/* One more project.
First of the two closing rows and in reading ink rather than muted,
because opening a second folder is the ordinary next thing to want
@@ -159,7 +185,7 @@ export function WorkspaceChats() {
type="button"
onClick={requestAddWorkspace}
data-testid="workspace-chats-new-workspace"
- className="mt-3 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-left text-xs font-medium text-foreground transition-colors hover:bg-background/60"
+ className="flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-left text-xs font-medium text-foreground transition-colors hover:bg-background/60"
>
<FolderPlus aria-hidden className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
{t("ide_chats.new_workspace")}
@@ -313,7 +339,10 @@ function WorkspaceBand({
{panes.length === 0 && archived.length === 0 ? (
<p className="pl-8 pr-2 text-[11px] text-muted-foreground/50">{t("ide_chats.no_sessions")}</p>
) : (
- <ul className="space-y-px">
+ // The rows hang off the folder on a thin guide line drawn at the
+ // centre of the folder's icon, so "this folder, these sessions"
+ // is visible as a tree and not inferred from an indent.
+ <ul className="relative space-y-px before:pointer-events-none before:absolute before:bottom-1 before:left-[15px] before:top-0 before:w-px before:bg-border/70 before:content-['']">
{panes.map((pane) => (
<SessionRow
key={pane.history_id}
@@ -390,7 +419,11 @@ function SessionRow({
className={cn(
"flex w-full items-start gap-2 rounded-lg py-1.5 pl-8 pr-2 text-left transition-colors",
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
- active ? "bg-card text-foreground shadow-sm" : "hover:bg-background/60",
+ // The staged one wears the same yellow edge as the active nav row —
+ // one way of saying "this is where you are" for the whole column.
+ active
+ ? "bg-card text-foreground shadow-[inset_2px_0_0_hsl(var(--primary))]"
+ : "hover:bg-background/60",
)}
>
<AgentMark
diff --git a/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx b/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx
index ae5c6b5ea7..7897c3b2c7 100644
--- a/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx
+++ b/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx
@@ -1,10 +1,9 @@
import { useEffect, useState } from "react";
-import { Archive, MessageSquare, Mic, Trash2 } from "lucide-react";
+import { Archive, ChevronDown, MessageSquare, Mic, Trash2 } from "lucide-react";
import { useAgentChatStore } from "@/store/agentChat";
import { useT } from "@/i18n";
import { cn } from "@/lib/utils";
-import { SidebarGroup } from "@/components/home/SidebarGroup";
import { AllChatsDialog } from "@/components/home/AllChatsDialog";
import { formatChatWhen, useChatRows, type ChatRow } from "@/components/home/chatRows";
import { CONVERSATIONS_REFRESH_MS } from "@/hooks/useConversations";
@@ -14,9 +13,18 @@ export const RECENT_CHATS_UNFOLDED = 15;
/**
* The last conversations — agent chats and voice sessions in one list —
- * from the sidebar. This block is the one long-lived poller of both
- * histories (`useConversations({ poll: true })` for the voice sessions,
- * the agent-chat store's session list for the typed ones).
+ * folded under the sidebar's "Chat" row. This block is the one long-lived
+ * poller of both histories (`useConversations({ poll: true })` for the voice
+ * sessions, the agent-chat store's session list for the typed ones).
+ *
+ * It hangs off the nav row rather than standing above the navigation as its
+ * own titled group. Standing free it was one more list in a column that, in
+ * the Agentic IDE's chat mode, already opened with the workspaces and their
+ * sessions — three lists of rows in a row, no edge between them (maintainer
+ * report 2026-08-27). Under the row it is what it is: the Chat section's own
+ * history, shown when the chevron on that row is opened and folded away
+ * otherwise. The row itself still opens the chat; only the chevron opens the
+ * list, so reaching the section never unfolds thirty rows nobody asked for.
*
* It is a shortcut, not the archive: it shows the handful you touched last
* and hands everything else to "All chats" (components/home/AllChatsDialog),
@@ -57,23 +65,13 @@ export function RecentChats() {
return (
<>
- <SidebarGroup
- title={t("sidebar.recent_chats")}
- action={
- canExpand
- ? {
- label: open ? t("sidebar.show_less") : t("sidebar.show_all"),
- onClick: () => setOpen((v) => !v),
- expanded: open,
- }
- : undefined
- }
- testId="recent-chats"
- >
+ <div data-testid="recent-chats" className="pb-1 pt-0.5">
{shown.length === 0 ? (
- <p className="px-2 py-1 text-[11px] text-muted-foreground/70">{t("sidebar.no_chats")}</p>
+ <p className="py-1 pl-9 pr-2 text-[11px] text-muted-foreground/70">
+ {t("sidebar.no_chats")}
+ </p>
) : (
- <ul className="space-y-px">
+ <ul className={cn("relative space-y-px", TREE_GUIDE)}>
{shown.map((row) => (
<ChatRowItem
key={`${row.kind}-${row.id}`}
@@ -85,32 +83,66 @@ export function RecentChats() {
))}
</ul>
)}
+ {canExpand && (
+ <button
+ type="button"
+ onClick={() => setOpen((v) => !v)}
+ aria-expanded={open}
+ data-testid="recent-chats-more"
+ className={TAIL_ROW}
+ >
+ <ChevronDown
+ aria-hidden
+ className={cn("h-3.5 w-3.5 shrink-0 transition-transform", open && "rotate-180")}
+ />
+ <span className="min-w-0 flex-1 truncate text-xs">
+ {open ? t("sidebar.show_less") : t("sidebar.show_all")}
+ </span>
+ {!open && hidden > 0 && <Count n={hidden} />}
+ </button>
+ )}
{rows.length > 0 && (
<button
type="button"
onClick={() => setArchiveOpen(true)}
data-testid="see-all-chats"
- className={cn(
- "mt-0.5 flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors",
- "text-muted-foreground hover:bg-background/60 hover:text-foreground",
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
- )}
+ className={TAIL_ROW}
>
<Archive aria-hidden className="h-3.5 w-3.5 shrink-0" />
<span className="min-w-0 flex-1 truncate text-xs">{t("sidebar.see_all_chats")}</span>
- {hidden > 0 && (
- <span className="shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground/70">
- +{hidden}
- </span>
- )}
+ {open && hidden > 0 && <Count n={hidden} />}
</button>
)}
- </SidebarGroup>
+ </div>
<AllChatsDialog open={archiveOpen} onOpenChange={setArchiveOpen} />
</>
);
}
+/**
+ * The thin line that ties the rows to the row they hang under — drawn at the
+ * centre of the nav row's icon (12 px padding + half of 16 px), so the list
+ * reads as the Chat row's branch and not as a second list that happens to
+ * follow it.
+ */
+const TREE_GUIDE =
+ "before:pointer-events-none before:absolute before:bottom-1 before:left-5 before:top-1 before:w-px before:bg-border/70 before:content-['']";
+
+/** "Show all" and "See all chats": the two quiet rows that close the list. */
+const TAIL_ROW = cn(
+ "flex w-full items-center gap-2 rounded-lg py-1.5 pl-9 pr-2 text-left transition-colors",
+ "text-muted-foreground hover:bg-background/60 hover:text-foreground",
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
+);
+
+function Count({ n }: { n: number }) {
+ return (
+ <span className="shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground/70">
+ +{n}
+ </span>
+ );
+}
+
function ChatRowItem({
row,
active,
@@ -135,9 +167,13 @@ function ChatRowItem({
data-testid="recent-chat-row"
data-kind={row.kind}
className={cn(
- "flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors",
+ "flex w-full items-center gap-2 rounded-lg py-1.5 pl-9 pr-2 text-left transition-colors",
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
- active ? "bg-card text-foreground shadow-sm" : "hover:bg-background/60",
+ // The open one wears the same yellow edge as the active nav row, so
+ // "where am I" is said in one voice all the way down the column.
+ active
+ ? "bg-card text-foreground shadow-[inset_2px_0_0_hsl(var(--primary))]"
+ : "hover:bg-background/60",
)}
>
<Icon
diff --git a/jarvis/ui/web/frontend/src/components/home/SidebarGroup.tsx b/jarvis/ui/web/frontend/src/components/home/SidebarGroup.tsx
deleted file mode 100644
index 10588eb938..0000000000
--- a/jarvis/ui/web/frontend/src/components/home/SidebarGroup.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { ChevronDown } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-/**
- * A titled block in the sidebar — the uppercase mono label with an optional
- * action on the right ("Show all"), and whatever rows sit under it. Shared by
- * the recent-runs and recent-chats blocks so the two cannot drift apart.
- */
-export function SidebarGroup({
- title,
- action,
- children,
- testId,
-}: {
- title: string;
- action?: { label: string; onClick: () => void; expanded?: boolean };
- children: React.ReactNode;
- testId?: string;
-}) {
- return (
- <section data-testid={testId} className="px-1">
- <div className="flex items-center justify-between px-2 pb-1 pt-2">
- <span className="font-mono text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground">
- {title}
- </span>
- {action && (
- <button
- type="button"
- onClick={action.onClick}
- aria-expanded={action.expanded}
- className="flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-background/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
- >
- {action.label}
- <ChevronDown
- aria-hidden
- className={cn(
- "h-3 w-3 transition-transform",
- action.expanded && "rotate-180",
- )}
- />
- </button>
- )}
- </div>
- {children}
- </section>
- );
-}
diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx
index 361b592451..7c1e7298c2 100644
--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx
@@ -840,3 +840,112 @@ describe("the Agentic IDE's chat face", () => {
expect(screen.getByTestId("nav-row-settings")).toBeTruthy();
});
});
+
+describe("the Chat row's history", () => {
+ /*
+ * The recent conversations hang under the Chat row and fold out on the
+ * row's chevron. The row itself keeps opening the chat: reaching the
+ * section must not unfold the list, and the fold is remembered.
+ */
+ beforeEach(() => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (url: string) =>
+ String(url).startsWith("/api/chats")
+ ? new Response(JSON.stringify([]), { status: 200 })
+ : new Response(JSON.stringify({ sessions: [] }), { status: 200 }),
+ ),
+ );
+ window.localStorage.clear();
+ useEventStore.setState({ connected: true, activeSection: "board", conversations: [] });
+ });
+
+ afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+ window.localStorage.clear();
+ });
+
+ test("folds out on the chevron, not on the row", () => {
+ renderSidebar(SIDEBAR_DEFAULT_WIDTH);
+
+ expect(screen.queryByTestId("recent-chats")).toBeNull();
+
+ act(() => {
+ screen.getByTestId("nav-row-chats").click();
+ });
+ // The row went to the chat and left the list alone.
+ expect(useEventStore.getState().activeSection).toBe("chats");
+ expect(screen.queryByTestId("recent-chats")).toBeNull();
+
+ act(() => {
+ screen.getByTestId("nav-expand-chats").click();
+ });
+ expect(screen.getByTestId("nav-expand-chats").getAttribute("aria-expanded")).toBe("true");
+ expect(screen.getByTestId("recent-chats")).toBeTruthy();
+
+ act(() => {
+ screen.getByTestId("nav-expand-chats").click();
+ });
+ expect(screen.queryByTestId("recent-chats")).toBeNull();
+ });
+
+ test("remembers the fold across a reload", () => {
+ const first = renderSidebar(SIDEBAR_DEFAULT_WIDTH);
+ act(() => {
+ screen.getByTestId("nav-expand-chats").click();
+ });
+ first.unmount();
+
+ renderSidebar(SIDEBAR_DEFAULT_WIDTH);
+ expect(screen.getByTestId("recent-chats")).toBeTruthy();
+ });
+
+ test("no longer stands above the navigation as its own block", () => {
+ renderSidebar(SIDEBAR_DEFAULT_WIDTH);
+ // The old free-standing group is gone: nothing lists chats until the
+ // Chat row is opened.
+ expect(screen.queryByTestId("recent-chats")).toBeNull();
+ expect(screen.getByTestId("nav-row-chats")).toBeTruthy();
+ });
+});
+
+describe("the two areas of the chat face", () => {
+ beforeEach(() => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (url: string) =>
+ String(url).startsWith("/api/chats")
+ ? new Response(JSON.stringify([]), { status: 200 })
+ : new Response(JSON.stringify({ sessions: [] }), { status: 200 }),
+ ),
+ );
+ useIdeChatStore.setState({
+ view: "chat",
+ workspace: { id: "w1", name: "Personal Jarvis", path: "/work/jarvis" },
+ workspaces: [{ id: "w1", name: "Personal Jarvis", folder: "/work/jarvis", active: true }],
+ });
+ });
+
+ afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+ useIdeChatStore.setState({ view: "grid", workspace: null, workspaces: [] });
+ });
+
+ test("heads the sections while the workspace panel stands above them", () => {
+ useEventStore.setState({ activeSection: "agentic-ide" });
+ renderSidebar(SIDEBAR_DEFAULT_WIDTH);
+
+ expect(screen.getByTestId("workspace-chats")).toBeTruthy();
+ expect(screen.getByTestId("sidebar-sections-heading")).toBeTruthy();
+ });
+
+ test("drops the heading with the panel", () => {
+ useEventStore.setState({ activeSection: "settings" });
+ renderSidebar(SIDEBAR_DEFAULT_WIDTH);
+
+ expect(screen.queryByTestId("workspace-chats")).toBeNull();
+ expect(screen.queryByTestId("sidebar-sections-heading")).toBeNull();
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx
index 828085690c..5b2dee29ba 100644
--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx
@@ -1,5 +1,6 @@
import {
Loader2,
+ ChevronDown,
ChevronRight,
PanelLeftClose,
PanelLeftOpen,
@@ -19,7 +20,7 @@ import { useSectionHealth } from "@/hooks/useProviders";
import { usePluginAttention } from "@/hooks/usePluginAttention";
import { useVoiceEngineDisplay } from "@/hooks/useVoiceEngineDisplay";
import { cn } from "@/lib/utils";
-import { useMemo, useState } from "react";
+import { useCallback, useMemo, useState, type ReactNode } from "react";
import { useT } from "@/i18n";
import { BrowserRealtimeControl } from "@/components/voice/BrowserRealtimeControl";
import { SurfaceSwitch } from "@/components/home/SurfaceSwitch";
@@ -38,6 +39,26 @@ import { useAppInstance } from "@/hooks/useAppInstance";
const LOGO_RETRY_MAX = 5;
const LOGO_RETRY_BASE_MS = 1500;
+/** Where the Chat row remembers whether its history is folded out. */
+const CHATS_OPEN_KEY = "jarvis.sidebar.recent-chats-open";
+
+function readChatsOpen(): boolean {
+ try {
+ return window.localStorage.getItem(CHATS_OPEN_KEY) === "1";
+ } catch {
+ return false;
+ }
+}
+
+function writeChatsOpen(open: boolean): void {
+ try {
+ window.localStorage.setItem(CHATS_OPEN_KEY, open ? "1" : "0");
+ } catch {
+ // Storage denied (private window, quota): the fold still works for
+ // this visit, it just starts closed next time.
+ }
+}
+
/**
* The section ids the Agentic IDE answers to.
*
@@ -189,6 +210,23 @@ export function Sidebar({
const ideWorkspaceOpen = useIdeChatStore((s) => s.workspaces.length > 0);
const onIdeSection = IDE_SECTIONS.includes(active);
const chatFace = onIdeSection && ideWorkspaceOpen && ideView === "chat";
+ /*
+ * Is the Chat row's history folded out?
+ *
+ * Opened by the chevron on the row, never by the row itself: pressing
+ * "Chat" goes to the chat, and the list stays the way it was left. It is a
+ * preference rather than a per-visit state — a sidebar that forgets which
+ * rows were open every time the window reloads is one the user keeps
+ * re-opening — so it survives a reload the way the sidebar's width does.
+ */
+ const [chatsOpen, setChatsOpen] = useState(readChatsOpen);
+ const toggleChats = useCallback(() => {
+ setChatsOpen((current) => {
+ const next = !current;
+ writeChatsOpen(next);
+ return next;
+ });
+ }, []);
const resetTranscript = useHomeStore((s) => s.resetTranscript);
// On the voice stage: clear the lane, drop the open voice thread and let the
// backend forget the one it was seeded with. We stay on Voice and the mic
@@ -457,21 +495,24 @@ export function Sidebar({
// and a fixed session list with its own scrollbar would put a hard
// ceiling on how many sessions a workspace may show.
<div className="flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-jarvis">
+ {/* Two areas with an edge between them, not one run of rows. The
+ workspace block is its own framed panel (see WorkspaceChats) and
+ the navigation under it gets a heading of its own for as long as
+ the panel is there — with the workspaces, their sessions and the
+ sections all drawn as the same kind of row, the column read as one
+ long list with no seam (maintainer report 2026-08-27). */}
{chatFace && (
<>
<WorkspaceChats />
- <div className="mx-3 border-t border-border/60" aria-hidden />
+ <div
+ data-testid="sidebar-sections-heading"
+ className="px-4 pb-0.5 pt-3 font-mono text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60"
+ >
+ {t("sidebar.sections")}
+ </div>
</>
)}
<nav className="p-2">
- {/* One list, not two: a voice session IS a run, and showing it as
- "recent run" and "recent chat" read as a duplicate (maintainer,
- 2026-08-23). The Run Inspector keeps the run view.
- Safe to stand under the workspace bands: this lists the front
- page's own conversations, never the IDE's coding sessions (see
- RecentChats) — the two never name the same thing twice. */}
- <RecentChats />
- <div className="mx-1 mb-1 mt-2 border-t border-border/60" aria-hidden />
{NAV_GROUPS.map((group, groupIndex) => (
<ul
key={groupIndex}
@@ -489,6 +530,25 @@ export function Sidebar({
item={item}
label={resolveNavLabel(t, item)}
active={item.matchIds ? item.matchIds.includes(active) : item.id === active}
+ // The Chat row carries its own history: a chevron at
+ // its end folds the recent conversations out under it.
+ // One list, not two: a voice session IS a run, and
+ // showing it as "recent run" and "recent chat" read as
+ // a duplicate (maintainer, 2026-08-23). These are the
+ // front page's own conversations, never the IDE's
+ // coding sessions (see RecentChats) — the two never
+ // name the same thing twice.
+ expand={
+ item.id === "chats"
+ ? {
+ open: chatsOpen,
+ onToggle: toggleChats,
+ label: chatsOpen
+ ? t("sidebar.chats_collapse")
+ : t("sidebar.chats_expand"),
+ }
+ : undefined
+ }
badge={item.id === "agents" ? agentsCount : undefined}
betaLabel={item.beta ? t("nav.agentic_ide_beta") : undefined}
alert={item.id === "apikeys" ? apikeysHasError : false}
@@ -513,7 +573,9 @@ export function Sidebar({
item.id === "skills" && pluginsNeedReconnect ? "plugins" : item.id,
)
}
- />
+ >
+ {item.id === "chats" && chatsOpen ? <RecentChats /> : null}
+ </NavRow>
);
})}
</ul>
@@ -582,12 +644,20 @@ function NavRow({
alertTitle,
warn = false,
warnTitle,
+ expand,
onClick,
+ children,
}: {
item: NavItem;
label: string;
active: boolean;
badge?: number;
+ /** A chevron at the row's end that folds `children` out under the row.
+ * It is a second button beside the row, not a part of it: the row keeps
+ * opening its section, the chevron only opens the list. */
+ expand?: { open: boolean; onToggle: () => void; label: string };
+ /** What hangs under the row while `expand.open` — the Chat row's history. */
+ children?: ReactNode;
/** Small pill rendered right after the label (e.g. "Beta") — set from
* `item.beta`, translated by the caller so this component stays i18n-free. */
betaLabel?: string;
@@ -606,7 +676,7 @@ function NavRow({
const Icon = item.icon;
const hint = alert ? alertTitle : warn ? warnTitle : undefined;
return (
- <li>
+ <li className={cn(expand && "relative")}>
<button
type="button"
data-testid={`nav-row-${item.id}`}
@@ -615,6 +685,8 @@ function NavRow({
className={cn(
"group relative flex w-full items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all",
"hover:bg-background/20",
+ // Leave the chevron its own column so the two buttons never overlap.
+ expand && "pr-9",
active
? "jarvis-message-surface text-foreground shadow-[inset_2px_0_0_hsl(var(--primary))]"
: "text-muted-foreground hover:text-foreground",
@@ -659,6 +731,27 @@ function NavRow({
</span>
)}
</button>
+ {expand && (
+ <button
+ type="button"
+ onClick={expand.onToggle}
+ aria-expanded={expand.open}
+ aria-label={expand.label}
+ title={expand.label}
+ data-testid={`nav-expand-${item.id}`}
+ className={cn(
+ "absolute right-1.5 top-2 flex h-5 w-5 items-center justify-center rounded-md transition-colors",
+ "text-muted-foreground hover:bg-background/60 hover:text-foreground",
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
+ )}
+ >
+ <ChevronDown
+ aria-hidden
+ className={cn("h-3.5 w-3.5 transition-transform", expand.open && "rotate-180")}
+ />
+ </button>
+ )}
+ {expand?.open && children}
</li>
);
}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 79dc1280e2..387efc2256 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -472,6 +472,9 @@
"show_less": "Weniger anzeigen",
"no_chats": "Noch keine Unterhaltungen",
"see_all_chats": "Alle Chats ansehen",
+ "chats_expand": "Letzte Chats anzeigen",
+ "chats_collapse": "Letzte Chats ausblenden",
+ "sections": "Bereiche",
"collapse": "Navigation einklappen",
"expand": "Navigation ausklappen",
"wake_hint": "Sag dein Wake-Word…",
@@ -4851,6 +4854,7 @@
},
"ide_chats": {
"workspace_band": "Workspace {n}",
+ "heading": "Offene Workspaces",
"active": "Aktiv",
"no_folder": "Kein Ordner",
"no_workspaces": "Kein Workspace ist geöffnet.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 1e200f2ff2..e78cbffd4b 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -472,6 +472,9 @@
"show_less": "Show less",
"no_chats": "No conversations yet",
"see_all_chats": "See all chats",
+ "chats_expand": "Show recent chats",
+ "chats_collapse": "Hide recent chats",
+ "sections": "Sections",
"collapse": "Collapse the navigation",
"expand": "Expand the navigation",
"wake_hint": "Say your wake word…",
@@ -4851,6 +4854,7 @@
},
"ide_chats": {
"workspace_band": "Workspace {n}",
+ "heading": "Open workspaces",
"active": "Active",
"no_folder": "No folder",
"no_workspaces": "No workspace is open.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 15b4ec958a..a721545302 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -472,6 +472,9 @@
"show_less": "Mostrar menos",
"no_chats": "Aún no hay conversaciones",
"see_all_chats": "Ver todos los chats",
+ "chats_expand": "Mostrar chats recientes",
+ "chats_collapse": "Ocultar chats recientes",
+ "sections": "Secciones",
"collapse": "Contraer la navegación",
"expand": "Expandir la navegación",
"wake_hint": "Di tu palabra de activación…",
@@ -4851,6 +4854,7 @@
},
"ide_chats": {
"workspace_band": "Workspace {n}",
+ "heading": "Workspaces abiertos",
"active": "Activo",
"no_folder": "Sin carpeta",
"no_workspaces": "No hay ningún workspace abierto.",