Skip to content

Commit 89b6d02

Browse files
CCcassiusdjsclaude
andauthored
fix(tui): arm streaming watchdog on every delta, not only visible ones (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>
1 parent 081da17 commit 89b6d02

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/tui/tui-event-handlers.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,18 @@ export function createEventHandlers(context: EventHandlerContext) {
298298
}
299299
}
300300
if (evt.state === "delta") {
301+
// Arm watchdog and mark streaming on every delta, even when the visible
302+
// text hasn't changed yet (e.g. first commentary-only or tool-call delta).
303+
// Without this, the watchdog never fires and the status bar stays stale.
304+
setActivityStatus("streaming");
305+
if (state.activeChatRunId === evt.runId) {
306+
armStreamingWatchdog(evt.runId);
307+
}
301308
const displayText = streamAssembler.ingestDelta(evt.runId, evt.message, state.showThinking);
302309
if (!displayText) {
303310
return;
304311
}
305312
chatLog.updateAssistant(displayText, evt.runId);
306-
setActivityStatus("streaming");
307-
if (state.activeChatRunId === evt.runId) {
308-
armStreamingWatchdog(evt.runId);
309-
}
310313
}
311314
if (evt.state === "final") {
312315
const isLocalBtwRun = isLocalBtwRunId?.(evt.runId) ?? false;

0 commit comments

Comments
 (0)