The TUI should expose the session todo state as a live projection so long-running tasks are visible without requiring the user to scroll through transcript text. The current TUI renders the todo projection in the session panel directly below the input box so task state stays visible while the transcript scrolls.
- TUI does not read
SessionStorePortor call todo tools directly. - Runtime remains the source of truth. TUI only consumes
SessionEventupdates. - Todo state is updated from successful
tool_call_resultevents forTodoReadandTodoWritewhen the serialized result contains a valid{ todos: TodoItem[] }payload. - Invalid, truncated, or unrelated tool outputs are ignored and do not clear the last known todo projection.
Normal layout:
- Header.
- Transcript viewport.
- Input box.
- Session panel todo section.
- Status line.
The todo section is height bounded so the transcript always keeps at least one visible row on small terminals. During approval prompts, the approval panel keeps focus while the session panel below it keeps showing the last known todo projection.
- The title shows completed and total counts, for example
todo 1/3. - Each item is one line, preserving session todo order.
- Status markers are ASCII for cross-platform terminal safety:
[ ]pending[>]in progress[x]completed
- In-progress rows may be colored cyan and completed rows may be dimmed when color is enabled.
- Long todo text is truncated to the panel width; large lists show a final
... N morerow when space is exhausted.
- TUI unit test sends a
TodoWriteresult and asserts the todo panel appears in the session panel below the input area. - The test covers pending, in-progress, and completed markers.