fix(tui): arm streaming watchdog on every delta, not only visible ones#69338
Conversation
When ingestDelta returns null (first empty/commentary delta or unchanged
content), the handler returned early, skipping setActivityStatus and
armStreamingWatchdog. If all subsequent deltas were also null (e.g.
due to phase filtering), the watchdog was never armed and the status bar
stayed stale as "idle" while a run was live.
Move setActivityStatus("streaming") and armStreamingWatchdog before
the null-displayText guard so they fire on every received delta event.
Fixes openclaw#34513, openclaw#40824
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR fixes a bug where the streaming watchdog and activity status were never set when all received deltas produced no visible output (e.g. commentary-only or tool-call deltas). The fix moves Confidence Score: 5/5Safe to merge — minimal, targeted fix with no regressions introduced. The change is a two-line reorder within a single conditional block. The watchdog guard (activeChatRunId === evt.runId) is preserved, render pressure is unchanged, and finalized-run filtering upstream prevents stale events from reaching this path. No files require special attention. Reviews (1): Last reviewed commit: "fix(tui): arm streaming watchdog on ever..." | Re-trigger Greptile |
|
LGTM 👍 merging |
* 'main' of https://github.com/openclaw/openclaw: fix(agents): enforce subagent envelope inheritance on ACP child sessions [AI-assisted] (openclaw#69383) fix(tui): arm streaming watchdog on every delta, not only visible ones (openclaw#69338) fix(codex): exclude codex-app-server synthetic apiKey from secrets audit (openclaw#69581)
#69338) When ingestDelta returns null (first empty/commentary delta or unchanged content), the handler returned early, skipping setActivityStatus and armStreamingWatchdog. If all subsequent deltas were also null (e.g. due to phase filtering), the watchdog was never armed and the status bar stayed stale as "idle" while a run was live. Move setActivityStatus("streaming") and armStreamingWatchdog before the null-displayText guard so they fire on every received delta event. Fixes #34513, #40824 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 89b6d02)
openclaw#69338) When ingestDelta returns null (first empty/commentary delta or unchanged content), the handler returned early, skipping setActivityStatus and armStreamingWatchdog. If all subsequent deltas were also null (e.g. due to phase filtering), the watchdog was never armed and the status bar stayed stale as "idle" while a run was live. Move setActivityStatus("streaming") and armStreamingWatchdog before the null-displayText guard so they fire on every received delta event. Fixes openclaw#34513, openclaw#40824 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
openclaw#69338) When ingestDelta returns null (first empty/commentary delta or unchanged content), the handler returned early, skipping setActivityStatus and armStreamingWatchdog. If all subsequent deltas were also null (e.g. due to phase filtering), the watchdog was never armed and the status bar stayed stale as "idle" while a run was live. Move setActivityStatus("streaming") and armStreamingWatchdog before the null-displayText guard so they fire on every received delta event. Fixes openclaw#34513, openclaw#40824 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
openclaw#69338) When ingestDelta returns null (first empty/commentary delta or unchanged content), the handler returned early, skipping setActivityStatus and armStreamingWatchdog. If all subsequent deltas were also null (e.g. due to phase filtering), the watchdog was never armed and the status bar stayed stale as "idle" while a run was live. Move setActivityStatus("streaming") and armStreamingWatchdog before the null-displayText guard so they fire on every received delta event. Fixes openclaw#34513, openclaw#40824 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
openclaw#69338) When ingestDelta returns null (first empty/commentary delta or unchanged content), the handler returned early, skipping setActivityStatus and armStreamingWatchdog. If all subsequent deltas were also null (e.g. due to phase filtering), the watchdog was never armed and the status bar stayed stale as "idle" while a run was live. Move setActivityStatus("streaming") and armStreamingWatchdog before the null-displayText guard so they fire on every received delta event. Fixes openclaw#34513, openclaw#40824 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
ingestDeltareturnsnull(no visible change yet — first commentary-only delta, tool-call delta, or unchanged content), the handler returned early, skippingsetActivityStatus("streaming")andarmStreamingWatchdognull(common when phase filtering drops all content), the streaming watchdog was never armed and the status bar stayed stuck on"idle"while the run was activesetActivityStatusandarmStreamingWatchdogbefore the null check so both fire on every received delta, regardless of visible outputRoot cause
The
tui.requestRender()at the end ofhandleChatEventis intentionally still skipped on null deltas (no visual change), so render pressure is unchanged.Affected issues
Fixes #34513, #40824
Test plan
streamingimmediately when a run starts, even if first visible text arrives after a delaypnpm test src/tui/green🤖 Generated with Claude Code