fix(telegram): render progress draft rows as plain readable text#95007
Conversation
|
@clawsweeper review-pr |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed June 21, 2026, 8:20 PM ET / 00:20 UTC. Summary PR surface: Source -37, Tests +12, Other +11. Total -14 across 7 files. Reproducibility: yes. at source level: current main has tests and implementation for bounded short previews and progress-mode placeholders, while the latest PR diff removes those paths and tests. I did not execute tests because this review is read-only. Review metrics: 1 noteworthy metric.
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:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the readable Telegram progress-row and API display changes, but restore current-main draft lifecycle behavior from the merged adjacent work before merge. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main has tests and implementation for bounded short previews and progress-mode placeholders, while the latest PR diff removes those paths and tests. I did not execute tests because this review is read-only. Is this the best way to solve the issue? No. The readable-row rendering and API display direction are good, but the latest branch is no longer the best fix because it reverts adjacent current-main Telegram draft lifecycle fixes. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4cb94cc2cf2d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -37, Tests +12, Other +11. Total -14 across 7 files. View PR surface stats
Acceptance criteria:
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
|
|
@clawsweeper review-pr |
|
@openclaw-mantis telegram desktop proof: verify progress draft rows show plain readable text without visible HTML/code wrappers. |
c99eeed to
d1cbfec
Compare
|
@clawsweeper review-pr
Maintainer follow-up needed: either capture/add a redacted Telegram Desktop/Bot API proof artifact, or explicitly accept the local payload proof for this formatting-only renderer change. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Added native Telegram Bot API proof to the PR body. Proof summary:
@clawsweeper review-pr |
|
Updated per review:
Current-head evidence is in the PR body. Highlights for
@clawsweeper review-pr |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Landed via squash onto main.
Thanks @snowzlmbot! |
Summary
Fixes #95002.
Telegram progress draft previews now keep their canonical preview text readable while preserving Telegram's native HTML transport for non-rich progress drafts.
What Problem This Solves
The Telegram progress draft renderer used HTML/code-oriented progress rows as the primary draft representation. That made command/tool progress noisy when fallback or sanitized paths surfaced transport markup, and it left the
apiprogress edge to generic fallback rendering.A review also caught that the previous revision solved readability by adding a new
plainTextTransportpath. This revision removes that path and keeps the existing Telegram HTML draft transport instead.Changes
richMessage.htmlare sent withparse_mode: "HTML", withTelegramDraftPreview.textretained as the plain fallback if Telegram rejects the HTML parse.<br>line breaks to real newlines at the non-richparse_mode: "HTML"transport boundary, because Telegram parse-mode HTML accepts newlines but rejects<br>tags.plainTextTransportpath and its test expectations.itemKind: "api"to the API tool display and add a first-classAPIdisplay config.apiprogress shapes.Current-head behavior
At head
24c8774c98d54d01f884adbded289b9a4c97bff5:extensions/telegram/src/bot-message-dispatch.tsreturnsTelegramDraftPreview.textas readable plain text and attaches escapedrichMessage.htmlfor Telegram transport.extensions/telegram/src/draft-stream.tssends attached HTML previews throughparse_mode: "HTML", converts rich<br>breaks to parse-mode-safe newlines, and keeps plain text as fallback only when Telegram rejects the HTML parse.src/channels/streaming.tsmapsitemKind: "api"toapi, andsrc/agents/tool-display-config.ts/ the OpenClawKit resource snapshot include the API display entry.Evidence
Current-head external Linux VM validation on
24c8774c98d54d01f884adbded289b9a4c97bff5:sendMessageusedparse_mode: "HTML"with<b>/<code>tags and real newline separators.editMessageTextusedparse_mode: "HTML"on the same message id.Shelling,API, andExecwith no visible HTML tags.richRawTransportNotUsed: truefor the non-rich path.extensions/telegram/src/bot-message-dispatch.test.tsextensions/telegram/src/draft-stream.test.tsextensions/telegram/src/lane-delivery.test.tssrc/channels/streaming.test.tssrc/agents/tool-display.test.tsnode --import tsx scripts/tool-display.ts --check: passed.git diff --check: passed locally as a static whitespace check before push.GitHub Actions:
check-test-types: passed.check-guards: passed.src/agents/tool-display.test.ts: passed insidechecks-node-core-fast.src/channels/streaming.test.ts: passed insidechecks-node-core-fast.test/scripts/telegram-bot-api.test.ts: passed insidechecks-node-core-tooling.docs/gateway/doctor.md,test/scripts/resolve-openclaw-ref.test.ts,src/scripts/test-projects.test.ts,test/scripts/bench-gateway-restart.test.ts, andsrc/agents/cli-runner.spawn.test.ts/ Claude live-session capacity. None of these mention the Telegram progress draft files,tool-displaysnapshot,telegramHtmlPreview, orplainTextTransport.Previous broad CI failures on
0df89a764914e0786060ae775c68687d4d29f28ashowed the same unrelated pattern (resolve-openclaw-ref, test-projects/bench-gateway-restart, and MCP/Claude runner flakes). The current head supersedes that run with the parse-mode-safe HTML transport fix.Risk
Low-to-moderate Telegram presentation risk:
Not addressed
This PR does not change Telegram draft materialization policy, including first-preview debounce/minimum length or progress-mode answer-lane suppression. That behavior remains separate from the progress-row formatting fix.