Avoid rendering sub-agent activity twice in the TUI (#39049)

## Why

The app server sends sub-agent activity in both item-started and item-completed
notifications, causing the TUI to add the same activity to history twice.

## What changed

Render live sub-agent activity when the item completes instead of also rendering
it when the item starts. Preserve the existing replay behavior.

## Testing

Add a regression test that sends matching started and completed notifications
and verifies that the activity produces one history cell.

GitOrigin-RevId: 76a66f3657fe297f37067ed672ab9642997b4499
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-08-17 19:02:05 +00:00
1 parent 0c901fd141
commit 1a8bac9405
3 files changed
+40 -1

No files matched your search

@@ -0,0 +1,5 @@
---
source: tui/src/chatwidget/tests.rs
expression: rendered
---
• Interacted with `/root/researcher`