feat(tui): anchor todo panel above streaming output

This commit is contained in:
Brooklyn Nicholson 2026-04-26 16:26:50 -05:00
parent 2259eac49e
commit 69ff201050
3 changed files with 11 additions and 3 deletions

View file

@ -81,6 +81,9 @@ describe('createGatewayEventHandler', () => {
expect(finalText).toBeDefined()
expect(trail).toMatchObject({ kind: 'trail', role: 'system', todos, todoIncomplete: true })
// Todo archive must sit ABOVE the final assistant text so the panel
// doesn't visibly jump across the final answer at end-of-turn.
expect(appended.indexOf(trail!)).toBeLessThan(appended.indexOf(finalText!))
expect(getTurnState().todos).toEqual([])
})