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 a Claude Code pane its scrollbar without asking first
Ruben Lütke1ec0cbe5c596
diff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneScrollbar.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneScrollbar.test.tsxindex 65b610a47c..e9788195ce 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PaneScrollbar.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneScrollbar.test.tsx@@ -166,17 +166,20 @@ describe("PaneScrollbar", () => {});/*- * The second report on this strip, at the level a user meets it. Reaching for- * the right edge of a Claude Code pane nobody has scrolled must reveal NOTHING- * YET: no measurement has been taken, so there is no history to describe, and- * the bar that used to appear here spent half its track on empty space — on- * every pane of a workspace that was just opened.+ * The fourth report, and the one that settled where the burden of proof lies.*- * "Yet" is the third round (below). Silence is right for the instant the- * pointer arrives; leaving it there permanently is what made the bar- * unreachable.+ * For one round this pane showed NOTHING until a measurement had been taken,+ * so that an unscrolled pane would not spend half its track on an assumed+ * screenful of history. Every failure to measure then looked exactly like+ * "this pane cannot scroll", and the bar stayed unreachable in the only kind+ * of pane it was written for — reported four times, always as "it works in a+ * Codex pane and nowhere else". A Codex pane never needed a measurement.+ *+ * So reaching for the edge of a Claude Code pane gives you a bar you can drag+ * immediately, sized from the least its history could be. Only a measurement+ * that positively found nothing takes it away again (below).*/- it("shows nothing on a Claude-Code-style pane nobody has scrolled", () => {+ it("gives a Claude-Code-style pane a bar the moment you reach for it", () => {render(<Harnessterm={@@ -191,7 +194,11 @@ describe("PaneScrollbar", () => {reachForTheBar();- expect(screen.queryByTestId("pane-scrollbar-Dana")).toBeNull();+ const bar = screen.getByTestId("pane-scrollbar-Dana");+ expect(bar.dataset.mode).toBe("app");+ expect(bar.dataset.shown).toBe("true");+ // Sitting at the newest output, which is where an unscrolled pane is.+ expect(thumbTop() + thumbHeight()).toBe(TRACK_PX);});/*@@ -404,7 +411,6 @@ describe("PaneScrollbar", () => {vi.advanceTimersByTime(PROBE_WAIT_MS + PROBE_RETURN_MS + SETTLE_MS * 2),);expect(relayed).toEqual([]);- expect(screen.queryByTestId("pane-scrollbar-Dana")).toBeNull();// Pointer away, the terminal arrives, and the question is asked again.fireEvent.mouseMove(screen.getByTestId("region"), {diff --git a/jarvis/ui/web/frontend/src/components/agentic/paneScroll.test.ts b/jarvis/ui/web/frontend/src/components/agentic/paneScroll.test.tsindex 6cf34649d5..297aa08daa 100644--- a/jarvis/ui/web/frontend/src/components/agentic/paneScroll.test.ts+++ b/jarvis/ui/web/frontend/src/components/agentic/paneScroll.test.ts@@ -99,19 +99,25 @@ describe("readScrollState", () => {});/*- * The follow-up report on the same strip: a pane nobody has scrolled yet gets- * NO bar. It used to be credited with an assumed screenful of history, which- * sized a half-track thumb and left the other half as empty furniture down the- * side of every pane in a freshly opened workspace.+ * A pane nobody has scrolled yet still gets a bar, sized from the least its+ * history could be — one screenful above the newest output.+ *+ * This was the other way round for one round, so that an unscrolled pane+ * would not spend half its track on an assumption. It made every failed+ * measurement indistinguishable from "this pane cannot scroll", and left the+ * bar unreachable in the only kind of pane that needs it. Half a track of+ * assumption you can drag beats a correct silence you cannot.*/- it("draws no bar for an app-mode pane nothing has been measured on", () => {+ it("draws a bar for an app-mode pane nothing has been measured on", () => {const state = readScrollState(fakeTerminal({ type: "alternate", mouseTrackingMode: "any", rows: 30 }),AT_LIVE_END,);- expect(state.mode).toBe("none");- expect(thumbGeometry(state, 300)).toBeNull();+ expect(state).toMatchObject({ mode: "app", total: 60, rows: 30, top: 30 });+ // At the newest output: the thumb sits at the bottom of its track.+ const geometry = thumbGeometry(state, 300)!;+ expect(geometry.topPx + geometry.heightPx).toBe(300);});/*@@ -197,7 +203,9 @@ describe("thumbGeometry", () => {expect(thumbGeometry(readScrollState(term, measured()), 400)).toEqual(thumbGeometry(- readScrollState(fakeTerminal({ length: 424, rows: 24, viewportY: 400 })),+ readScrollState(+ fakeTerminal({ length: 424, rows: 24, viewportY: 400 }),+ ),400,),);@@ -255,7 +263,9 @@ describe("relayWheelNotch", () => {it("dispatches a wheel event xterm can encode for the running CLI", () => {const element = host();const seen: WheelEvent[] = [];- element.addEventListener("wheel", (event) => seen.push(event as WheelEvent));+ element.addEventListener("wheel", (event) =>+ seen.push(event as WheelEvent),+ );relayWheelNotch(element, -1);diff --git a/jarvis/ui/web/frontend/src/components/agentic/paneScroll.ts b/jarvis/ui/web/frontend/src/components/agentic/paneScroll.tsindex c4c7012621..581c35f2d7 100644--- a/jarvis/ui/web/frontend/src/components/agentic/paneScroll.ts+++ b/jarvis/ui/web/frontend/src/components/agentic/paneScroll.ts@@ -47,9 +47,9 @@* * `app` — the application took the mouse, so it holds the history (Claude* Code). Position and extent are MEASURED from how far the screen's content* moves when it is scrolled — see ./paneAppScroll.- * * `none` — nothing to scroll, or nothing measured yet: a fresh pane, an- * application nobody has scrolled, or one measured as having no history at- * all. The bar stays away instead of drawing a dead track.+ * * `none` — nothing to scroll: a terminal whose buffer fits on screen, or an+ * application MEASURED as having no history at all. The bar stays away+ * instead of drawing a dead track.** ## Both modes draw the same thumb, because both now know the same things*@@ -70,21 +70,29 @@* relayed wheel notches instead of a viewport call — because that is the only* language the application listens in.*- * ## And it says nothing until it has measured something+ * ## A measurement sizes the bar. It does not decide whether there is one.*- * A real answer is only available once there has been something to measure. Until- * then `app` mode draws NO bar, rather than sizing one from an assumed screenful- * of history: that assumption left half the track empty on every pane nobody had- * scrolled yet — which, in a workspace that was just opened, is all of them.- * Reported 2026-07-27 as a strip of empty space down the right-hand side of a- * pane, on the same edge as the position bug above and immediately after it.+ * For one round it did decide, and `app` mode drew nothing until something had+ * been measured — so that an unscrolled pane would not spend half its track on+ * an assumed screenful of history (reported 2026-07-27 as a strip of empty+ * space down a pane's right-hand side). The cure was worse: EVERY way of+ * failing to measure — a screen too alike to compare, a probe sent while the+ * agent repainted, an answer that never came — became indistinguishable from+ * "this pane cannot scroll", and the bar was unreachable in exactly the panes+ * it exists for. Reported four times over, always the same way: it works in a+ * Codex pane and nowhere else. A Codex pane never needed a measurement.+ *+ * So an application-held pane now gets a bar as soon as the pointer reaches for+ * it, sized from the least history it could have and draggable straight away;+ * the measurement corrects the proportions on the first movement. Only a+ * measurement that positively found NO history takes the bar away again — see+ * `measuredNoHistory` in ./paneAppScroll. Silence has to be earned.*/import type { Terminal } from "@xterm/xterm";import {appScrollExtent,appTakesWheel,AT_LIVE_END,- hasMeasuredHistory,type AppScrollPosition,} from "./paneAppScroll";@@ -148,13 +156,27 @@ export function readScrollState(// holds the history with it, in EITHER buffer, so the viewport it left behind// is ignored in favour of what the measurement found.if (appTakesWheel(term)) {- // Nothing measured yet, so there is nothing to draw. An application that- // holds its own history does not reveal how much of it there is until it is- // scrolled, and a bar sized from an ASSUMED screenful spends half its track- // on empty furniture — down the side of every pane in a fresh workspace,- // because a pane nobody has scrolled yet is the normal state of one. See- // `hasMeasuredHistory` in ./paneAppScroll.- if (!hasMeasuredHistory(position)) return IDLE_STATE;+ // A bar, unless the pane has been MEASURED as having nothing to scroll.+ //+ // It used to be the other way round — no bar until something had been+ // measured — and that is what kept the whole feature out of reach. Every+ // way the measurement could come back empty (a screen that could not be+ // compared, a probe that arrived while the agent was repainting, an answer+ // that never came) produced the same outcome as "this pane cannot scroll":+ // nothing at all, in the one kind of pane the bar was written for. Four+ // rounds of reports said the same thing — it works in a Codex pane and+ // nowhere else — because a Codex pane needs no measurement to draw a bar.+ //+ // So the burden of proof is the other way now. Reaching for the edge of a+ // pane whose CLI holds its own history gives you a bar you can drag,+ // sized from the least it could be — one screenful above, which is what+ // `appScrollExtent` assumes until a measurement says otherwise. Dragging+ // it relays wheel notches whether anything has been measured or not, and+ // the first movement replaces the assumption with the truth.+ //+ // What still takes the bar away is a real answer: `appScrollExtent`+ // reports a total of one screen for a pane measured as having no history,+ // and the check below removes it. That is the only silence left.const extent = appScrollExtent(position, rows);// A measurement that found no history at all — a dashboard, a pager on a// short file — takes the bar away rather than drawing a thumb that fills