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(agentic-ide): give an alternate-screen pane a door instead of a dead rail
rubenluetke10-beepc41ef9aa06d6
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsxindex 3cc3f82c7d..e5ce8901ba 100644--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx@@ -1763,6 +1763,7 @@ export function AgenticTerminal({epoch={terminalEpoch}appearance={appearance}onFocus={onFocus}+ onOpenHistory={() => setHistoryOpen(true)}/><PaneConversationDialogterminal={name}diff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.test.tsxindex 9204f0406c..8584195d87 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.test.tsx@@ -112,7 +112,15 @@ function fakeTerminal({};}-function RailHarness({ name, term }: { name: string; term: Terminal }) {+function RailHarness({+ name,+ term,+ onOpenHistory,+}: {+ name: string;+ term: Terminal;+ onOpenHistory?: () => void;+}) {const regionRef = useRef<HTMLDivElement | null>(null);const hostRef = useRef<HTMLDivElement | null>(null);const terminalRef = useRef<Terminal | null>(term);@@ -129,6 +137,7 @@ function RailHarness({ name, term }: { name: string; term: Terminal }) {terminalRef={terminalRef}epoch={1}appearance="dark"+ onOpenHistory={onOpenHistory}/></div>);@@ -262,25 +271,37 @@ describe("PaneScrollRail", () => {// bright bar that reads as a grip stuck at full height.expect(rail.dataset.scrollState).toBe("app");expect(thumb.style.height).toBe("200px");- expect(thumb.className).toContain("bg-[#e7c46e]/20");+ expect(thumb.className).toContain("bg-[#e7c46e]/30");expect(rail.title).toBe(- "Scroll Ida: a full-screen app owns this pane right now",+ "Scroll Ida: this CLI draws a full screen and keeps its own history — open the pane history to scroll it",);});- it("points at the pane history when an app hides real scrollback", () => {- const harness = fakeTerminal({- type: "alternate",- line: 0,- maxLine: 0,- normalMaxLine: 420,- });- render(<RailHarness name="Sora" term={harness.term} />);+ it("offers the pane history where a full-screen CLI keeps its own", () => {+ // Claude Code 2.1.226 takes the alternate screen (measured 2026-08-09), so+ // xterm holds no history for it and no thumb can ever be honest. Rather+ // than a dead track, the rail carries a visible door to the one scrollable+ // copy — an empty rail is what reads as "the scrollbar is broken".+ const harness = fakeTerminal({ type: "alternate", line: 0, maxLine: 0 });+ const onOpenHistory = vi.fn();+ render(+ <RailHarness name="Sora" term={harness.term} onOpenHistory={onOpenHistory} />,+ );const rail = giveTrackGeometry("Sora");- expect(rail.title).toBe(- "Scroll Sora: a full-screen app owns this pane — its earlier history is in the pane history above",- );+ expect(rail.dataset.scrollState).toBe("app");+ fireEvent.click(screen.getByTestId("pane-scroll-history-Sora"));+ expect(onOpenHistory).toHaveBeenCalledOnce();+ // The press must not also be read as a track seek.+ expect(harness.scrollToLine).not.toHaveBeenCalled();+ });++ it("carries no history door on a pane whose own history is scrollable", () => {+ const harness = fakeTerminal({ line: 40, maxLine: 100 });+ render(<RailHarness name="Kai" term={harness.term} onOpenHistory={vi.fn()} />);+ giveTrackGeometry("Kai");++ expect(screen.queryByTestId("pane-scroll-history-Kai")).toBeNull();});it("re-reads an idle pane whose history arrived before it subscribed", () => {diff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.tsxindex 451e6d4da4..a937345db6 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneScrollRail.tsx@@ -25,6 +25,8 @@ import {type RefObject,} from "react";import type { Terminal } from "@xterm/xterm";+import { BookOpenText } from "lucide-react";+import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { PANE_CHROME, type TerminalAppearance } from "./terminalThemes";import {@@ -53,6 +55,12 @@ interface PaneScrollRailProps {epoch: number;appearance: TerminalAppearance;onFocus?: () => void;+ /**+ * Open the pane's recorded conversation. The rail offers this where it has+ * nothing to scroll — an alternate-screen CLI owns its history, and a+ * pointer at the one scrollable copy beats a dead track.+ */+ onOpenHistory?: () => void;}/**@@ -90,7 +98,9 @@ export function PaneScrollRail({epoch,appearance,onFocus,+ onOpenHistory,}: PaneScrollRailProps) {+ const t = useT();const trackRef = useRef<HTMLDivElement | null>(null);const thumbRef = useRef<HTMLDivElement | null>(null);const dragRef = useRef<DragSession | null>(null);@@ -301,13 +311,15 @@ export function PaneScrollRail({const state = view.altScreen ? "app" : view.maxLine === 0 ? "empty" : "history";const valueText =state === "app"- ? view.hiddenHistory > 0- ? `Scroll ${name}: a full-screen app owns this pane — its earlier history is in the pane history above`- : `Scroll ${name}: a full-screen app owns this pane right now`+ ? `Scroll ${name}: this CLI draws a full screen and keeps its own history — open the pane history to scroll it`: state === "empty"? `Scroll ${name}: nothing has scrolled out of view yet`: `Terminal line ${view.line} of ${view.maxLine}`;const shell = PANE_CHROME[appearance].shell;+ // An alternate-screen pane has no position and never will — the CLI holds+ // the history inside its own process. Rather than a dead track, the rail+ // becomes the doorway to the one scrollable copy Jarvis owns.+ const offerHistory = state === "app" && onOpenHistory !== undefined;return (<div@@ -352,13 +364,39 @@ export function PaneScrollRail({"shadow-[0_0_0_1px_rgba(0,0,0,0.18)] transition-[background-color,top]",state === "history"? "bg-[#e7c46e]/65 group-hover:bg-[#e7c46e]/90 group-focus-visible:bg-[#e7c46e]/90"- : // Nothing to scroll: a faint full-length track, never a bright- // bar that reads as a grip stuck at full height.- "bg-[#e7c46e]/20",+ : // Nothing to scroll: a quiet full-length track. Visible enough to+ // read as "this rail is present and has nothing to point at",+ // never bright enough to read as a grip stuck at full height.+ "bg-[#e7c46e]/30",dragging && state === "history" && "bg-[#e7c46e] transition-none",)}style={{ top: geometry.top, height: geometry.height }}/>+ {offerHistory && (+ <button+ type="button"+ data-testid={`pane-scroll-history-${name}`}+ aria-label={t("agentic_grid.conversation.open").replace("{0}", name)}+ title={t("agentic_grid.conversation.open").replace("{0}", name)}+ // The rail's own pointer handlers would read this as a track press+ // and seek a position that does not exist.+ onPointerDown={(event) => event.stopPropagation()}+ onClick={(event) => {+ event.stopPropagation();+ onOpenHistory?.();+ }}+ className={cn(+ "absolute left-1/2 top-1/2 flex h-6 w-6 -translate-x-1/2 -translate-y-1/2",+ "items-center justify-center rounded-full border border-[#e7c46e]/45",+ "text-[#e7c46e]/85 outline-none transition-colors",+ "hover:border-[#e7c46e] hover:text-[#e7c46e]",+ "focus-visible:ring-1 focus-visible:ring-[#e7c46e]",+ )}+ style={{ background: shell }}+ >+ <BookOpenText className="h-3.5 w-3.5" aria-hidden="true" />+ </button>+ )}</div>);}diff --git a/jarvis/ui/web/frontend/src/components/agentic/terminalScrollSurface.ts b/jarvis/ui/web/frontend/src/components/agentic/terminalScrollSurface.tsindex e7794c8274..b035d9955a 100644--- a/jarvis/ui/web/frontend/src/components/agentic/terminalScrollSurface.ts+++ b/jarvis/ui/web/frontend/src/components/agentic/terminalScrollSurface.ts@@ -12,15 +12,26 @@* scrollbar double-drew next to this one. The maintainer's verdict after* living with it was to remove the whole regime.*- * What makes the single rule honest today: the current coding CLIs (Claude- * Code 2.1.226, Codex) paint the NORMAL buffer line by line — measured via a- * ConPTY probe, no alt-screen (1049), no mouse tracking at boot — so xterm's- * scrollback is the real transcript and its position is the real position.- * A CLI that briefly negotiates mouse tracking mid-session does not get the- * wheel handed to it: `captureWheelForTerminalHistory` keeps wheel input on- * xterm's history, which is exactly how Windows Terminal treats these CLIs.- * Only a true alternate-screen application (vim, less) keeps its negotiated- * protocols — there xterm has no history, and the rail says so.+ * MEASURED, and the measurement is the whole map (ConPTY probe, 2026-08-09):+ *+ * * **Codex** paints the NORMAL buffer. xterm's scrollback IS its transcript,+ * so the exact thumb is the exact truth and dragging it seeks.+ * * **Claude Code 2.1.226** takes the ALTERNATE screen (`?1049h`) plus full+ * mouse tracking (`?1000/1002/1003/1006h`) as soon as its UI is up. An+ * alternate buffer HAS NO SCROLLBACK — not in this app, not in Windows+ * Terminal, not anywhere — so there is no position to show and no history+ * to seek. The CLI scrolls its own view from the mouse reports xterm sends+ * it. (An earlier probe missed this: run in an untrusted directory, the CLI+ * stops at its trust prompt and never reaches the UI that switches buffer.)+ *+ * So the rail states what each pane can honestly answer, and the pane history+ * dialog — Jarvis's own recording, with a real scrollbar — is what an+ * alternate-screen pane points at instead of a fake thumb.+ *+ * `captureWheelForTerminalHistory` covers the third shape: a NORMAL-buffer CLI+ * that has negotiated mouse tracking. There xterm has real history, so the+ * wheel scrolls it rather than being handed to the app as mouse reports —+ * otherwise scrolling would work only while that CLI felt like it.*/import type { Terminal } from "@xterm/xterm";