Skip to content

Commit 0e6c3ce

Browse files
committed
Assert transcript rows by content, not frame-wide substring absence
Checking a rendered frame for the absence of "agent" anywhere breaks in any checkout whose directory name contains that substring (the footer prints the workspace path), including any path containing "subagent". Scope the assertion to the rows that actually carry a voice label instead.
1 parent f0dc610 commit 0e6c3ce

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/tui-opentui/shell.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,9 @@ describe("product skin: stream + queue + overlay", () => {
355355
expect(frame).toContain("hi there")
356356
expect(frame).toContain("bash")
357357
// One agent is answering, so no row spends columns naming it.
358-
expect(frame).not.toContain("agent")
359-
expect(frame).not.toContain(" tool ")
358+
const inkRows = frame.split("\n").filter((row) => row.trim().length > 0)
359+
expect(inkRows.filter((row) => row.includes("● agent"))).toHaveLength(0)
360+
expect(inkRows.filter((row) => row.includes(" tool "))).toHaveLength(0)
360361
// User row content is in the scroll buffer (pure paint covered in stream.test).
361362
expect(
362363
paintStreamRow(

‎src/tui-opentui/transcript-layout.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ describe("transcript turn layout", () => {
7373
expect(row).toBeDefined()
7474
const painted = row as string
7575
expect(painted.indexOf("listing")).toBe(resolveSideMargin(80))
76-
expect(frame).not.toContain("agent")
77-
expect(frame).not.toContain("you")
76+
expect(rowsContaining(frame, "● agent")).toHaveLength(0)
77+
expect(rowsContaining(frame, "● you")).toHaveLength(0)
7878
},
7979
)
8080
})

0 commit comments

Comments
 (0)