|
|
@@ -134,6 +134,32 @@ function LoadedReadBeforeSubagentFixture() {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+function AssistantSummaryBeforeSubagentFixture() {
|
|
|
+ return (
|
|
|
+ <box flexDirection="column" width={72}>
|
|
|
+ <box id="assistant-summary-message-one" paddingLeft={3}>
|
|
|
+ <text>▣ Build · Little Frank · 53.1s</text>
|
|
|
+ </box>
|
|
|
+ <InlineToolRow id="tool-inline-subagent-one" icon="✓" complete={true} pending="" subagent={true}>
|
|
|
+ {"Build Task — Review changes\n↳ 48 toolcalls · 1m 40s"}
|
|
|
+ </InlineToolRow>
|
|
|
+ </box>
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+function AssistantErrorBeforeSubagentFixture() {
|
|
|
+ return (
|
|
|
+ <box flexDirection="column" width={72}>
|
|
|
+ <box id="assistant-error-message-one" border={["left"]} paddingTop={1} paddingBottom={1} paddingLeft={2}>
|
|
|
+ <text>Managed inference requires an active Member plan</text>
|
|
|
+ </box>
|
|
|
+ <InlineToolRow id="tool-inline-subagent-one" icon="✓" complete={true} pending="" subagent={true}>
|
|
|
+ {"Build Task — Review changes\n↳ 48 toolcalls · 1m 40s"}
|
|
|
+ </InlineToolRow>
|
|
|
+ </box>
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
function StickyScrollFixture(props: { separated: boolean; scroll: (scroll: ScrollBoxRenderable) => void }) {
|
|
|
return (
|
|
|
<scrollbox ref={props.scroll} stickyScroll={true} stickyStart="bottom" height={3} width={72}>
|
|
|
@@ -276,6 +302,16 @@ describe("TUI inline tool wrapping", () => {
|
|
|
expect(await renderFrame(() => <LoadedReadBeforeSubagentFixture />, { width: 72, height: 8 })).toMatchSnapshot()
|
|
|
})
|
|
|
|
|
|
+ test("separates a subagent from the previous assistant summary", async () => {
|
|
|
+ expect(
|
|
|
+ await renderFrame(() => <AssistantSummaryBeforeSubagentFixture />, { width: 72, height: 5 }),
|
|
|
+ ).toMatchSnapshot()
|
|
|
+ })
|
|
|
+
|
|
|
+ test("separates a subagent from the previous assistant error", async () => {
|
|
|
+ expect(await renderFrame(() => <AssistantErrorBeforeSubagentFixture />, { width: 72, height: 7 })).toMatchSnapshot()
|
|
|
+ })
|
|
|
+
|
|
|
test("updates sticky-bottom geometry when a text separator mounts and unmounts", async () => {
|
|
|
const [separated, setSeparated] = createSignal(false)
|
|
|
let scroll: ScrollBoxRenderable | undefined
|