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): compact chat titles and promote Jarvis Voice
rubenluetke10-beepf211a8bb5158
diff --git a/jarvis/ui/web/frontend/src/components/home/RecentChats.test.tsx b/jarvis/ui/web/frontend/src/components/home/RecentChats.test.tsxindex 82ba154ed7..b91cf001c9 100644--- a/jarvis/ui/web/frontend/src/components/home/RecentChats.test.tsx+++ b/jarvis/ui/web/frontend/src/components/home/RecentChats.test.tsx@@ -1,7 +1,7 @@import { act, cleanup, fireEvent, render, screen } from "@testing-library/react";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";-import { RecentChats } from "@/components/home/RecentChats";+import { RecentChats, compactChatTitle } from "@/components/home/RecentChats";import { useAgentChatStore } from "@/store/agentChat";import { useEventStore, type ConversationSummary } from "@/store/events";import { useHomeStore } from "@/store/home";@@ -165,3 +165,13 @@ describe("RecentChats", () => {expect(rows[0].getAttribute("data-kind")).toBe("voice");});});++describe("compact chat labels", () => {+ it("leaves a short title readable and bounds long prompt-like titles", () => {+ expect(compactChatTitle("Review agent routines")).toBe("Review agent routines");+ const compact = compactChatTitle("Verify the GitHub marketplace plugin with one read-only request and report the results");+ expect(Array.from(compact).length).toBeLessThanOrEqual(43);+ expect(compact.endsWith("…")).toBe(true);+ expect(compact.split(" ").length).toBeLessThanOrEqual(6);+ });+});diff --git a/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx b/jarvis/ui/web/frontend/src/components/home/RecentChats.tsxindex aca9e64cdb..d47a038833 100644--- a/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx+++ b/jarvis/ui/web/frontend/src/components/home/RecentChats.tsx@@ -56,7 +56,7 @@ export function RecentChats() {<div data-testid="recent-chats" className="pb-1 pt-0.5">{pinnedRows.length > 0 && <section data-testid="pinned-chats" className="mb-6"><h2 className="px-3 pb-2 text-sm font-medium text-muted-foreground">{t("sidebar.pinned")}</h2>- <ul className="space-y-1">{pinnedRows.map((row) => <ChatRowItem key={rowKey(row)} row={row}+ <ul className="space-y-0.5">{pinnedRows.map((row) => <ChatRowItem key={rowKey(row)} row={row}active={isActive(row)} pinned onPin={() => togglePin(row)} onOpen={() => openRow(row)}onDelete={row.kind === "agent" ? () => remove(row) : undefined} />)}</ul></section>}@@ -66,7 +66,7 @@ export function RecentChats() {{t("sidebar.no_chats")}</p>) : (- <ul className="space-y-1">+ <ul className="space-y-0.5">{shown.map((row) => (<ChatRowItemkey={`${row.kind}-${row.id}`}@@ -117,7 +117,7 @@ export function RecentChats() {/** "Show all" and "See all chats": the two quiet rows that close the list. */const TAIL_ROW = cn(- "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left transition-colors",+ "flex h-7 w-full items-center gap-2 rounded-md px-3 text-left transition-colors","text-muted-foreground hover:bg-secondary hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",);@@ -130,6 +130,20 @@ function Count({ n }: { n: number }) {);}+/** Keep the full title for hover and accessibility; only shorten the visible label. */+export function compactChatTitle(title: string): string {+ const normalized = title.trim().replace(/\s+/g, " ");+ const words = normalized.split(" ");+ const candidate = words.slice(0, 6).join(" ");+ const characters = Array.from(candidate);+ if (characters.length <= 42 && words.length <= 6) return normalized;+ let short = characters.slice(0, 42).join("");+ if (characters.length > 42 && short.lastIndexOf(" ") >= 20) {+ short = short.slice(0, short.lastIndexOf(" "));+ }+ return `${short.trimEnd()}…`;+}+function ChatRowItem({row,active,@@ -153,10 +167,11 @@ function ChatRowItem({type="button"onClick={onOpen}title={title}+ aria-label={title}data-testid="recent-chat-row"data-kind={row.kind}className={cn(- "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left transition-colors group-hover:pr-16 group-focus-within:pr-16",+ "flex h-7 w-full items-center gap-2 rounded-md px-3 text-left transition-colors group-hover:pr-16 group-focus-within:pr-16","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",// The open one wears the same accent edge as the active nav row, so// "where am I" is said in one voice all the way down the column.@@ -164,7 +179,7 @@ function ChatRowItem({)}>{pinned && <MessageSquare aria-hidden className="h-4 w-4 shrink-0 text-muted-foreground" />}- <span className="min-w-0 flex-1 truncate text-base text-foreground">{title}</span>+ <span className="min-w-0 flex-1 truncate text-[13px] leading-5 text-foreground">{compactChatTitle(title)}</span></button><button type="button" onClick={onPin} title={t(pinned ? "sidebar.unpin_chat" : "sidebar.pin_chat")}diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsxindex c128ccc1a4..c4b0fca08e 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx@@ -722,7 +722,7 @@ describe("compact sidebar navigation", () => {test("keeps core destinations above visible recent chats", () => {renderSidebar();- for (const id of ["agents", "visualization", "tasks", "plugins", "marketplace"]) {+ for (const id of ["agents", "chats", "tasks", "plugins", "marketplace"]) {expect(screen.getByTestId(`nav-row-${id}`)).toBeTruthy();}expect(screen.getByTestId("recent-chats")).toBeTruthy();@@ -730,6 +730,18 @@ describe("compact sidebar navigation", () => {expect(screen.queryByTestId("nav-row-memory")).toBeNull();});+ test("opens Jarvis Voice directly and keeps artifacts under More", () => {+ useHomeStore.setState({ surface: "chat" });+ renderSidebar();+ expect(screen.queryByTestId("nav-row-visualization")).toBeNull();+ fireEvent.click(screen.getByTestId("nav-row-chats"));+ expect(useHomeStore.getState().surface).toBe("voice");+ expect(useEventStore.getState().activeSection).toBe("chats");+ fireEvent.click(screen.getByTestId("sidebar-more-toggle"));+ fireEvent.click(screen.getByTestId("nav-row-visualization"));+ expect(useEventStore.getState().activeSection).toBe("visualization");+ });+test("expands tools through More without duplicating rows", () => {renderSidebar();fireEvent.click(screen.getByTestId("sidebar-tools-toggle"));diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsxindex 71b6e287e0..043783fe3f 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,+ Mic,ChevronDown,ChevronRight,Folder,@@ -359,7 +360,7 @@ export function Sidebar({const toolIds = ["memory", "board", "docs", "sessions", "run_inspector", "clis", "agentic-ide"];const toolItems = toolIds.map(findItem);const profileItems = [...NAV_GROUPS[3], ...NAV_GROUPS[4], ...NAV_FOOTER_ITEMS];- const primaryIds = ["chats", "agents", "visualization", "tasks", "plugins", "marketplace"];+ const primaryIds = ["chats", "agents", "tasks", "plugins", "marketplace"];const assignedIds = new Set([...primaryIds, ...toolIds, ...profileItems.map((item) => item.id)]);const moreItems = [...toolItems, ...allItems.filter((item) => !assignedIds.has(item.id))];const rowClass = "flex min-h-9 w-full items-center gap-2.5 rounded-md px-3 text-base font-medium text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";@@ -514,7 +515,9 @@ export function Sidebar({{!railed && <span>{t("sidebar.new_chat")}</span>}</button></li>{renderRow(findItem("agents"))}- {renderRow(findItem("visualization"))}+ <NavRow item={{ ...findItem("chats"), icon: Mic }} label="Jarvis Voice" compact={railed}+ active={active === "chats" && surface === "voice"}+ onClick={() => { setSurface("voice"); setActive("chats"); }} /></ul><button type="button" onClick={() => { setToolsOpen(!toolsOpen); setMoreOpen(false); }}aria-expanded={toolsOpen} aria-controls="sidebar-tools" title={t("sidebar.jarvis_tools")}