mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 11:30:36 +00:00
fix(typing): call markDispatchIdle in followup runner to prevent stuck indicator (#26881)
The followup runner (used for queued messages, inter-agent sends, heartbeat followups, etc.) only called typing.markRunComplete() in its finally block. The typing controller requires BOTH markRunComplete AND markDispatchIdle to trigger cleanup — but markDispatchIdle was only wired through the buffered dispatcher path, which followup turns bypass entirely. This caused the typing indicator to persist indefinitely on channels like Telegram when the agent replied with NO_REPLY or produced empty payloads, because the keepalive loop was never stopped. Adds markDispatchIdle() alongside markRunComplete() in the followup runner's finally block, and four test cases covering NO_REPLY, empty payloads, agent errors, and successful delivery. Complements #26295 which addressed the channel-level callback layer. Fixes #26595 Co-authored-by: Samantha <samantha@Samanthas-Mac-mini.local>
This commit is contained in:
@@ -314,7 +314,15 @@ export function createFollowupRunner(params: {
|
||||
|
||||
await sendFollowupPayloads(finalPayloads, queued);
|
||||
} finally {
|
||||
// Both signals are required for the typing controller to clean up.
|
||||
// The main inbound dispatch path calls markDispatchIdle() from the
|
||||
// buffered dispatcher's finally block, but followup turns bypass the
|
||||
// dispatcher entirely — so we must fire both signals here. Without
|
||||
// this, NO_REPLY / empty-payload followups leave the typing indicator
|
||||
// stuck (the keepalive loop keeps sending "typing" to Telegram
|
||||
// indefinitely until the TTL expires).
|
||||
typing.markRunComplete();
|
||||
typing.markDispatchIdle();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user