graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Make the full native chat tab hit target clickable
Cursor Agent8a42962378c1
diff --git a/apps/native/components/site/SessionTabs.tsx b/apps/native/components/site/SessionTabs.tsxindex 81640a7f..fdf235b8 100644--- a/apps/native/components/site/SessionTabs.tsx+++ b/apps/native/components/site/SessionTabs.tsx@@ -28,19 +28,10 @@ export default function SessionTabs({ chats, activeId, busyIds, unreadIds, agenttitle={c.title ?? "Drag to reorder or to a chat edge to split"}key={c.id}style={{ width: vertical ? "100%" : (c.paneIds?.length ?? 1) > 1 ? 230 : 144 }}- className={`group/tab select-none touch-none flex h-8 shrink-0 items-center gap-0.5 rounded-[7px] pl-2.5 pr-1 text-[12.5px] font-medium transition-colors duration-100 ${+ className={`group/tab select-none touch-none flex h-8 shrink-0 items-center rounded-[7px] pr-1 text-[12.5px] font-medium transition-colors duration-100 ${c.id === activeId && !agentsOpen ? "bg-hover-2 text-ink" : "text-ink-2 hover:bg-hover hover:text-ink"}`}>- {c.tree && (c.paneIds?.length ?? 1) > 1 && <SplitLayoutIcon tree={c.tree} />}- {busyIds.has(c.id) && (- <span- className="mr-1 size-3 shrink-0 animate-spin rounded-full border-[1.5px] border-current border-r-transparent text-ink-2 motion-reduce:animate-none"- role="img"- aria-label="Working"- />- )}- {!busyIds.has(c.id) && (c.paneIds ?? [c.id]).some(id => unreadIds?.has(id)) && <span role="img" aria-label="Unread response" className="mr-1 size-1.5 shrink-0 rounded-full bg-blue-500" />}<buttontype="button"aria-pressed={c.id === activeId && !agentsOpen}@@ -48,9 +39,18 @@ export default function SessionTabs({ chats, activeId, busyIds, unreadIds, agentfocusChat(c.id);}}title={c.title ?? (chats.length > 1 ? `Chat ${c.id}` : "Untitled")}- className="min-w-0 flex-1 text-left"+ className="flex h-full min-w-0 flex-1 items-center gap-0.5 pl-2.5 text-left">- <span className="block truncate">{c.title ?? (chats.length > 1 ? `Chat ${c.id}` : "Untitled")}</span>+ {c.tree && (c.paneIds?.length ?? 1) > 1 && <SplitLayoutIcon tree={c.tree} />}+ {busyIds.has(c.id) && (+ <span+ className="mr-1 size-3 shrink-0 animate-spin rounded-full border-[1.5px] border-current border-r-transparent text-ink-2 motion-reduce:animate-none"+ role="img"+ aria-label="Working"+ />+ )}+ {!busyIds.has(c.id) && (c.paneIds ?? [c.id]).some(id => unreadIds?.has(id)) && <span role="img" aria-label="Unread response" className="mr-1 size-1.5 shrink-0 rounded-full bg-blue-500" />}+ <span className="block min-w-0 flex-1 truncate">{c.title ?? (chats.length > 1 ? `Chat ${c.id}` : "Untitled")}</span></button><buttontype="button"diff --git a/apps/native/lib/session-tabs.test.tsx b/apps/native/lib/session-tabs.test.tsxnew file mode 100644index 00000000..013289dd--- /dev/null+++ b/apps/native/lib/session-tabs.test.tsx@@ -0,0 +1,47 @@+import { expect, test } from "bun:test";+import { renderToStaticMarkup } from "react-dom/server";+import SessionTabs from "../components/site/SessionTabs";++const chats = [+ { id: 1, title: "Review thread" },+ { id: 2, title: "Idle notes" },+];++function markup(busyIds: ReadonlySet<number>, unreadIds?: ReadonlySet<number>) {+ return renderToStaticMarkup(+ <SessionTabs+ chats={chats}+ activeId={1}+ busyIds={busyIds}+ unreadIds={unreadIds}+ agentsOpen={false}+ focusChat={() => undefined}+ closeChat={() => undefined}+ />,+ );+}++function activationInner(html: string, title: string) {+ const buttons = html.match(/<button\b[\s\S]*?<\/button>/g) ?? [];+ return buttons.find(button => button.includes("aria-pressed") && button.includes(title)) ?? "";+}++test("working status and title share the full-height tab activation control", () => {+ const html = markup(new Set([1]));+ const activate = activationInner(html, "Review thread");+ expect(activate).toContain('aria-label="Working"');+ expect(activate).toContain("Review thread");+ expect(activate).toContain("pl-2.5");+ expect(activate).toContain("h-full");+ expect(activate).not.toContain('aria-label="Close tab"');+ expect(html).toContain('aria-label="Close tab"');+ expect(html.indexOf('aria-label="Working"')).toBeLessThan(html.indexOf('aria-label="Close tab"'));+});++test("unread marker sits inside the same activation control as the title", () => {+ const html = markup(new Set(), new Set([2]));+ const activate = activationInner(html, "Idle notes");+ expect(activate).toContain('aria-label="Unread response"');+ expect(activate).toContain("Idle notes");+ expect(activate).not.toContain('aria-label="Close tab"');+});