Show background command launches and late results in the TUI (#64015)

## Why

A background command can outlive the turn that launched it. Its result
could be dropped when no turn was active or appear as a separate
transcript entry if later output had already displaced its running row.

## What changed

- Show background commands as they start, including commands that don't
  match a recognized tool action. Keep tracking their exits after a
  turn ends or is interrupted.
- Update the original transcript row with the exit status and output,
  including when the command finishes in a parked side conversation.
- In rich terminal scrollback, label an unfinished launch `Started`.
  If the launch has already printed, append the result in order.
  Otherwise, replace the queued launch with the completed entry.

## Testing

Cover late exits after turn completion and interruption, completion
during a side conversation handoff, and result ordering behind queued
scrollback.

GitOrigin-RevId: 65f069af28c112078d85613da2c95e5c1c4f29bf
This commit is contained in:
Eric Traut
2026-11-25 22:54:56 +00:00
committed by copyberry
parent 2f83e4843f
commit ad07f04e47
34 changed files with 347 additions and 150 deletions
@@ -262,6 +262,7 @@ impl TurnDetails {
group.finish(rows, cells);
} else {
if let Some(exec) = any.downcast_ref::<crate::exec_cell::ExecCell>()
&& !exec.is_active()
&& exec.iter_calls().all(|call| {
call.output
.as_ref()