fix(tui): align switch reminders (#35637)

Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-06 23:02:34 -05:00 committed by GitHub
commit 93b7ca9b4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 1 deletions

View file

@ -1269,7 +1269,11 @@ function SessionSwitchMessageV2(props: { message: SessionMessage }) {
return switchLabel(props.message.model, ctx.models(), props.message.previous)
return ""
}
return <text fg={theme.textMuted}>{text()}</text>
return (
<box paddingLeft={3}>
<text fg={theme.textMuted}>{text()}</text>
</box>
)
}
function SessionNoticeMessageV2(props: { message: SessionMessage }) {

View file

@ -89,6 +89,19 @@ function FailedCompleteToolFixture() {
)
}
function ReminderAlignmentFixture() {
return (
<box flexDirection="column">
<box paddingLeft={3}>
<text>Switched variant to medium</text>
</box>
<InlineToolRow icon="◈" complete={true} pending="Notice">
Instructions updated
</InlineToolRow>
</box>
)
}
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(() => <ReminderAlignmentFixture />, { width: 35, height: 2 })).toBe(
" Switched variant to medium\n ◈ Instructions updated",
)
})
test("filters malformed nested tool wire data", () => {
expect(
parseApplyPatchFiles([