From e2614f2be468ec6036ad1c2af2034f1ea9442f7b Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Tue, 14 Jul 2026 17:22:38 +0000 Subject: [PATCH 1/4] fix(tui): keep background shell status inline --- packages/tui/src/routes/session/index.tsx | 39 +++++++++++------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index 054d35d4059f..7f508fe226ee 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -2327,11 +2327,13 @@ function Shell(props: ToolProps) { const [expanded, setExpanded] = createSignal(false) const maxLines = 10 const maxChars = createMemo(() => maxLines * Math.max(20, ctx.width - 6)) - const input = createMemo(() => (command() ? `${isRunning() ? "" : "$ "}${command()}` : "")) - const content = createMemo(() => [input(), output()].filter(Boolean).join("\n\n")) - const collapsed = createMemo(() => collapseToolOutput(content(), maxLines, maxChars())) + const input = createMemo(() => { + const value = command()?.replace(/\s+/g, " ").trim() + return value ? `${isRunning() ? "" : "$ "}${value}` : "" + }) + const collapsed = createMemo(() => collapseToolOutput(output(), maxLines, maxChars())) const limited = createMemo(() => { - if (expanded() || !collapsed().overflow) return content() + if (expanded() || !collapsed().overflow) return output() return collapsed().output }) @@ -2348,23 +2350,20 @@ function Shell(props: ToolProps) { ) } > - - {limited().slice(0, input().length)} - {limited().slice(input().length)} - - } - > - - {limited().slice(0, input().length)} - {limited().slice(input().length)} - - + + + + + + {input()} + + + Background + + - - Background + + {limited()} {expanded() ? "Click to collapse" : "Click to expand"} From 4df54601df5e867951db588c8b39689cb4e3d79a Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Tue, 14 Jul 2026 17:48:25 +0000 Subject: [PATCH 2/4] fix(tui): pad background shell status --- packages/tui/src/routes/session/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index 7f508fe226ee..6fc4147be7af 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -2350,7 +2350,7 @@ function Shell(props: ToolProps) { ) } > - + From 746f941b406fbfeaff60076b27d586a656b8cade Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Tue, 14 Jul 2026 17:51:46 +0000 Subject: [PATCH 3/4] fix(tui): space background shell status --- packages/tui/src/routes/session/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index 6fc4147be7af..d9847e15ce81 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -2350,14 +2350,16 @@ function Shell(props: ToolProps) { ) } > - + + {input()} + Background From 13ef9924fa4a47f264fcdee316f98a137544f4c4 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Tue, 14 Jul 2026 18:03:50 +0000 Subject: [PATCH 4/4] fix(tui): preserve shell status spacing --- packages/tui/src/routes/session/index.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index d9847e15ce81..5f5129172f08 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -2352,15 +2352,19 @@ function Shell(props: ToolProps) { > - - + + + {"\u00a0"} + {input()} - - Background + + {"\u00a0"} + Background +