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(ide): minimal multiplexer-style terminal tiles, classic cards one click away

rubenluetke10-beep9ad9a2b24f3a
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx
index e5ffc96f66..69524776ab 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx
@@ -322,6 +322,26 @@ describe("AgenticTerminal layout", () => {
expect(terminalHarness.focus.mock.calls.length).toBe(focuses);
});
+ it("draws a minimal tile: square frame, no title bar, signal edge only when focus means something", () => {
+ const props = { name: "Dana", displayName: "Codex", agent: "codex", appearance: "dark" as const, fontSize: 13, headerMode: "minimal" as const };
+ const { rerender } = render(<AgenticTerminal {...props} />);
+ const pane = screen.getByTestId("agentic-pane-Dana");
+ expect(pane.className).toContain("rounded-none");
+ expect(pane.className).not.toContain("rounded-2xl");
+ expect(pane.dataset.paneStyle).toBe("minimal");
+ expect(screen.queryByTestId("workspace-terminal-header-Dana")).toBeNull();
+ expect(screen.queryByTestId("pane-header-Dana")).toBeNull();
+ expect(screen.queryByTestId("pane-title-Dana")).toBeNull();
+ expect(screen.getByTestId("workspace-terminal-controls-Dana")).toBeTruthy();
+ const resting = pane.style.borderColor;
+ expect(resting).toBeTruthy();
+ rerender(<AgenticTerminal {...props} focused />);
+ expect(pane.style.borderColor).not.toBe(resting);
+ // A lone pane is always the focused one; marking it says nothing.
+ rerender(<AgenticTerminal {...props} focused accentFocus={false} />);
+ expect(pane.style.borderColor).toBe(resting);
+ });
+
it("keeps the wheel on terminal history even while the CLI tracks the mouse", () => {
render(
<AgenticTerminal
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx
index ea28ad3849..51cc39596a 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.tsx
@@ -84,6 +84,7 @@ import {
MINIMUM_CONTRAST_RATIO,
PANE_BRAND,
PANE_CHROME,
+ PANE_TILE,
themeFor,
type TerminalAppearance,
} from "./terminalThemes";
@@ -505,8 +506,17 @@ interface AgenticTerminalProps {
* 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.
+ * "minimal" is the multiplexer tile: a square 1px frame, no title bar, and
+ * the compact header's controls floating in the top corner while the
+ * pointer is over the pane (see `WorkspaceTerminalHeader`'s overlay).
*/
- headerMode?: "legacy" | "compact" | "none";
+ headerMode?: "legacy" | "compact" | "minimal" | "none";
+ /**
+ * Minimal tiles only: may the focused pane wear the signal edge? A lone pane
+ * is always "the focused one", so marking it says nothing; the grid turns
+ * this off when it holds a single pane, as tiling multiplexers do.
+ */
+ accentFocus?: boolean;
/** Compact header only: opens the fork dialog for this pane. */
onFork?: () => void;
/** Compact header only: the worktree branch this pane runs on, if any. */
@@ -650,6 +660,7 @@ export function AgenticTerminal({
workspaceId,
displayName,
headerMode = "legacy",
+ accentFocus = true,
onFork,
branch,
computerName,
@@ -2582,10 +2593,39 @@ export function AgenticTerminal({
}, [attach, name]);
const chrome = PANE_CHROME[appearance];
+ const minimal = headerMode === "minimal";
+ const tile = PANE_TILE[appearance];
+ const headerProps = {
+ name,
+ workspaceId,
+ promptCount,
+ agent: agent ?? "",
+ agentLogoUrl,
+ displayName,
+ status: visibleStatus,
+ appearance,
+ arranging,
+ maximized,
+ addDisabled: splitDisabled,
+ onArrangeStart,
+ onActivate: () => { onFocus?.(); takeOwnershipRef.current?.(); },
+ onToggleMaximize: toggleMaximizeAndFocus,
+ onAdd: onSplit ? (direction: SplitDirection) => onSplit(direction) : undefined,
+ onClose,
+ onRename,
+ onOpenConversation: () => setHistoryOpen(true),
+ onOpenChat,
+ onRestart,
+ onFork,
+ branch,
+ computerName,
+ placementItems,
+ };
return (
<div
- onMouseDown={() => {
+ onMouseDown={(event) => {
+ if (event.button !== 0) return;
onFocus?.();
takeOwnershipRef.current?.();
}}
@@ -2603,8 +2643,11 @@ export function AgenticTerminal({
// 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 backdrop-blur-[4px]",
+ // Minimal tiles name their hover group so the floating controls can
+ // appear for THIS pane only.
+ minimal && "group/tile",
headerMode === "none" ? "border-0" : "border",
- headerMode === "compact" ? "rounded-2xl" : headerMode === "none" ? "rounded-none" : "rounded-lg",
+ headerMode === "compact" ? "rounded-2xl" : headerMode === "none" || minimal ? "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
@@ -2613,7 +2656,7 @@ export function AgenticTerminal({
// call-sign plate, the accent hairline under it, the visible action
// cluster). A rim is the second separation device, never the first,
// and a shadow belongs only to something that floats.
- focused && "border-border-strong",
+ focused && !minimal && "border-border-strong",
// Being carried, and "a prompt just landed here", are the two states
// that must be findable across a wall of twelve. They get the fill —
// a solid `--primary` edge plus the sanctioned focus ring — because
@@ -2644,39 +2687,25 @@ export function AgenticTerminal({
* red when it failed, unchanged while it is connecting or live. See
* `PANE_CHROME.edge` for why only those two states are marked.
*/
+ //
+ // A minimal tile paints its focused edge here too: the signal hue is a
+ // per-appearance literal (`PANE_TILE`), not a class, for the same
+ // reason the resting edge is.
borderColor:
- focused || dragging || justDelivered
+ dragging || justDelivered
? undefined
- : chrome.edge[visibleStatus],
+ : minimal
+ ? focused && accentFocus ? tile.focus : tile.edge[visibleStatus]
+ : focused
+ ? undefined
+ : chrome.edge[visibleStatus],
}}
+ data-pane-style={minimal ? "minimal" : undefined}
data-testid={`agentic-pane-${name}`}
>
- {headerMode === "compact" ? <WorkspaceTerminalHeader
- name={name}
- workspaceId={workspaceId}
- promptCount={promptCount}
- agent={agent ?? ""}
- agentLogoUrl={agentLogoUrl}
- displayName={displayName}
- status={visibleStatus}
- appearance={appearance}
- arranging={arranging}
- maximized={maximized}
- addDisabled={splitDisabled}
- onArrangeStart={onArrangeStart}
- onActivate={() => { onFocus?.(); takeOwnershipRef.current?.(); }}
- onToggleMaximize={toggleMaximizeAndFocus}
- onAdd={onSplit ? (direction) => onSplit(direction) : undefined}
- onClose={onClose}
- onRename={onRename}
- onOpenConversation={() => setHistoryOpen(true)}
- onOpenChat={onOpenChat}
- onRestart={onRestart}
- onFork={onFork}
- branch={branch}
- computerName={computerName}
- placementItems={placementItems}
- /> : headerMode === "none" ? null : <PaneHeader
+ {headerMode === "compact" ? <WorkspaceTerminalHeader {...headerProps} />
+ : minimal ? <WorkspaceTerminalHeader {...headerProps} variant="overlay" />
+ : headerMode === "none" ? null : <PaneHeader
workspaceId={workspaceId}
status={visibleStatus}
statusDetail={statusDetail}
@@ -2730,7 +2759,9 @@ export function AgenticTerminal({
ref={terminalRegionRef}
id={terminalRegionId}
className={cn(
- "relative min-h-0 flex-1 overflow-hidden px-1.5 pb-0.5 pt-0.5",
+ "relative min-h-0 flex-1 overflow-hidden px-1.5 pb-0.5",
+ // With no title bar the first row would sit on the top edge itself.
+ minimal ? "pt-1" : "pt-0.5",
active && !tailReady && "invisible",
)}
>
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.test.tsx
index b4c15fee2b..54ff0fddfd 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.test.tsx
@@ -28,3 +28,16 @@ it("disables adding past the workspace limit and closes with Escape", () => {
fireEvent.keyDown(document, { key: "Escape" });
expect(props.onOpenChange).toHaveBeenCalledWith(false);
});
+
+it("switches between the minimal and the classic terminal style", () => {
+ const props = { ...setup(), paneStyle: "minimal" as const, onPaneStyle: vi.fn() };
+ render(<WorkspaceOptionsDialog {...props} />);
+ const minimal = screen.getByRole("button", { name: /Minimal/ });
+ const classic = screen.getByRole("button", { name: /Classic/ });
+ expect(minimal.getAttribute("aria-pressed")).toBe("true");
+ expect(classic.getAttribute("aria-pressed")).toBe("false");
+ fireEvent.click(classic);
+ expect(props.onPaneStyle).toHaveBeenCalledWith("classic");
+ // A style change keeps the dialog open so the reader sees the result.
+ expect(props.onOpenChange).not.toHaveBeenCalled();
+});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.tsx
index f6ef4404df..fdc581ed2e 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceOptionsDialog.tsx
@@ -1,6 +1,7 @@
import * as Dialog from "@radix-ui/react-dialog";
import { Columns2, GitBranch, X } from "lucide-react";
import { cn } from "@/lib/utils";
+import type { PaneStyle } from "./terminalThemes";
interface Props {
open: boolean;
@@ -19,8 +20,16 @@ interface Props {
onGit: () => void;
appearance: "light" | "dark" | null;
onAppearance: (appearance: "light" | "dark" | null) => void;
+ /** Square tiles without titles, or rounded cards with a title bar. */
+ paneStyle?: PaneStyle;
+ onPaneStyle?: (style: PaneStyle) => void;
}
+const PANE_STYLES: { id: PaneStyle; label: string; hint: string }[] = [
+ { id: "minimal", label: "Minimal", hint: "Square frames, no titles" },
+ { id: "classic", label: "Classic", hint: "Rounded, with a title bar" },
+];
+
/** Workspace controls live off-canvas so the terminal area needs no toolbar. */
export function WorkspaceOptionsDialog(props: Props) {
const icon = "flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-35";
@@ -37,8 +46,20 @@ export function WorkspaceOptionsDialog(props: Props) {
<section aria-label="Terminal arrangement" className="space-y-2">
<button type="button" disabled={props.busy || props.count < 2} onClick={() => choose(props.onBalance)}
className="flex w-full items-center gap-2 rounded-lg border border-border px-3 py-2.5 text-sm hover:bg-muted disabled:opacity-40"><Columns2 className="h-4 w-4" />Balance layout</button>
- <p className="text-xs leading-relaxed text-muted-foreground">Drag a terminal title to an edge to place it beside, above or below another terminal. Drop in the center to swap positions.</p>
+ <p className="text-xs leading-relaxed text-muted-foreground">{props.paneStyle === "minimal"
+ ? "Point at a terminal and drag its handle (top right) to an edge to place it beside, above or below another terminal. Drop in the center to swap positions."
+ : "Drag a terminal title to an edge to place it beside, above or below another terminal. Drop in the center to swap positions."}</p>
</section>
+ {props.onPaneStyle && <section aria-label="Terminal style">
+ <p className="mb-2 text-sm font-medium">Terminal style</p>
+ <div className="flex gap-2">
+ {PANE_STYLES.map((style) => <button type="button" key={style.id} aria-pressed={props.paneStyle === style.id}
+ onClick={() => props.onPaneStyle?.(style.id)} className={cn("flex flex-1 flex-col items-start gap-0.5 rounded-lg border px-3 py-2 text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", props.paneStyle === style.id ? "border-foreground/35 bg-muted" : "border-border text-muted-foreground hover:bg-muted")}>
+ <span className="font-medium">{style.label}</span>
+ <span className="text-xs text-muted-foreground">{style.hint}</span>
+ </button>)}
+ </div>
+ </section>}
<section aria-label="Terminal appearance">
<p className="mb-2 text-sm font-medium">Terminal appearance</p>
<div className="flex gap-2">
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx
index 84bc05bd43..bbf3e6b06a 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx
@@ -9,7 +9,8 @@ vi.mock("./AgenticTerminal", () => ({ AgenticTerminal: (props: {
name: string; onToggleMaximize: () => void; onRestart: () => void; restartToken: number;
onFocus: () => void;
onArrangeStart?: (event: React.PointerEvent) => void;
-}) => <div onMouseDown={props.onFocus}>
+ headerMode?: string; accentFocus?: boolean;
+}) => <div onMouseDown={props.onFocus} data-testid={`pane-${props.name}`} data-header-mode={props.headerMode} data-accent-focus={String(props.accentFocus)}>
<button onClick={props.onToggleMaximize}>Maximize {props.name}</button>
<button type="button" data-ide-drag-handle="true" onPointerDown={props.onArrangeStart}>Move {props.name}</button>
<button onClick={props.onRestart}>Restart {props.name}</button>
@@ -244,3 +245,19 @@ it("hides the seams while a pane is maximized", () => {
fireEvent.click(screen.getByRole("button", { name: "Maximize T1" }));
expect(screen.queryAllByRole("separator")).toHaveLength(0);
});
+
+it("draws square, title-less tiles in the minimal style and cards in the classic one", () => {
+ const { rerender } = render(<WorkspaceTerminalGrid {...props} session={makeSession()} paneStyle="minimal" />);
+ const tile = document.querySelector<HTMLElement>('[data-session-id="T1"]')!;
+ expect(tile.className).toContain("rounded-none");
+ expect(screen.getByTestId("pane-T1").dataset.headerMode).toBe("minimal");
+ expect(screen.getByTestId("pane-T1").dataset.accentFocus).toBe("true");
+ rerender(<WorkspaceTerminalGrid {...props} session={makeSession()} paneStyle="classic" />);
+ expect(document.querySelector<HTMLElement>('[data-session-id="T1"]')!.className).toContain("rounded-2xl");
+ expect(screen.getByTestId("pane-T1").dataset.headerMode).toBe("compact");
+});
+
+it("does not mark focus on a lone pane", () => {
+ render(<WorkspaceTerminalGrid {...props} session={makeSession(["T1"])} paneStyle="minimal" />);
+ expect(screen.getByTestId("pane-T1").dataset.accentFocus).toBe("false");
+});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx
index e537277d20..3acdecf1c8 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx
@@ -10,6 +10,7 @@ import { useThemeValue } from "@/hooks/useTheme";
import { useEventStore } from "@/store/events";
import { useIdeChatStore } from "@/store/ideChat";
import { useIdeSidePanelStore } from "@/store/ideSidePanel";
+import type { PaneStyle } from "./terminalThemes";
import { cn } from "@/lib/utils";
import { PaneResizer } from "@/components/layout/PaneResizer";
import { treeLayout, treeLeaves, type LayoutNode, type PaneSeam } from "./treeLayout";
@@ -51,12 +52,17 @@ interface Props {
disabled?: boolean;
onMutationStart?: () => void;
onMutationEnd?: () => void;
+ /**
+ * How the panes are drawn: square multiplexer tiles without title bars, or
+ * rounded cards with one. The reader picks it in Workspace options.
+ */
+ paneStyle?: PaneStyle;
}
interface DropTarget { id: string; position: PaneMovePosition; allowed: boolean }
interface DragFeedback { id: string; target: DropTarget | null; x: number; y: number }
-export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSelect, selected, maxPanes = MAX_WORKSPACE_PANES, fontSize, appearance, disabled = false, onMutationStart, onMutationEnd }: Props) {
+export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSelect, selected, maxPanes = MAX_WORKSPACE_PANES, fontSize, appearance, disabled = false, onMutationStart, onMutationEnd, paneStyle: look = "classic" }: Props) {
const theme = useThemeValue();
const pushToast = useEventStore((state) => state.pushToast);
// The pane an agent card in the side panel pointed at, framed in blue.
@@ -114,6 +120,7 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
const resizing = sizes.dragging !== null;
const columns = Math.max(1, layoutSpan(tree, "row"));
const visibleMaximized = maximized && members.includes(maximized) ? maximized : null;
+ const minimal = look === "minimal";
useEffect(() => {
mounted.current = true;
@@ -366,11 +373,12 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
if (candidates[0]) void move(id, idOf(candidates[0].entry));
}}
style={paneStyle(visibleMaximized === id ? { x: 0, y: 0, w: 1, h: 1 } : layout.boxes[index]!)}
- className={cn("min-h-0 min-w-0 rounded-2xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ className={cn("min-h-0 min-w-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ minimal ? "rounded-none" : "rounded-2xl",
drag?.id === id && "opacity-50",
spotlitPane === terminal.name && "ring-2 ring-accent ring-offset-2 ring-offset-background",
visibleMaximized && visibleMaximized !== id && "hidden")}>
- <AgenticTerminal headerMode="compact" agent={terminal.agent}
+ <AgenticTerminal headerMode={minimal ? "minimal" : "compact"} accentFocus={tiles.length > 1} agent={terminal.agent}
name={terminal.name} workspaceId={session.id} displayName={terminal.display_name}
recap={terminal.recap} promptCount={terminal.prompts_sent} appearance={appearance ?? theme} fontSize={fontSize}
focused={selected === terminal.name} onFocus={() => { if (spotlitPane && spotlitPane !== terminal.name) setSpotlight(null); onSelect(terminal.name); }}
@@ -385,7 +393,7 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
computerName={computerName(terminal)} placementItems={placementItems(terminal)}
onFork={terminal.accepts_prompts === false ? undefined : () => setForking({ name: terminal.name, agent: terminal.agent, displayName: terminal.display_name, workspaceId: session.id })} />
{drag?.target?.id === id && <div aria-hidden="true" data-testid="dock-preview" data-position={drag.target.position}
- className={cn("pointer-events-none absolute z-20 flex items-center justify-center rounded-xl border-2 p-2", drag.target.allowed ? "border-ring/70 bg-accent/[0.15]" : "border-destructive bg-background/80",
+ className={cn("pointer-events-none absolute z-20 flex items-center justify-center border-2 p-2", minimal ? "rounded-none" : "rounded-xl", drag.target.allowed ? "border-ring/70 bg-accent/[0.15]" : "border-destructive bg-background/80",
drag.target.position === "left" ? "inset-y-1 left-1 w-1/2" : drag.target.position === "right" ? "inset-y-1 right-1 w-1/2" : drag.target.position === "above" ? "inset-x-1 top-1 h-1/2" : drag.target.position === "below" ? "inset-x-1 bottom-1 h-1/2" : "inset-1")}>
<span className="rounded-md bg-popover px-3 py-2 text-center text-xs font-medium text-popover-foreground shadow-lg">{drag.target.allowed ? DOCK_LABELS[drag.target.position] : `Maximum ${MAX_GRID_COLUMNS} columns × ${MAX_GRID_ROWS} rows`}</span>
</div>}
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.test.tsx
index b102bc85af..0d03d3ef4e 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.test.tsx
@@ -160,3 +160,49 @@ describe("compact workspace terminal header", () => {
expect(screen.queryByRole("menu")).toBeNull();
});
});
+
+describe("minimal tile controls (overlay variant)", () => {
+ it("floats four square controls and no title, shown only under the pointer", () => {
+ render(<WorkspaceTerminalHeader {...BASE} variant="overlay" onToggleMaximize={() => {}} onClose={() => {}} onOpenConversation={() => {}} />);
+ expect(screen.queryByTestId("workspace-terminal-header-Dana")).toBeNull();
+ expect(screen.queryByTestId("pane-title-Dana")).toBeNull();
+ const controls = screen.getByTestId("workspace-terminal-controls-Dana");
+ expect(controls.className).toContain("absolute");
+ expect(controls.className).toContain("opacity-0");
+ expect(controls.className).toContain("group-hover/tile:opacity-100");
+ expect(controls.className).toContain("focus-within:opacity-100");
+ const buttons = within(controls).getAllByRole("button");
+ expect(buttons.map((button) => button.getAttribute("aria-label"))).toEqual(["Dana", "More actions for Dana", "Maximize Dana", "Close Dana"]);
+ for (const button of buttons) expect(button.className).toContain("rounded-none");
+ });
+
+ it("moves the pane from its handle only, and stays visible while its menu is open", () => {
+ const arrange = vi.fn();
+ render(<WorkspaceTerminalHeader {...BASE} variant="overlay" onArrangeStart={arrange} onOpenConversation={() => {}} />);
+ const handle = screen.getByRole("button", { name: "Move Dana" });
+ expect(handle.dataset.ideDragHandle).toBe("true");
+ expect(handle.getAttribute("aria-keyshortcuts")).toContain("Alt+ArrowLeft");
+ pressPointer(handle);
+ expect(arrange).toHaveBeenCalledTimes(1);
+ pressPointer(handle, 2);
+ pressPointer(screen.getByRole("button", { name: "More actions for Dana" }));
+ expect(arrange).toHaveBeenCalledTimes(1);
+ fireEvent.click(screen.getByRole("button", { name: "More actions for Dana" }));
+ const controls = screen.getByTestId("workspace-terminal-controls-Dana");
+ expect(controls.className).toContain("opacity-100");
+ expect(controls.className).not.toContain("opacity-0");
+ expect(screen.getByRole("menu").className).toContain("rounded-none");
+ });
+
+ it("renames in place of the handle", async () => {
+ const rename = vi.fn().mockResolvedValue(true);
+ render(<WorkspaceTerminalHeader {...BASE} variant="overlay" onRename={rename} />);
+ fireEvent.click(screen.getByRole("button", { name: "More actions for Dana" }));
+ fireEvent.click(screen.getByRole("menuitem", { name: "Rename" }));
+ expect(screen.queryByRole("button", { name: "Dana" })).toBeNull();
+ fireEvent.change(screen.getByRole("textbox", { name: "Name for Dana" }), { target: { value: "Installer" } });
+ await act(async () => { fireEvent.click(screen.getByRole("button", { name: "Save name" })); });
+ expect(rename).toHaveBeenCalledWith("Installer");
+ expect(screen.queryByRole("textbox")).toBeNull();
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.tsx
index 5a27c3b948..64f3a7786e 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalHeader.tsx
@@ -1,6 +1,6 @@
import { useEffect, useId, useLayoutEffect, useRef, useState, type ComponentType, type CSSProperties, type MouseEvent, type PointerEvent, type SVGProps } from "react";
import { createPortal } from "react-dom";
-import { Check, GitBranch, Maximize2, Minimize2, MoreHorizontal, Plus, Server, X } from "lucide-react";
+import { Check, GitBranch, GripVertical, Maximize2, Minimize2, MoreHorizontal, Plus, Server, X } from "lucide-react";
import { AgentMark } from "./AgentMark";
import { BranchIcon } from "./branchIcon";
import { usePaneTitle } from "@/store/paneRecaps";
@@ -39,6 +39,14 @@ interface Props {
computerName?: string;
/** "Run on …" / "Bring back" entries for the pane's menu. */
placementItems?: { label: string; run: () => void }[];
+ /**
+ * `bar` is the title bar across the top of the pane. `overlay` is the
+ * minimal tile's chrome: no title, only a small square cluster in the top
+ * corner — move handle, menu, maximize, close — shown while the pointer is
+ * over the pane (or a control in it has keyboard focus). It floats over the
+ * terminal instead of taking a row from it.
+ */
+ variant?: "bar" | "overlay";
}
type MenuIcon = ComponentType<SVGProps<SVGSVGElement>>;
@@ -58,7 +66,7 @@ export function WorkspaceTerminalHeader({
name, workspaceId, promptCount = 0, agent, agentLogoUrl, displayName, status, appearance, arranging = false,
maximized = false, addDisabled = false, onArrangeStart, onActivate, onToggleMaximize,
onAdd, onClose, onRename, onOpenConversation, onOpenChat, onRestart, onFork, branch,
- computerName, placementItems,
+ computerName, placementItems, variant = "bar",
}: Props) {
const brand = PANE_BRAND[appearance];
// The pane's goal in a few words, in place of its call-sign; the call-sign
@@ -134,6 +142,110 @@ export function WorkspaceTerminalHeader({
finally { setSaving(false); }
};
+ // The overlay's buttons are square and a step smaller: they float over the
+ // terminal's own text, so they take as little of it as they can.
+ const action = variant === "overlay" ? ACTION_CLASS.replace("h-7 w-7", "h-6 w-6").replace(" rounded ", " rounded-none ") : ACTION_CLASS;
+
+ const renameForm = draft === null ? null : <form data-header-control="true"
+ className={`flex min-w-0 items-center gap-1 ${variant === "overlay" ? "w-56" : "flex-1"}`}
+ onSubmit={(event) => { event.preventDefault(); void commitRename(); }}>
+ <input autoFocus aria-label={`Name for ${name}`} value={draft} maxLength={40} disabled={saving}
+ aria-invalid={Boolean(renameError)}
+ onChange={(event) => setDraft(event.target.value)}
+ onKeyDown={(event) => { if (event.key === "Escape") { event.stopPropagation(); setDraft(null); setRenameError(""); } }}
+ className={`min-w-0 flex-1 border px-1.5 py-0.5 text-sm outline-none ${variant === "overlay" ? "rounded-none" : "rounded"}`}
+ style={{ borderColor: chrome.border, background: chrome.float, color: brand.ink }} />
+ <button type="submit" aria-label="Save name" disabled={saving} className={action}><Check className="h-3.5 w-3.5" /></button>
+ <button type="button" aria-label="Cancel rename" disabled={saving} onClick={() => { setDraft(null); setRenameError(""); }} className={action}><X className="h-3.5 w-3.5" /></button>
+ </form>;
+
+ const menu = createPortal(<div ref={menuRef} id={menuId} role="menu" hidden={!menuOpen} aria-label={`Actions for ${name}`}
+ className={`fixed z-[90] w-[200px] border p-1 shadow-lg ${variant === "overlay" ? "rounded-none" : "rounded-lg"}`}
+ style={{ ...variables, ...(menuPosition ?? { left: 0, top: 0 }), borderColor: chrome.border, background: chrome.float }}
+ onPointerDown={(event) => event.stopPropagation()}
+ onMouseDown={(event) => event.stopPropagation()}
+ onBlur={(event) => {
+ if (event.relatedTarget instanceof Node && !event.currentTarget.contains(event.relatedTarget) && event.relatedTarget !== moreRef.current) setMenuPosition(null);
+ }}
+ onKeyDown={(event) => {
+ if (event.key === "Escape") { event.preventDefault(); event.stopPropagation(); setMenuPosition(null); moreRef.current?.focus(); return; }
+ if (event.key === "Tab") { setMenuPosition(null); moreRef.current?.focus(); return; }
+ if (!["ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) return;
+ event.preventDefault();
+ const items = Array.from(menuRef.current?.querySelectorAll<HTMLButtonElement>("[role=menuitem]") ?? []);
+ const at = items.indexOf(document.activeElement as HTMLButtonElement);
+ const index = event.key === "Home" ? 0 : event.key === "End" ? items.length - 1 : (at + (event.key === "ArrowDown" ? 1 : -1) + items.length) % items.length;
+ items[index]?.focus();
+ }}>
+ {([
+ onRename && { label: "Rename", run: () => { setDraft(name); setRenameError(""); } },
+ onFork && !addDisabled && { label: "Fork…", Icon: BranchIcon, run: onFork },
+ ...(onAdd && !addDisabled ? SPLIT_ITEMS.map((item, index) => ({
+ label: `${item.label}…`, Icon: item.Icon, separated: index === 0, run: () => onAdd(item.direction),
+ })) : []),
+ onToggleMaximize && { label: maximized ? "Restore size" : "Maximize", separated: true,
+ Icon: maximized ? Minimize2 : Maximize2, run: onToggleMaximize },
+ onOpenConversation && { label: "Conversation history", run: onOpenConversation },
+ onOpenChat && { label: "Open as chat", run: onOpenChat },
+ stopped && onRestart && { label: "Restart agent", run: onRestart },
+ ...(placementItems ?? []).map((item, index) => ({ ...item, Icon: Server, separated: index === 0 })),
+ ] as (MenuItem | false | undefined | null)[]).filter((item): item is MenuItem => Boolean(item)).map((item) =>
+ <button type="button" role="menuitem" key={item.label} onClick={() => choose(item.run)}
+ className={`flex w-full items-center gap-2 rounded px-2.5 py-2 text-left text-xs hover:bg-[color:var(--pane-chip)] focus:bg-[color:var(--pane-chip)] focus:outline-none ${item.separated ? "mt-1 border-t border-[color:var(--pane-chip)] pt-2" : ""}`}>
+ {item.Icon && <item.Icon className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />}{item.label}
+ </button>,
+ )}
+ <PromptHistoryButton terminal={name} workspaceId={workspaceId} count={promptCount} triggerMode="menu-item"
+ onOpen={() => setMenuPosition(null)} restoreFocus={() => moreRef.current?.focus()} />
+ {onClose && <button type="button" role="menuitem" onClick={() => choose(onClose)}
+ className="mt-1 flex w-full items-center gap-2 rounded border-t border-[color:var(--pane-chip)] px-2.5 py-2 pt-2 text-left text-xs hover:bg-[color:var(--pane-chip)] focus:bg-[color:var(--pane-chip)] focus:outline-none">
+ <X className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />Close pane</button>}
+ </div>, document.body);
+
+ const moreButton = <button ref={moreRef} type="button" aria-label={`More actions for ${name}`} aria-haspopup="menu" aria-expanded={menuOpen}
+ aria-controls={menuOpen ? menuId : undefined} onClick={toggleMenu}
+ onKeyDown={(event) => { if (event.key === "ArrowDown") { event.preventDefault(); toggleMenu(); } }}
+ className={action}><MoreHorizontal className="h-4 w-4" /></button>;
+ const maximizeButton = <button type="button" aria-label={`${maximized ? "Restore" : "Maximize"} ${name}`} disabled={!onToggleMaximize}
+ onClick={onToggleMaximize} className={action}>{maximized ? <Minimize2 className="h-3.5 w-3.5" /> : <Maximize2 className="h-3.5 w-3.5" />}</button>;
+ const closeButton = <button type="button" aria-label={`Close ${name}`} disabled={!onClose} onClick={onClose} className={action}><X className="h-4 w-4" /></button>;
+
+ if (variant === "overlay") {
+ // Held visible while the reader is using it: a menu or rename open, or
+ // the pane being carried. Otherwise it shows only under the pointer.
+ const pinned = menuOpen || draft !== null || arranging;
+ const label = title ? `${title} (${name})` : name;
+ return <>
+ <div data-testid={`workspace-terminal-controls-${name}`} data-header-control="true"
+ className={`absolute right-1 top-1 z-30 flex select-none items-center gap-px border p-px transition-opacity duration-150 motion-reduce:transition-none ${pinned ? "opacity-100" : "opacity-0 focus-within:opacity-100 group-hover/tile:opacity-100"}`}
+ style={{ ...variables, borderColor: chrome.border, background: chrome.float }}
+ onContextMenu={openMenuAt}>
+ {draft === null ? <button type="button" data-ide-drag-handle="true" data-testid={`pane-move-${name}`}
+ onClick={(event) => { if (event.detail === 0) onActivate?.(); }}
+ onPointerDown={(event) => {
+ if (event.button !== 0) return;
+ setMenuPosition(null);
+ onArrangeStart?.(event);
+ }}
+ title={onArrangeStart ? `${label} · drag to move` : label}
+ aria-label={onArrangeStart ? `Move ${name}` : name}
+ aria-describedby={onArrangeStart ? dragHintId : undefined}
+ aria-keyshortcuts={onArrangeStart ? "Alt+ArrowLeft Alt+ArrowRight Alt+ArrowUp Alt+ArrowDown" : undefined}
+ style={{ touchAction: onArrangeStart ? "none" : undefined }}
+ className={`${action} ${onArrangeStart ? arranging ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`}>
+ <GripVertical className="h-3.5 w-3.5" aria-hidden="true" />
+ </button> : renameForm}
+ <span id={dragHintId} className="sr-only">Drag to reorder, or focus this handle and press Alt with an arrow key.</span>
+ {moreButton}
+ {maximizeButton}
+ {closeButton}
+ </div>
+ {renameError && <p role="alert" className="absolute right-1 top-10 z-30 border px-2 py-1 text-xs"
+ style={{ borderColor: chrome.border, background: chrome.float, color: theme.red }}>{renameError}</p>}
+ {menu}
+ </>;
+ }
+
return <>
<header data-testid={`workspace-terminal-header-${name}`}
className="relative flex h-9 min-h-9 shrink-0 select-none items-center gap-1 border-b pl-2.5 pr-1"
@@ -164,74 +276,20 @@ export function WorkspaceTerminalHeader({
className="flex min-w-0 max-w-[45%] shrink items-center gap-1 rounded bg-[color:var(--pane-chip)] px-1.5 py-0.5 font-mono text-[11px] font-normal text-[color:var(--pane-ink-muted)]">
<GitBranch className="h-3 w-3 shrink-0" aria-hidden="true" /><span className="truncate">{branch}</span>
</span>}
- </button> : <form data-header-control="true" className="flex min-w-0 flex-1 items-center gap-1"
- onSubmit={(event) => { event.preventDefault(); void commitRename(); }}>
- <input autoFocus aria-label={`Name for ${name}`} value={draft} maxLength={40} disabled={saving}
- aria-invalid={Boolean(renameError)}
- onChange={(event) => setDraft(event.target.value)}
- onKeyDown={(event) => { if (event.key === "Escape") { event.stopPropagation(); setDraft(null); setRenameError(""); } }}
- className="min-w-0 flex-1 rounded border px-1.5 py-0.5 text-sm outline-none"
- style={{ borderColor: chrome.border, background: chrome.float, color: brand.ink }} />
- <button type="submit" aria-label="Save name" disabled={saving} className={ACTION_CLASS}><Check className="h-3.5 w-3.5" /></button>
- <button type="button" aria-label="Cancel rename" disabled={saving} onClick={() => { setDraft(null); setRenameError(""); }} className={ACTION_CLASS}><X className="h-3.5 w-3.5" /></button>
- </form>}
+ </button> : renameForm}
<span id={dragHintId} className="sr-only">Drag to reorder, or focus this title and press Alt with an arrow key.</span>
<div data-header-control="true" className="flex shrink-0 items-center gap-0.5">
- <button ref={moreRef} type="button" aria-label={`More actions for ${name}`} aria-haspopup="menu" aria-expanded={menuOpen}
- aria-controls={menuOpen ? menuId : undefined} onClick={toggleMenu}
- onKeyDown={(event) => { if (event.key === "ArrowDown") { event.preventDefault(); toggleMenu(); } }}
- className={ACTION_CLASS}><MoreHorizontal className="h-4 w-4" /></button>
- <button type="button" aria-label={`${maximized ? "Restore" : "Maximize"} ${name}`} disabled={!onToggleMaximize}
- onClick={onToggleMaximize} className={ACTION_CLASS}>{maximized ? <Minimize2 className="h-3.5 w-3.5" /> : <Maximize2 className="h-3.5 w-3.5" />}</button>
+ {moreButton}
+ {maximizeButton}
{onFork && <button type="button" data-testid={`pane-fork-${name}`} aria-label={`Fork ${name}`} title={`Fork ${name}`}
disabled={addDisabled} onClick={onFork} className={`group ${ACTION_CLASS}`}>
<BranchIcon className="h-[15px] w-[15px] opacity-75 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100" /></button>}
<button type="button" aria-label={`Add agent beside ${name}`} disabled={addDisabled || !onAdd}
onClick={() => onAdd?.("right")} className={ACTION_CLASS}><Plus className="h-4 w-4" /></button>
- <button type="button" aria-label={`Close ${name}`} disabled={!onClose} onClick={onClose} className={ACTION_CLASS}><X className="h-4 w-4" /></button>
+ {closeButton}
</div>
</header>
{renameError && <p role="alert" className="px-2 py-1 text-xs" style={{ color: theme.red }}>{renameError}</p>}
- {createPortal(<div ref={menuRef} id={menuId} role="menu" hidden={!menuOpen} aria-label={`Actions for ${name}`}
- className="fixed z-[90] w-[200px] rounded-lg border p-1 shadow-lg"
- style={{ ...variables, ...(menuPosition ?? { left: 0, top: 0 }), borderColor: chrome.border, background: chrome.float }}
- onPointerDown={(event) => event.stopPropagation()}
- onBlur={(event) => {
- if (event.relatedTarget instanceof Node && !event.currentTarget.contains(event.relatedTarget) && event.relatedTarget !== moreRef.current) setMenuPosition(null);
- }}
- onKeyDown={(event) => {
- if (event.key === "Escape") { event.preventDefault(); event.stopPropagation(); setMenuPosition(null); moreRef.current?.focus(); return; }
- if (event.key === "Tab") { setMenuPosition(null); moreRef.current?.focus(); return; }
- if (!["ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) return;
- event.preventDefault();
- const items = Array.from(menuRef.current?.querySelectorAll<HTMLButtonElement>("[role=menuitem]") ?? []);
- const at = items.indexOf(document.activeElement as HTMLButtonElement);
- const index = event.key === "Home" ? 0 : event.key === "End" ? items.length - 1 : (at + (event.key === "ArrowDown" ? 1 : -1) + items.length) % items.length;
- items[index]?.focus();
- }}>
- {([
- onRename && { label: "Rename", run: () => { setDraft(name); setRenameError(""); } },
- onFork && !addDisabled && { label: "Fork…", Icon: BranchIcon, run: onFork },
- ...(onAdd && !addDisabled ? SPLIT_ITEMS.map((item, index) => ({
- label: `${item.label}…`, Icon: item.Icon, separated: index === 0, run: () => onAdd(item.direction),
- })) : []),
- onToggleMaximize && { label: maximized ? "Restore size" : "Maximize", separated: true,
- Icon: maximized ? Minimize2 : Maximize2, run: onToggleMaximize },
- onOpenConversation && { label: "Conversation history", run: onOpenConversation },
- onOpenChat && { label: "Open as chat", run: onOpenChat },
- stopped && onRestart && { label: "Restart agent", run: onRestart },
- ...(placementItems ?? []).map((item, index) => ({ ...item, Icon: Server, separated: index === 0 })),
- ] as (MenuItem | false | undefined | null)[]).filter((item): item is MenuItem => Boolean(item)).map((item) =>
- <button type="button" role="menuitem" key={item.label} onClick={() => choose(item.run)}
- className={`flex w-full items-center gap-2 rounded px-2.5 py-2 text-left text-xs hover:bg-[color:var(--pane-chip)] focus:bg-[color:var(--pane-chip)] focus:outline-none ${item.separated ? "mt-1 border-t border-[color:var(--pane-chip)] pt-2" : ""}`}>
- {item.Icon && <item.Icon className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />}{item.label}
- </button>,
- )}
- <PromptHistoryButton terminal={name} workspaceId={workspaceId} count={promptCount} triggerMode="menu-item"
- onOpen={() => setMenuPosition(null)} restoreFocus={() => moreRef.current?.focus()} />
- {onClose && <button type="button" role="menuitem" onClick={() => choose(onClose)}
- className="mt-1 flex w-full items-center gap-2 rounded border-t border-[color:var(--pane-chip)] px-2.5 py-2 pt-2 text-left text-xs hover:bg-[color:var(--pane-chip)] focus:bg-[color:var(--pane-chip)] focus:outline-none">
- <X className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />Close pane</button>}
- </div>, document.body)}
+ {menu}
</>;
}
diff --git a/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts b/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts
index 16803bdeaf..bb0ff9a1f1 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts
+++ b/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts
@@ -145,6 +145,46 @@ export function storedTerminalAppearance(): TerminalAppearance | null {
}
}
+/**
+ * How a workspace draws its panes.
+ *
+ * * `minimal` — the tiling-multiplexer look (herdr, tmux): square 1px frames,
+ * no title bar, the focused pane marked by the signal hue alone, and the
+ * pane's controls shown only while the pointer is over it.
+ * * `classic` — rounded cards, each with a title bar naming its goal and
+ * carrying its controls.
+ *
+ * A reader's preference, kept in this window's storage like the appearance;
+ * `classic` stays one click away in Workspace options for anyone who wants
+ * the titles back.
+ */
+export type PaneStyle = "minimal" | "classic";
+
+/** Where the reader's pane style is kept; no entry means the default. */
+export const PANE_STYLE_KEY = "jarvis.agenticIde.paneStyle";
+
+export const DEFAULT_PANE_STYLE: PaneStyle = "minimal";
+
+/** The stored pane style, or the default when there is none (or storage is blocked). */
+export function storedPaneStyle(): PaneStyle {
+ try {
+ const raw = window.localStorage.getItem(PANE_STYLE_KEY);
+ return raw === "minimal" || raw === "classic" ? raw : DEFAULT_PANE_STYLE;
+ } catch {
+ // Private mode or disabled storage reads as "no preference", never as a failure.
+ return DEFAULT_PANE_STYLE;
+ }
+}
+
+/** Remember the reader's pane style; losing it only costs a click next time. */
+export function storePaneStyle(style: PaneStyle): void {
+ try {
+ window.localStorage.setItem(PANE_STYLE_KEY, style);
+ } catch {
+ // Blocked storage keeps the choice for this session only, which is fine.
+ }
+}
+
/**
* The lifecycle a pane's frame reports, mirroring `PaneStatus` in
* ./AgenticTerminal.
@@ -295,3 +335,47 @@ export const PANE_CHROME: Record<TerminalAppearance, PaneChrome> = {
},
},
};
+
+/** The frame of a pane drawn in the `minimal` style. */
+export interface PaneTileChrome {
+ /** The resting edge per lifecycle, as in `PaneChrome.edge`. */
+ edge: Record<PaneEdgeState, string>;
+ /** The focused pane's edge. */
+ focus: string;
+}
+
+/**
+ * Frame colours for the `minimal` pane style.
+ *
+ * A multiplexer grid is separated by its lines alone — no title bars, no
+ * radius, no elevation — so the resting edge is a full step brighter than
+ * the card style's hairline (herdr draws it in a mid grey). Otherwise every
+ * edge would dissolve into the wallpaper and the grid would read as one
+ * block of text.
+ *
+ * The focused pane wears the app's signal hue (`--accent`: #3D8BFF dark,
+ * #096CDC light), the one colour the product spends on "this is where you
+ * are". It is the only standing accent in the workspace; a failed pane keeps
+ * the fault hue from `PANE_CHROME`, a little stronger to match the brighter
+ * resting line.
+ */
+export const PANE_TILE: Record<TerminalAppearance, PaneTileChrome> = {
+ light: {
+ edge: {
+ connecting: "rgba(38,37,30,0.30)",
+ live: "rgba(38,37,30,0.30)",
+ exited: "rgba(38,37,30,0.14)",
+ error: "rgba(190,23,68,0.65)",
+ },
+ focus: "#096cdc",
+ },
+ dark: {
+ edge: {
+ connecting: "rgba(255,255,255,0.26)",
+ live: "rgba(255,255,255,0.26)",
+ exited: "rgba(255,255,255,0.11)",
+ error: "rgba(227,70,113,0.75)",
+ },
+ focus: "#3d8bff",
+ },
+};
diff --git a/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx b/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx
index f07128d205..38c805e347 100644
--- a/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx
+++ b/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx
@@ -7,6 +7,7 @@ import { WorkspaceAgentSetup } from "@/components/agentic/WorkspaceAgentSetup";
import { RunOnPicker, storeRunOn, storedRunOn } from "@/components/agentic/RunOnPicker";
import { WorkspaceOptionsDialog } from "@/components/agentic/WorkspaceOptionsDialog";
import { FONT_DEFAULT } from "@/components/agentic/paneFont";
+import { storePaneStyle, storedPaneStyle, type PaneStyle } from "@/components/agentic/terminalThemes";
import { IdeSidePanelFrame } from "@/components/agentic/sidePanel/IdeSidePanel";
import { GRID_LIMIT_HINT, MAX_WORKSPACE_PANES, canSplitFit, fitsWorkspace, isBalancedWorkspace } from "@/components/agentic/workspaceDocking";
import { AgentMark } from "@/components/agentic/AgentMark";
@@ -109,6 +110,7 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {
const stored = localStorage.getItem(APPEARANCE_KEY);
return stored === "light" || stored === "dark" ? stored : null;
});
+ const [paneStyle, setPaneStyle] = useState<PaneStyle>(storedPaneStyle);
const handledAction = useRef(0);
const handledPaneRequest = useRef(0);
const refreshEpoch = useRef(0);
@@ -409,6 +411,7 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {
});
const saveAppearance = (next: "light" | "dark" | null) => { setAppearance(next); if (next) localStorage.setItem(APPEARANCE_KEY, next); else localStorage.removeItem(APPEARANCE_KEY); };
+ const savePaneStyle = (next: PaneStyle) => { setPaneStyle(next); storePaneStyle(next); };
const balanceLayout = () => void run(async () => {
if (!session) return;
const next = await reorderIdeTerminals(session.id, session.terminals.map((terminal) => terminal.history_id ?? terminal.key));
@@ -474,6 +477,7 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {
count={session?.terminals.length ?? 0} maxPanes={maxPanes} busy={busy} canAdd={installed.length > 0}
onAdd={openAgentPicker} onBalance={balanceLayout} onRename={() => { setRenameValue(session?.name ?? session?.project.name ?? ""); setRenameOpen(true); }}
onClose={stopWorkspace} onGit={() => setGitOpen(true)} appearance={appearance} onAppearance={saveAppearance}
+ paneStyle={paneStyle} onPaneStyle={savePaneStyle}
/>
{session && <GitPanelDialog open={gitOpen} onOpenChange={setGitOpen} folder={session.folder} workspace={session.name ?? session.project.name}
onOpenWorktree={(tree) => openWorktreeWorkspace(tree.path, tree.branch)} onNewWorktree={newWorktreeWorkspace} />}
@@ -483,7 +487,7 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {
<IdeSidePanelFrame>
{session ? <WorkspaceTerminalGrid key={session.id} session={session} onChanged={(next) => setState((current) => current?.session?.id === next.id ? { ...current, session: next } : current)}
onAdd={openAgentPicker} onClose={closeAgent} onSelect={setSelected} selected={selected} maxPanes={maxPanes} fontSize={fontSize} appearance={appearance} disabled={busy}
- onMutationStart={beginGridMutation} onMutationEnd={endGridMutation} />
+ onMutationStart={beginGridMutation} onMutationEnd={endGridMutation} paneStyle={paneStyle} />
: <div className="flex h-full flex-col items-center justify-center gap-3 px-6 text-center">
<FolderPlus className="h-8 w-8 text-muted-foreground/70" />
<h1 className="text-lg font-medium">{projects.some((project) => !project.scratch && !project.archived) ? "Choose a workspace" : "Connect a project"}</h1>