From 9732e8163a5368a0e936bd28bb13d2d449f9afda Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sun, 12 Jul 2026 21:29:47 -0400 Subject: [PATCH] chore(tui): preserve surrounding formatting --- packages/tui/src/routes/home.tsx | 10 +++++++++- packages/tui/test/cli/tui/data.test.tsx | 21 ++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/tui/src/routes/home.tsx b/packages/tui/src/routes/home.tsx index b20eb2ce01..5f67c4719c 100644 --- a/packages/tui/src/routes/home.tsx +++ b/packages/tui/src/routes/home.tsx @@ -95,7 +95,15 @@ export function Home() { {(_) => { const form = forms()[0] return form ? ( - + data.session.form.dismiss(form.sessionID, form.id)} /> diff --git a/packages/tui/test/cli/tui/data.test.tsx b/packages/tui/test/cli/tui/data.test.tsx index 58925c0dea..9a59b7cd20 100644 --- a/packages/tui/test/cli/tui/data.test.tsx +++ b/packages/tui/test/cli/tui/data.test.tsx @@ -1073,7 +1073,9 @@ test("tracks session status from active sessions and execution events", async () return message?.type === "compaction" && message.status === "running" && message.summary === "Streamed summary" }) expect(data.session.compaction.list("session-manual")).toEqual([]) - const compactionRow = manualRows.find((row) => row.type === "message" && row.messageID === "message-compaction") + const compactionRow = manualRows.find( + (row) => row.type === "message" && row.messageID === "message-compaction", + ) emitEvent(events, { id: "evt_manual_compaction_ended", created: 3, @@ -1115,7 +1117,9 @@ test("tracks session status from active sessions and execution events", async () const message = data.session.message.get("session-live", "msg_compaction_started") return message?.type === "compaction" && message.status === "running" && message.summary === "Live summary" }) - const autoCompactionRow = rows.find((row) => row.type === "message" && row.messageID === "msg_compaction_started") + const autoCompactionRow = rows.find( + (row) => row.type === "message" && row.messageID === "msg_compaction_started", + ) emitEvent(events, { id: "evt_compaction_ended", @@ -1188,7 +1192,10 @@ test("restores queued compaction from durable pending input", async () => { try { await wait(() => data.session.compaction.list(sessionID).length === 2) - expect(data.session.compaction.list(sessionID)).toEqual(["message-compaction-queued", "message-compaction-later"]) + expect(data.session.compaction.list(sessionID)).toEqual([ + "message-compaction-queued", + "message-compaction-later", + ]) await wait(() => rows.filter((row) => row.type === "compaction-queued").length === 2) expect(rows.filter((row) => row.type === "compaction-queued")).toEqual([ { type: "compaction-queued", inputID: "message-compaction-queued" }, @@ -2361,7 +2368,8 @@ function sessionInfo(id: string, parentID: string | undefined, cost = 0) { async function mountData(parents: Record, costs: Record = {}) { const calls = createFetch((url) => { const match = url.pathname.match(/^\/api\/session\/([^/]+)$/) - if (match && match[1] !== "active") return json({ data: sessionInfo(match[1], parents[match[1]], costs[match[1]]) }) + if (match && match[1] !== "active") + return json({ data: sessionInfo(match[1], parents[match[1]], costs[match[1]]) }) }) let data!: ReturnType let ready!: () => void @@ -2430,7 +2438,10 @@ test("indexes arbitrarily deep nesting under a single root", async () => { }) test("totals family cost for roots and keeps subagent cost scoped", async () => { - const { data, app } = await mountData({ grandchild: "child", child: "root" }, { root: 1, child: 2, grandchild: 3 }) + const { data, app } = await mountData( + { grandchild: "child", child: "root" }, + { root: 1, child: 2, grandchild: 3 }, + ) try { await data.session.refresh("grandchild") await data.session.refresh("child")