From 93b7ca9b4d468811bd0dbab632b4f2cae3e53a7b Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 23:02:34 -0500 Subject: [PATCH] fix(tui): align switch reminders (#35637) Co-authored-by: Aiden Cline --- packages/tui/src/routes/session/index.tsx | 6 +++++- .../tui/inline-tool-wrap-snapshot.test.tsx | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index 6c2bfd34ef..d1ea5e1272 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -1269,7 +1269,11 @@ function SessionSwitchMessageV2(props: { message: SessionMessage }) { return switchLabel(props.message.model, ctx.models(), props.message.previous) return "" } - return {text()} + return ( + + {text()} + + ) } function SessionNoticeMessageV2(props: { message: SessionMessage }) { diff --git a/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx b/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx index f9a657ecc4..402db8b5fe 100644 --- a/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx +++ b/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx @@ -89,6 +89,19 @@ function FailedCompleteToolFixture() { ) } +function ReminderAlignmentFixture() { + return ( + + + Switched variant to medium + + + Instructions updated + + + ) +} + async function renderFrame(component: () => JSX.Element, options: { width: number; height: number }) { testSetup = await testRender(component, options) await testSetup.renderOnce() @@ -124,6 +137,12 @@ describe("TUI inline tool wrapping", () => { expect(frame).not.toContain("Read failed") }) + test("aligns switch reminders with instruction reminders", async () => { + expect(await renderFrame(() => , { width: 35, height: 2 })).toBe( + " Switched variant to medium\n ◈ Instructions updated", + ) + }) + test("filters malformed nested tool wire data", () => { expect( parseApplyPatchFiles([