TUI: hub wait cards disappear while their usage rows remain
Description
A completed hub wait whose watched jobs are all still running can disappear from the TUI, while the assistant turn's token/cost usage row remains. Repeated waits then look like empty assistant answers with usage, even though the tool returned a nonempty Still Running result and the workers are active.
This report is about transcript visibility/accounting association, not changing the default wait cadence.
Steps to Reproduce
- Start a background job/subagent that remains running longer than the initial wait window.
- Call
hubwith{"op":"wait"}and let the window expire before the job finishes. - Continue with another tool/message, or another
hub wait. - The previous waiting card is blanked when sealed or removed by the next hub call, but its turn's usage row remains. Transcript rebuild paths also apply the displacement behavior.
I also reproduced the renderer behavior without credentials or model inference on pristine upstream main at acf943d3c8dc1ed135b42aa33fef4d9d2ff61c9a:
- Construct a real
ToolExecutionComponent("hub", {op:"wait", ids:["job1"]}, ...)after in-memory Settings/theme initialization. - Feed it a result containing nonempty text and
details.jobswith one running job labelledwaiting-worker. - With
updateResult(result, true),render(100)includes the worker and waiting status. - Call
updateResult(result, false)followed byseal(); the same component's rendered output is now empty.
Expected Behavior
Retain a visible compact waiting snapshot, or coalesce the wait and its usage coherently. A consumed tool result should not leave unexplained usage-only turns. Token/cost accounting should remain visible and unchanged.
Error Output
pristine upstream main: acf943d3c8dc1ed135b42aa33fef4d9d2ff61c9a
live: contains "waiting on 1 job" and "waiting-worker"
historical: ""
toolResultHasText: truePlatform
Linux
omp version
18.2.1; reproduced from pristine upstream main at the SHA above
Bun version
1.4.2
Provider
Not provider-specific; the deterministic renderer reproduction uses no model/provider.
Area
TUI / Display
Additional context
Two related source paths explain the symptom:
jobsRenderResult, jobs.ts L586-L596: a non-partial poll filters out running jobs and returnsnew Text("", 0, 0)when no settled jobs remain.#resolveDisplaceablePoll, event-controller.ts L1112-L1120: a subsequent hub call removes the prior tool component, but not its turn's usage row.chat-transcript-builder.tsandui-helpers.tsmirror wait displacement during replay.
The event-driven/default-wait policy is already discussed in #6602, and configurable cadence in #12111. This issue deliberately does not duplicate either request. The current timeout field is documented for process waits; I am not reporting job waits ignoring that process-only field as a contract violation.
Source: can1357/oh-my-pi