Skip to content

fix(telegram): split streaming preview per assistant block#22613

Merged
obviyus merged 7 commits intomainfrom
fix/telegram-stream-message-rotation
Feb 21, 2026
Merged

fix(telegram): split streaming preview per assistant block#22613
obviyus merged 7 commits intomainfrom
fix/telegram-stream-message-rotation

Conversation

@obviyus
Copy link
Copy Markdown
Contributor

@obviyus obviyus commented Feb 21, 2026

Summary

  • fix Telegram draft streaming to rotate to a fresh preview message when a new assistant message starts after prior partial output
  • keep first-message start behavior unchanged (no forced rotation before any streamed content)
  • update Telegram dispatch tests for block and partial stream modes

Root Cause

onAssistantMessageStart reset lane text state but did not reset the underlying draft stream message id. Subsequent assistant blocks kept editing the same Telegram preview message.

Testing

  • pnpm test src/telegram/bot-message-dispatch.test.ts

Greptile Summary

Fixes Telegram draft streaming to create fresh preview messages when new assistant blocks start after prior output. Previously, onAssistantMessageStart reset lane text state but not the draft stream message ID, causing subsequent blocks to edit the same Telegram message instead of rotating to new ones.

Key changes:

  • Added conditional forceNewMessage() call when hasStreamedMessage is true before resetting lane state
  • Preserves first-message behavior (no rotation before any content streamed)
  • Updated tests to expect forceNewMessage calls for multi-block scenarios

Dockerfile note: The Dockerfile changes shown in the diff are already present in the base branch (commit 985ffac) and appear to be a rebase artifact from catching up with main.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix is targeted and follows the existing pattern used for reasoning lane splits. The logic correctly guards forceNewMessage() with the hasStreamedMessage flag to preserve first-message behavior. Tests comprehensively cover the new behavior including edge cases (first message, multi-block, both stream modes). The Dockerfile changes are already in the base branch, making them a non-issue.
  • No files require special attention

Last reviewed commit: 8da54b8

@openclaw-barnacle openclaw-barnacle bot added channel: telegram Channel integration: telegram docker Docker and sandbox tooling size: XS maintainer Maintainer-authored PR labels Feb 21, 2026
@obviyus obviyus force-pushed the fix/telegram-stream-message-rotation branch from 16001ab to 8da54b8 Compare February 21, 2026 11:40
@obviyus obviyus self-assigned this Feb 21, 2026
@obviyus obviyus force-pushed the fix/telegram-stream-message-rotation branch from 9410995 to 8c7821e Compare February 21, 2026 12:32
@obviyus obviyus force-pushed the fix/telegram-stream-message-rotation branch from 8c7821e to 26f35f4 Compare February 21, 2026 12:34
@obviyus obviyus merged commit 8b1fe0d into main Feb 21, 2026
13 of 14 checks passed
@obviyus obviyus deleted the fix/telegram-stream-message-rotation branch February 21, 2026 12:35
@obviyus
Copy link
Copy Markdown
Contributor Author

obviyus commented Feb 21, 2026

Merged via /merge-pr (recovered after local branch-delete error).

Thanks @obviyus!

mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
…22613)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 26f35f4
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
obviyus added a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
…22613)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 26f35f4
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
mreedr pushed a commit to mreedr/openclaw-custom that referenced this pull request Feb 24, 2026
…22613)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 26f35f4
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…22613)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 26f35f4
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant