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
feat(office): the pane panel shows the IDE's own live terminal, typed into directly
rubenluetke10-beep16eef9427b24
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsxindex 1db2c3a8d7..065304937e 100644--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx@@ -493,8 +493,12 @@ interface AgenticTerminalProps {workspaceId?: string;/** Agent label shown in the pane header ("Claude Code"). */displayName: string;- /** Compact workspace chrome is opt-in; legacy grids retain their existing header. */- headerMode?: "legacy" | "compact";+ /**+ * Compact workspace chrome is opt-in; legacy grids retain their existing+ * header. "none" draws the bare terminal for a host that brings its own+ * title bar (the office's pane panel) — no header, no border of its own.+ */+ headerMode?: "legacy" | "compact" | "none";/** Compact header only: opens the fork dialog for this pane. */onFork?: () => void;/** Compact header only: the worktree branch this pane runs on, if any. */@@ -2531,8 +2535,9 @@ export function AgenticTerminal({// click landed, and the ring around it faded in over the next 150 ms.// On a grid where the focused pane is the one standing accent, that// read as a flicker rather than as a pane taking focus.- "relative flex h-full w-full flex-col overflow-hidden border backdrop-blur-[4px]",- headerMode === "compact" ? "rounded-2xl" : "rounded-lg",+ "relative flex h-full w-full flex-col overflow-hidden backdrop-blur-[4px]",+ headerMode === "none" ? "border-0" : "border",+ headerMode === "compact" ? "rounded-2xl" : headerMode === "none" ? "rounded-none" : "rounded-lg","transition-[box-shadow,border-color,opacity] duration-150 ease-out motion-reduce:transition-none",// Focus steps the RIM one notch, from the structural hairline to// `--border-strong`, and stops there. It used to add a translucent@@ -2604,7 +2609,7 @@ export function AgenticTerminal({branch={branch}computerName={computerName}placementItems={placementItems}- /> : <PaneHeader+ /> : headerMode === "none" ? null : <PaneHeaderworkspaceId={workspaceId}status={visibleStatus}statusDetail={statusDetail}diff --git a/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsx b/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsxindex 3aa3c3f5ad..320ad9fa3b 100644--- a/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsx@@ -1,30 +1,31 @@/*** A coding session on the coding floor, shown as the pane it is: the Agentic* IDE's title bar (state dot, agent mark, the pane's title, the pane actions as- * quiet icons) over the live terminal, with a prompt line at the bottom of the- * terminal to write into. Nothing else — no chips, no toolbar, no side notes.+ * quiet icons) over the IDE's own live terminal. Nothing else — no chips, no+ * toolbar, no side notes, no second prompt box.*- * Colours come from the pane's own appearance tables (./terminalThemes), so the- * panel matches the IDE's panes in light and dark, including a light pane in a- * dark app. Prompts go through the IDE's `/terminals/{name}/prompt` route, the- * same one the spoken path uses, so a prompt sent here is recorded, receipted- * and visible in the pane exactly like one typed there.+ * The terminal is the IDE pane's `AgenticTerminal` itself, attached as one more+ * viewer of the same PTY: the same renderer, font and colours, and typed into+ * directly, exactly like the pane in the IDE. Colours come from the pane's own+ * appearance tables (./terminalThemes), so the panel matches the IDE's panes in+ * light and dark, including a light pane in a dark app.*/-import { useCallback, useEffect, useId, useRef, useState, type CSSProperties } from "react";+import { useEffect, useId, useRef, useState, type CSSProperties } from "react";import { Footprints, Hand, LocateFixed, Maximize2, Square, Trash2, X } from "lucide-react";import { useT } from "@/i18n";import { useThemeValue } from "@/hooks/useTheme";-import { closeTerminal, forkTerminal, interruptTerminal, promptTerminal } from "@/lib/agenticIdeApi";+import { closeTerminal, forkTerminal, interruptTerminal } from "@/lib/agenticIdeApi";import { usePaneTitle } from "@/store/paneRecaps";import { useWorkspacePanesStore } from "@/store/workspacePanes";import { AgentMark } from "@/components/agentic/AgentMark";+import { AgenticTerminal } from "@/components/agentic/AgenticTerminal";+import { FONT_DEFAULT } from "@/components/agentic/paneFont";import { BranchIcon } from "@/components/agentic/branchIcon";import { PANE_BRAND, PANE_CHROME, PANE_SOLID, storedTerminalAppearance, themeFor } from "@/components/agentic/terminalThemes";import type { PaneOccupant } from "./codingFloor";import { player, useOfficeStore } from "./officeStore";import { agentPositions } from "./walkerRegistry";import { CALL_MS } from "./AgentTalkPanel";-import { PaneLiveScreen } from "./PaneLiveScreen";import "./paneCommand.css";/** A second press within this window confirms closing the session. */@@ -47,9 +48,6 @@ export function PaneCommandPanel({ occupant, onOpen, onClose }: { occupant: Paneconst office = useOfficeStore();const { agent, pane } = occupant;const panel = useRef<HTMLElement>(null);- const input = useRef<HTMLTextAreaElement>(null);- const [value, setValue] = useState("");- const [sending, setSending] = useState(false);const [note, setNote] = useState<Note>(null);const [confirmClose, setConfirmClose] = useState(false);const appTheme = useThemeValue();@@ -61,12 +59,11 @@ export function PaneCommandPanel({ occupant, onOpen, onClose }: { occupant: Paneconst paneTitle = usePaneTitle(pane.workspace_id, pane.name);const where = agentPositions.get(agent.agentId);const live = pane.status === "live";- const canPrompt = live && pane.accepts_prompts;const working = occupant.dot === "working";const since = sinceLabel(pane.activity_since || null, t);const title = paneTitle || pane.recap.trim() || agent.name;- useEffect(() => { panel.current?.focus({ preventScroll: true }); setValue(""); setNote(null); setConfirmClose(false); }, [agent.agentId]);+ useEffect(() => { panel.current?.focus({ preventScroll: true }); setNote(null); setConfirmClose(false); }, [agent.agentId]);useEffect(() => {if (!confirmClose) return;const timer = setTimeout(() => setConfirmClose(false), CONFIRM_MS);@@ -75,25 +72,6 @@ export function PaneCommandPanel({ occupant, onOpen, onClose }: { occupant: Paneconst refresh = () => { void useWorkspacePanesStore.getState().load(); };- const send = useCallback(async (text: string) => {- const content = text.trim();- if (!content || !canPrompt || sending) return;- setSending(true);- setNote(null);- try {- const result = await promptTerminal(pane.name, content, { workspaceId: pane.workspace_id });- setValue("");- setNote(result.submitted === true- ? { tone: "ok", text: t("society.office.cmd_sent").replace("{0}", agent.name) }- : { tone: "error", text: result.detail || t("society.office.cmd_unconfirmed") });- refresh();- } catch (err) {- setNote({ tone: "error", text: err instanceof Error ? err.message : String(err) });- } finally {- setSending(false);- }- }, [agent.name, canPrompt, pane.name, pane.workspace_id, sending, t]);-/** Run one session action; it answers with the line the panel shows once it is done. */const run = async (action: () => Promise<string>) => {setNote(null);@@ -140,10 +118,6 @@ export function PaneCommandPanel({ occupant, onOpen, onClose }: { occupant: Pane"--pane-caret": ansi.cursor ?? brand.ink,} as CSSProperties;- const hint = !pane.accepts_prompts- ? t("society.office.cmd_no_prompts")- : !live ? t("society.office.cmd_not_running") : t("society.office.cmd_hint");-return (<aside ref={panel} className="office-panel office-pane" data-office-ui style={vars} aria-labelledby={headingId} tabIndex={-1}><header className="office-pane-head">@@ -191,25 +165,15 @@ export function PaneCommandPanel({ occupant, onOpen, onClose }: { occupant: Pane</div></header>- <PaneLiveScreen workspaceId={pane.workspace_id} paneKey={pane.key} onOpen={onOpen}- label={t("society.office.cmd_screen").replace("{0}", agent.name)}- loadingText={t("society.office.cmd_screen_loading")} emptyText={t("society.office.cmd_screen_empty")} />-- <div className="office-pane-prompt" data-disabled={!canPrompt || undefined} onClick={() => input.current?.focus()}>- <span className="office-pane-caret" aria-hidden>❯</span>- <textarea ref={input} rows={1} value={value} maxLength={8000} disabled={!canPrompt}- placeholder={t("society.office.cmd_placeholder").replace("{0}", agent.name)}- aria-label={t("society.office.cmd_placeholder").replace("{0}", agent.name)}- onChange={(e) => setValue(e.target.value)}- onKeyDown={(e) => {- if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); void send(value); }- // Escape leaves the box so the arrow keys walk again; a second Escape closes the panel.- else if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); panel.current?.focus({ preventScroll: true }); }- }} />+ {/* Keyed by the pane, so another session is a fresh socket, never this one's screen under a new name. */}+ <div className="office-pane-term">+ <AgenticTerminal key={`${pane.workspace_id}/${pane.name}`} headerMode="none"+ name={pane.name} workspaceId={pane.workspace_id} agent={pane.agent}+ displayName={pane.display_name || pane.agent || agent.name}+ appearance={appearance} fontSize={FONT_DEFAULT}+ onAttachError={(message) => setNote({ tone: "error", text: message })} /></div>- <p className="office-pane-status" role="status" data-tone={note?.tone}>- {sending ? t("society.office.cmd_sending") : note?.text ?? hint}- </p>+ {note && <p className="office-pane-status" role="status" data-tone={note.tone}>{note.text}</p>}</aside>);}diff --git a/jarvis/ui/web/frontend/src/components/society/office/PaneLiveScreen.tsx b/jarvis/ui/web/frontend/src/components/society/office/PaneLiveScreen.tsxindex 50ecfc5e77..d7c1ef502c 100644--- a/jarvis/ui/web/frontend/src/components/society/office/PaneLiveScreen.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/PaneLiveScreen.tsx@@ -1,19 +1,17 @@/**- * The live terminal of one coding session, drawn the way the Agentic IDE+ * A still of one coding session's terminal, drawn the way the Agentic IDE* draws a pane: the pane's own font, weight and ink, the bottom of the real* screen with its cursor, and the font fitted to the pane's column count so a* narrow TUI fills the window instead of hugging its left edge.*- * It reads the same in-memory screen feed as the desk monitors, at their- * near-live rate, jittered (AP-33); an unchanged screen never re-renders.+ * Mission Control's screens feed it from the shared in-memory screen feed. The+ * pane panel itself shows the IDE's live terminal instead (./PaneCommandPanel).*/-import { useEffect, useLayoutEffect, useRef, useState, type RefObject } from "react";-import { fetchPaneScreens, type PaneScreen } from "@/lib/paneScreensApi";+import { useLayoutEffect, useRef, useState, type RefObject } from "react";+import type { PaneScreen } from "@/lib/paneScreensApi";import { TERMINAL_FONT_STACK, TERMINAL_FONT_WEIGHT } from "@/lib/terminalFont";-import { screenChanged, visibleRows } from "./terminalScreen";+import { visibleRows } from "./terminalScreen";-const POLL_MIN_MS = 450;-const POLL_JITTER_MS = 250;/** Font bounds in CSS pixels: a wide TUI shrinks the text, a narrow one never blows it up. */const MIN_FONT = 10, MAX_FONT = 15;/** Wider terminals than this are cut on the right rather than shrunk further. */@@ -41,33 +39,6 @@ export function liveGrid(cols: number, width: number, height: number): LiveGrid};}-function useLiveScreen(workspaceId: string, key: string): PaneScreen | null | undefined {- // undefined = not loaded yet, null = the feed does not know this pane.- const [screen, setScreen] = useState<PaneScreen | null | undefined>(undefined);- useEffect(() => {- let alive = true;- let failing = false;- let timer: ReturnType<typeof setTimeout>;- setScreen(undefined);- const tick = async () => {- try {- const [next] = await fetchPaneScreens([{ workspaceId, key }]);- if (!alive) return;- failing = false;- setScreen((prev) => (next ? (prev && !screenChanged(prev, next) ? prev : next) : null));- } catch (err) {- // The last good screen stays up; only the first failure of a streak is worth a line.- if (!failing) console.warn("Pane screen unavailable", err);- failing = true;- }- if (alive) timer = setTimeout(() => void tick(), POLL_MIN_MS + Math.random() * POLL_JITTER_MS);- };- timer = setTimeout(() => void tick(), Math.random() * POLL_JITTER_MS);- return () => { alive = false; clearTimeout(timer); };- }, [workspaceId, key]);- return screen;-}-function useBoxSize(ref: RefObject<HTMLElement | null>): { width: number; height: number } {const [size, setSize] = useState({ width: 0, height: 0 });useLayoutEffect(() => {@@ -86,18 +57,6 @@ function useBoxSize(ref: RefObject<HTMLElement | null>): { width: number; heightreturn size;}-export function PaneLiveScreen({ workspaceId, paneKey, label, loadingText, emptyText, onOpen }: {- workspaceId: string;- paneKey: string;- label: string;- loadingText: string;- emptyText: string;- onOpen: () => void;-}) {- const screen = useLiveScreen(workspaceId, paneKey);- return <PaneScreenView screen={screen} label={label} loadingText={loadingText} emptyText={emptyText} onOpen={onOpen} />;-}-/** One terminal screen, fitted to its box; `screen` undefined = still loading, null = unknown pane. */export function PaneScreenView({ screen, label, loadingText, emptyText, onOpen, className = "office-pane-screen" }: {screen: PaneScreen | null | undefined;diff --git a/jarvis/ui/web/frontend/src/components/society/office/paneCommand.css b/jarvis/ui/web/frontend/src/components/society/office/paneCommand.cssindex ca2d64f875..70bf946dae 100644--- a/jarvis/ui/web/frontend/src/components/society/office/paneCommand.css+++ b/jarvis/ui/web/frontend/src/components/society/office/paneCommand.css@@ -1,5 +1,5 @@/* A coding session's panel on the office map, drawn as an Agentic IDE pane:- 36 px title bar, the live terminal, a prompt line inside the terminal.+ 36 px title bar over the IDE's own live terminal.Every colour is a --pane-* variable the component sets from the paneappearance tables (terminalThemes.ts), so it follows light and dark panes. */.office-panel-slot:has(> .office-pane) { width:min(560px, calc(100% - 28px)); }@@ -29,11 +29,11 @@.office-pane-cursor { background:var(--pane-caret); color:var(--pane-ground); }.office-pane-empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; margin:0; font-size:12px; color:var(--pane-ink-faint); }-.office-pane-prompt { display:flex; align-items:flex-start; gap:8px; margin:6px 12px 0; padding:9px 0 4px; border-top:1px solid var(--pane-rule); cursor:text; }-.office-pane-prompt[data-disabled] { cursor:default; opacity:.6; }-.office-pane-caret { flex:none; font:600 14px/20px ui-monospace, 'Cascadia Mono', SFMono-Regular, Menlo, Consolas, monospace; color:var(--pane-ok); }-.office-pane-prompt textarea { flex:1; min-width:0; min-height:20px; max-height:120px; margin:0; padding:0; border:0; outline:none; resize:none; background:transparent; color:var(--pane-ink); caret-color:var(--pane-caret); font:500 13px/20px ui-monospace, 'Cascadia Mono', SFMono-Regular, Menlo, Consolas, monospace; field-sizing:content; }-.office-pane-prompt textarea::placeholder { color:var(--pane-ink-faint); }-.office-pane-status { margin:0; padding:2px 12px 8px 30px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--pane-ink-faint); }+/* The IDE's own terminal, attached to the same PTY. The box keeps the panel's+ size (the old screen plus the prompt line it replaces); the terminal fills+ it absolutely, so xterm's canvas can never feed back into the box's height. */+.office-pane-term { position:relative; flex:1 1 clamp(260px, calc(38vh + 60px), 480px); min-height:160px; }+.office-pane-term > * { position:absolute; inset:0; }+.office-pane-status { margin:0; padding:4px 12px 8px; border-top:1px solid var(--pane-rule); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--pane-ink-faint); }.office-pane-status[data-tone="ok"] { color:var(--pane-ok); }.office-pane-status[data-tone="error"] { color:var(--pane-fault); white-space:normal; }