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.

fix(chat): drop the CLI's repainted chrome, and give the conversation the page

rubenluetke10-beep56c6277a26e5
diff --git a/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx b/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx
index 4206fcc87c..2849422e67 100644
--- a/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx
+++ b/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx
@@ -72,9 +72,9 @@ export function ChatStream({ terminal, active = true }: ChatStreamProps) {
following.current = node.scrollHeight - node.scrollTop - node.clientHeight < 64;
}}
data-testid="chat-stream"
- className="min-h-0 flex-1 overflow-y-auto scrollbar-jarvis px-8 py-6"
+ className="min-h-0 flex-1 overflow-y-auto scrollbar-jarvis px-8 py-10"
>
- <div className="mx-auto w-full max-w-3xl space-y-4">
+ <div className="mx-auto w-full max-w-[46rem] space-y-6">
{error && (
<div className="flex items-center gap-2 rounded-xl border border-amber-500/25 bg-amber-500/5 px-4 py-3 text-sm text-amber-300">
<TriangleAlert className="h-4 w-4 shrink-0" aria-hidden />
@@ -88,7 +88,7 @@ export function ChatStream({ terminal, active = true }: ChatStreamProps) {
</div>
)}
{lines !== null && events.length === 0 && !error && (
- <p className="text-sm text-muted-foreground">
+ <p className="text-[15px] text-muted-foreground">
The agent is ready. Say what you want done.
</p>
)}
@@ -125,7 +125,7 @@ function Block({ event }: { event: ChatEvent }) {
if (event.kind === "user") {
return (
<div className="flex justify-end">
- <div className="max-w-[85%] rounded-2xl rounded-br-md bg-secondary/70 px-4 py-2.5 text-sm leading-relaxed">
+ <div className="max-w-[80%] whitespace-pre-wrap break-words rounded-3xl bg-secondary/60 px-5 py-3 text-[15px] leading-[1.65]">
{event.text}
</div>
</div>
@@ -134,8 +134,8 @@ function Block({ event }: { event: ChatEvent }) {
if (event.kind === "status") {
return (
- <div className="flex items-center gap-2 text-xs text-muted-foreground">
- <Loader2 className="h-3 w-3 animate-spin" aria-hidden />
+ <div className="flex items-center gap-2 text-[13px] text-muted-foreground">
+ <Loader2 className="h-3.5 w-3.5 animate-spin" aria-hidden />
{event.text}
</div>
);
@@ -148,7 +148,7 @@ function Block({ event }: { event: ChatEvent }) {
type="button"
onClick={() => long && setOpen((v) => !v)}
className={cn(
- "flex w-full items-start gap-2 rounded-lg px-2 py-1.5 text-left text-xs transition-colors",
+ "flex w-full items-start gap-2.5 rounded-lg px-2 py-1.5 text-left text-[13px] transition-colors",
long && "hover:bg-accent/30",
event.kind === "subagent" ? "text-violet-300" : "text-muted-foreground",
)}
@@ -174,7 +174,7 @@ function Block({ event }: { event: ChatEvent }) {
}
return (
- <div className="whitespace-pre-wrap break-words text-sm leading-relaxed text-foreground/90">
+ <div className="whitespace-pre-wrap break-words text-[16px] leading-[1.75] tracking-[-0.003em] text-foreground/95">
{event.text}
</div>
);
diff --git a/jarvis/ui/web/frontend/src/components/chat/chatTranscript.ts b/jarvis/ui/web/frontend/src/components/chat/chatTranscript.ts
index c71c524809..8cf0c0b0ba 100644
--- a/jarvis/ui/web/frontend/src/components/chat/chatTranscript.ts
+++ b/jarvis/ui/web/frontend/src/components/chat/chatTranscript.ts
@@ -47,18 +47,46 @@ export interface ChatEvent {
* leaking back into the conversation.
*/
const BANNER = [
- /^[\s│┃|]*claude code\b/i,
- /^[\s│┃|]*codex\b.*\bv\d/i,
- /^\s*opus\s|^\s*sonnet\s/i,
- /^\s*~[\\/]/,
+ /^[\s\u2502\u2503|]*claude code\b/i,
+ /^[\s\u2502\u2503|]*codex\b.*\bv\d/i,
+ /^\s*(opus|sonnet|haiku|gpt|gemini)\b.*\b(context|effort|max|plus|pro)\b/i,
+ /^\s*~[\/]/,
/^\s*\d+\s+mcp servers?\b/i,
/welcome to/i,
/^\s*auto mode (on|off)\b/i,
/shift\+tab to cycle/i,
- /^\s*[←→]\s*\d+\s+agents?\s*$/i,
+ /^\s*[\u2190\u2192]\s*\d+\s+agents?\s*$/i,
/^\s*for shortcuts\b/i,
+ // The CLI's PERSISTENT chrome — the rows it repaints below its input box on
+ // every frame. They are identical on turn one and turn fifty, they describe
+ // the tool's settings rather than the work, and left in they arrive between
+ // every pair of sentences the agent says.
+ /^\s*[\u{1F4C1}\u{1F33F}\u{1F331}]/u,
+ /^\s*(high|medium|low|minimal)\s*[\u00b7\u2022]\s*\/?(effort|thinking)/i,
+ /^\s*\/(effort|model|mcp|help|clear|resume|status)\b/i,
+ /^\s*\?\s*for shortcuts/i,
+ /^\s*esc to interrupt/i,
+ /\btokens?\b.*\b(used|left|remaining)\b/i,
];
+/**
+ * A row that is picture, not text.
+ *
+ * Coding CLIs draw a mascot, a logo or a box frame out of block glyphs. Those
+ * rows survive into the transcript as runs of block and box-drawing
+ * characters, and rendered in a proportional font they are a smear of grey
+ * rectangles — which is exactly what they looked like. A line whose visible
+ * characters are mostly drawing glyphs is dropped, whatever it spells.
+ */
+const DRAWING = /[\u2500-\u259f\u25a0-\u25ff\u2b1b-\u2b1f]/gu;
+
+function isDrawing(line: string): boolean {
+ const visible = line.replace(/\s/g, "");
+ if (visible.length < 3) return false;
+ const marks = visible.match(DRAWING)?.length ?? 0;
+ return marks / visible.length > 0.4;
+}
+
/** A line the user typed, as the CLI echoes it back. */
const USER_ECHO = /^[\s]*[>›❯]\s?(.*)$/;
@@ -97,6 +125,7 @@ function labelOf(text: string): string {
export function readTranscript(lines: readonly string[]): ChatEvent[] {
const events: ChatEvent[] = [];
let current: ChatEvent | null = null;
+ let pending: string | null = null;
const push = (kind: ChatEventKind, text: string, label?: string) => {
if (current && current.kind === kind && kind !== "user" && kind !== "step") {
@@ -115,7 +144,7 @@ export function readTranscript(lines: readonly string[]): ChatEvent[] {
current = null;
continue;
}
- if (isBanner(line)) continue;
+ if (isBanner(line) || isDrawing(line)) continue;
const echoed = USER_ECHO.exec(line);
if (echoed) {
@@ -127,7 +156,11 @@ export function readTranscript(lines: readonly string[]): ChatEvent[] {
}
if (STATUS.test(line)) {
- push("status", line.trim());
+ // Kept as ONE trailing marker rather than as history: a CLI repaints its
+ // spinner hundreds of times per turn, and every repaint that survived
+ // became another line between two sentences.
+ current = null;
+ pending = line.trim();
continue;
}
@@ -143,7 +176,11 @@ export function readTranscript(lines: readonly string[]): ChatEvent[] {
push("assistant", line.trim());
}
- return events.filter((event) => event.text.trim().length > 0);
+ const kept = events.filter((event) => event.text.trim().length > 0);
+ // The live spinner belongs at the END, where it means "still working", and
+ // nowhere else.
+ if (pending) kept.push({ kind: "status", text: pending });
+ return kept;
}
/** Sub-agents seen in a conversation, newest last — the right-hand panel's list. */