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: show task titles in agent rail

Ruben Lütke358e291b66b8
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx
index 89b9a9eec0..74708bbc1c 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx
@@ -2229,6 +2229,53 @@ describe("chat view", () => {
}
});
+ it("uses the live task recap as the rail title and follows it with the agent logo", async () => {
+ const mixed = sessionWith([
+ ["Mika", 0],
+ ["Nova", 1],
+ ]);
+ mixed.terminals[1] = {
+ ...mixed.terminals[1],
+ agent: "codex",
+ display_name: "Codex",
+ };
+ vi.mocked(api.fetchTerminalRecaps).mockResolvedValue({
+ workspace_id: "ide_test",
+ terminals: [
+ {
+ key: "nova",
+ name: "Nova",
+ status: "live",
+ recap: "Fix provider selection priority",
+ recap_detail: "Correct the fallback order used by the provider picker.",
+ },
+ ],
+ });
+
+ renderGrid(mixed);
+ toChat();
+
+ const title = await screen.findByTestId("chat-rail-title-Nova");
+ expect(title.textContent).toBe("Fix provider selection priority");
+ const mark = title.nextElementSibling;
+ expect(mark?.getAttribute("data-testid")).toBe("agent-mark-codex");
+ expect(mark?.querySelector("img")?.getAttribute("src")).toBe(
+ "/provider-logos/openai.svg",
+ );
+ });
+
+ it("uses the last prompt as the title while a recap is not available", () => {
+ const session = sessionWith([["Mika", 0]]);
+ session.terminals[0].last_prompt = "Analyze transcription omissions";
+
+ renderGrid(session);
+ toChat();
+
+ expect(screen.getByTestId("chat-rail-title-Mika").textContent).toBe(
+ "Analyze transcription omissions",
+ );
+ });
+
it("keeps the very same pane elements across a switch and back", () => {
renderGrid(FOUR);
const before = screen.getByTestId("pane-Nova");
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx
index 3880914366..f514171a4c 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx
@@ -53,6 +53,7 @@ import {
type PaneStatus,
type SplitDirection,
} from "./AgenticTerminal";
+import { AgentMark } from "./AgentMark";
import { PaneActivityPill } from "./PaneActivityPill";
import {
AgentPickerMenu,
@@ -1868,6 +1869,10 @@ export function AgenticGrid({
{session.terminals.map((term) => {
const state = statuses[term.name];
const headline = recaps[term.name]?.recap ?? term.recap;
+ const title =
+ headline?.trim() ||
+ term.last_prompt?.trim() ||
+ `${term.display_name || term.name} session`;
const marked = selectedTerminals.has(term.name);
const active = chatSelected === term.name;
return (
@@ -1875,6 +1880,7 @@ export function AgenticGrid({
key={term.key}
type="button"
data-testid={`chat-rail-${term.name}`}
+ aria-label={`${title}, ${term.display_name || term.agent}`}
aria-pressed={selectionMode ? marked : active}
onClick={() =>
// Selection mode borrows the rail: in chat view the grid's
@@ -1902,8 +1908,20 @@ export function AgenticGrid({
)}
/>
)}
- <span className="min-w-0 flex-1 truncate text-xs font-semibold">
- {term.display_name || term.name}
+ <span className="flex min-w-0 flex-1 items-center gap-1.5">
+ <span
+ data-testid={`chat-rail-title-${term.name}`}
+ className="min-w-0 truncate text-xs font-semibold"
+ title={title}
+ >
+ {title}
+ </span>
+ <AgentMark
+ agent={term.agent}
+ label={term.display_name || term.agent}
+ size="sm"
+ className="h-5 w-5 rounded-[4px]"
+ />
</span>
{/* Not "live". Every pane in this list is live, all day —
what the user is scanning for is which of them still
@@ -1914,11 +1932,6 @@ export function AgenticGrid({
{...activityOf(term)}
/>
</span>
- {headline && (
- <span className="mt-1 block truncate text-[11px] leading-snug text-muted-foreground">
- {headline}
- </span>
- )}
</button>
);
})}