-
-
Notifications
You must be signed in to change notification settings - Fork 80.3k
fix(telegram): progress draft previews expose noisy HTML/code formattingย #95002
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: ๐ฆ diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: ๐ฆ diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
No fields configured for issues without a type.
Summary
Telegram progress draft previews currently format tool-progress rows as Telegram HTML/code spans, e.g.
<b>๐ ๏ธ Exec</b> <code>command false</code> <i>exit 2</i>. In practice this makes progress drafts hard to read in Telegram, and any fallback/sanitized view exposes implementation markup (<b>,<code>,<br>) instead of a natural progress line.The issue is visible in source-level tests today: Telegram progress draft expectations assert HTML/code formatting for tool rows rather than a plain readable draft.
Reproduction
From a local OpenClaw checkout:
node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-telegram.config.ts telegram/src/bot-message-dispatch.test.ts -t "Telegram progress"Relevant existing assertions in
extensions/telegram/src/bot-message-dispatch.test.tscurrently expect payloads like:The rendering path is:
src/channels/streaming.tsbuilds structuredChannelProgressDraftLineobjects.extensions/telegram/src/bot-message-dispatch.tspassesformatTelegramProgressLineinto the progress compositor.renderTelegramProgressDraftPreview()then maps lines throughrenderTelegramProgressLine().renderTelegramProgressLine()emits<b>...+<code>...+<i>...fragments and joins rows with<br>.Actual behavior
Telegram progress drafts use HTML/code-span style rows for ordinary progress lines:
When the payload is shown through a fallback/sanitized path, the user sees markup instead of readable status text. Even when Telegram parses the HTML successfully, command details are rendered as code spans, which is noisy for transient progress messages.
Expected behavior
Progress drafts should be readable as plain status text and should not depend on HTML/code wrappers for ordinary tool rows. For example:
and:
Rich rendering can still be layered on top when available, but the baseline Telegram draft should remain readable without exposing HTML tags or backtick/code styling.
Impact
<b>,<code>,<br>) instead of useful status.Suggested fix direction
TelegramDraftPreview.textas the canonical plain-readable progress draft.<code>tags.Verification target
A local patch should update
extensions/telegram/src/bot-message-dispatch.test.tsso the Telegram progress cases assert plain readable preview payloads, then pass:node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-telegram.config.ts telegram/src/bot-message-dispatch.test.ts -t "Telegram progress"