fix(telegram): clear reasoning preview before forceNewMessage rotation (#80862)#97828
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 8:40 PM ET / July 11, 2026, 00:40 UTC. Summary PR surface: Source -4, Tests +31. Total +27 across 2 files. Reproducibility: yes. at source level. Current main marks a streamed reasoning preview for rotation and then discards its message id through Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the shared deferred-delete integration, then land it after redacted Telegram Desktop proof shows the replacement reasoning preview appearing before the prior preview is removed, with no stale bubble or visible jump. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main marks a streamed reasoning preview for rotation and then discards its message id through Is this the best way to solve the issue? Yes. Reusing the existing Telegram deferred-delete repositioning primitive is the narrowest maintainable fix and avoids creating a second cleanup lifecycle; only real-client behavior proof remains missing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f68af6484665. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -4, Tests +31. Total +27 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
7867253 to
bd1064d
Compare
bd1064d to
feb0dbc
Compare
a599f70 to
35eb189
Compare
35eb189 to
e60a700
Compare
|
Land-ready proof for
Mantis rejected its own comparison because the baseline crop showed only the final static state and the candidate crop included Telegram side panes. That is an inconclusive capture, not a candidate product failure. Residual risk is low-to-medium and confined to transient reasoning-preview timing: detached deletion is one-shot, and the deliberate defer window can briefly show both previews. Final answers, durable state, authentication, and unrelated messages are unaffected. The maintainer explicitly accepts the remaining visual-proof gap for landing. |
|
Merged via squash.
|
Co-authored-by: ly-wang19 <[email protected]>
What Problem This Solves
Fixes #80862.
With
/reasoning stream, a second reasoning burst rotated the Telegram draft withforceNewMessage(). That discarded the prior preview's message id before terminal cleanup, so the superseded preview could remain visible indefinitely.Why This Change Was Made
The current patch routes split reasoning through Telegram's existing
rotateToNewMessageDeferringDelete()lifecycle. The stream captures the old bot message id, advances to a new generation, lets the replacement preview land, and deletes the superseded preview on its detached cleanup schedule. A shared dispatcher helper now applies the same reposition-and-reset invariant to reasoning splits and answer/tool-progress rotation.This is preferable to clear-before-rotate: deleting first can make Telegram Desktop jump before the replacement appears, and dispatcher-owned deletion would duplicate the draft stream's in-flight-send and reply-target logic.
User Impact
Split reasoning previews no longer lose ownership of the prior Telegram message. Users should see the replacement preview and cleanup behavior instead of stale reasoning bubbles accumulating. Final answer delivery and durable messages are unchanged.
Evidence
e60a700a27d445efc9c89e71517eff53c3cf379a: https://github.com/openclaw/openclaw/actions/runs/29132593350