graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
fix(gui): adapt conversation spacing to split pane width
justrachfb1c155f4cda
diff --git a/apps/native/components/site/ChatBubbles.tsx b/apps/native/components/site/ChatBubbles.tsxindex 0a859241..b4d87d9a 100644--- a/apps/native/components/site/ChatBubbles.tsx+++ b/apps/native/components/site/ChatBubbles.tsx@@ -61,7 +61,7 @@ function PastedImage({ name }: { name: string }) {export const UserBubble = memo(function UserBubble({ text }: { text: string }) {const parts = splitImageMarkers(text);return (- <div className="flex justify-end pl-10 sm:pl-24" style={{ animation: "fade-up 300ms cubic-bezier(0.23,1,0.32,1) both" }}>+ <div data-user-bubble className="flex justify-end pl-10 sm:pl-24" style={{ animation: "fade-up 300ms cubic-bezier(0.23,1,0.32,1) both" }}><divclassName="rounded-xl px-3.5 py-2 min-w-0 whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-[13px] leading-relaxed text-ink shadow-hairline"style={{ background: "color-mix(in oklab, var(--accent) 12%, var(--surface))" }}diff --git a/apps/native/components/site/ChatColumn.tsx b/apps/native/components/site/ChatColumn.tsxindex 2af893a5..9361ca7e 100644--- a/apps/native/components/site/ChatColumn.tsx+++ b/apps/native/components/site/ChatColumn.tsx@@ -30,7 +30,7 @@ export default function ChatColumn({ thread, compact, following, register, onOpereturn <div className="flex min-h-0 flex-1 flex-col"><ChatTranscript messages={thread.messages} register={register} following={following}onOpenPath={onOpenPath} onReview={onReview} snapshot={thread.snapshot} />- <div className={`shrink-0 bg-page px-4 ${compact ? "py-2" : "pt-3 pb-6 sm:px-8"}`}>+ <div data-chat-composer className={`shrink-0 bg-page px-4 ${compact ? "py-2" : "pt-3 pb-6 sm:px-8"}`}><div className="mx-auto max-w-[720px]">{thread.snapshot && thread.session ? <SavedSnapshot name={thread.session} cwd={thread.cwd}onRefresh={onRefresh} onContinue={onContinue} /> : <>diff --git a/apps/native/components/site/ChatEmpty.tsx b/apps/native/components/site/ChatEmpty.tsxindex 810f162f..d0241ae7 100644--- a/apps/native/components/site/ChatEmpty.tsx+++ b/apps/native/components/site/ChatEmpty.tsx@@ -44,7 +44,7 @@ export default function EmptyState({const where = cwd ?? health?.cwd;return (- <div className={`mx-auto flex min-h-full w-full min-w-0 max-w-[720px] flex-col justify-center px-4 ${compact ? "py-2" : "py-10 sm:px-8"}`}>+ <div data-chat-empty className={`mx-auto flex min-h-full w-full min-w-0 max-w-[720px] flex-col px-4 ${compact ? "justify-end py-2" : "justify-center py-10 sm:px-8"}`}>{!compact && <h1 className="text-[26px] font-normal tracking-[-0.02em] text-ink"><span className="home-reveal block text-ink-3">{greeting()}@@ -68,7 +68,7 @@ export default function EmptyState({<PromptBardemo={false}tall={!compact}- placeholder="Ask graff to read, edit, or review this workspace…"+ placeholder={compact ? "Ask graff…" : "Ask graff to read, edit, or review this workspace…"}models={models}modelKey={modelKey}onModelChange={onModelChange}diff --git a/apps/native/components/site/ChatSplitLayout.tsx b/apps/native/components/site/ChatSplitLayout.tsxindex 861d54cf..22fb27ff 100644--- a/apps/native/components/site/ChatSplitLayout.tsx+++ b/apps/native/components/site/ChatSplitLayout.tsx@@ -4,6 +4,7 @@ import type { Chat } from "./harness-types";import { ComposerDraftContext } from "@/components/primitives/useComposerDraft";import { createComposerDraft, type ComposerDraftStore } from "@/lib/composer-draft";import SplitDivider from "./SplitDivider";+import paneStyles from "./chat-pane.module.css";import {flatSplit,pruneSplit,splitGeometry,paneStyle,type SplitTree} from "@/lib/split-tree";export default function ChatSplitLayout({ threads, liveChatIds, activeId, direction, layout, onLayoutChange, onFocus, onClose, folder, body, split }: {threads: Chat[]; activeId: number; direction: "row" | "column"; layout?: SplitTree;@@ -41,7 +42,7 @@ export default function ChatSplitLayout({ threads, liveChatIds, activeId, directonPointerDownCapture={()=>{if(thread.id!==activeId)onFocus(thread.id);}}onFocusCapture={()=>{if(thread.id!==activeId)onFocus(thread.id);}}style={{...paneStyle(geometry.panes.find(p=>p.id===thread.id)!.box),minHeight:0,borderColor:split&&thread.id===activeId?'var(--accent)':undefined}}- className="absolute flex min-w-0 flex-col overflow-hidden rounded-[14px] border border-line bg-page">+ className={`${paneStyles.pane} absolute flex min-w-0 flex-col overflow-hidden border border-line bg-page ${split ? "rounded-[6px]" : "rounded-[14px]"}`}>{split&&<header className="flex h-9 shrink-0 items-center gap-2 border-b border-line px-3"><button type="button" aria-pressed={thread.id===activeId} onClick={()=>onFocus(thread.id)} title="Focus this chat" className="min-w-0 flex-1 truncate text-left text-xs font-medium">{thread.title??`Chat ${thread.id}`}</button><span title={folder(thread).path} className="flex min-w-0 max-w-[40%] items-center gap-1 text-[11px] text-ink-3"><IconFolder size={13}/><span className="truncate">{folder(thread).name}</span></span>diff --git a/apps/native/components/site/chat-pane.module.css b/apps/native/components/site/chat-pane.module.cssnew file mode 100644index 00000000..68b09181--- /dev/null+++ b/apps/native/components/site/chat-pane.module.css@@ -0,0 +1,25 @@+.pane {+ container: chat-pane / inline-size;+}++/* A split is measured by its own width, not by the desktop window. */+@container chat-pane (max-width: 540px) {+ .pane [data-transcript-content] {+ padding: 16px 12px;+ gap: 20px;+ }+ .pane [data-session-snapshot] {+ padding: 12px 12px 0;+ }+ .pane [data-user-bubble] {+ padding-left: 12px;+ }+ .pane [data-chat-composer],+ .pane [data-chat-empty] {+ padding: 8px;+ }+ .pane [data-saved-snapshot] {+ padding: 10px;+ font-size: 12px;+ }+}diff --git a/docs/adr/0081-desktop-split-focus-and-layout.md b/docs/adr/0081-desktop-split-focus-and-layout.mdindex f0ddce4c..7c75cd07 100644--- a/docs/adr/0081-desktop-split-focus-and-layout.md+++ b/docs/adr/0081-desktop-split-focus-and-layout.md@@ -19,6 +19,10 @@ that group's pane order, split tree and last focused chat. New tabs leave existigroups intact. Closing a pane removes that member; closing the top tab removesthe whole group. The split toggle returns group members to individual tabs.+Pane content responds to its own container width: narrow splits reduce+transcript padding and user-message indentation even on a wide desktop.+Empty split composers sit at the bottom, matching populated panes.+Tabs and workspace controls live in a shared toolbar above all panes. A combinedtab shows its member names and a miniature layout icon. Each splithas a compact, consistent header identifying its chat and folder. Adjacent panes