Skip to content

Show Telegram progress placeholder when progress-mode answer drafts are suppressed#95344

Closed
gbarros-dev wants to merge 1 commit into
openclaw:mainfrom
gbarros-dev:fix/telegram-progress-placeholder
Closed

Show Telegram progress placeholder when progress-mode answer drafts are suppressed#95344
gbarros-dev wants to merge 1 commit into
openclaw:mainfrom
gbarros-dev:fix/telegram-progress-placeholder

Conversation

@gbarros-dev

@gbarros-dev gbarros-dev commented Jun 20, 2026

Copy link
Copy Markdown

What Problem This Solves

Telegram progress-mode streaming can receive answer partials but show no visible draft, because progress mode intentionally suppresses answer-lane partial text when there are no tool/progress rows to render. This makes Telegram appear stuck even though upstream draft state exists.

This PR starts the existing Telegram progress placeholder when progress-mode answer partials are suppressed, while keeping the partial answer text itself suppressed until final delivery.

Addresses one concrete silent-preview path from #95004. The broader issue also discusses non-progress short first previews; this PR intentionally keeps that debounce behavior unchanged.

Summary

  • start the existing Telegram progress draft placeholder when progress mode suppresses answer-lane partial text
  • keep the answer partial itself suppressed in progress mode, preserving the existing final-delivery behavior
  • add a regression test for the no-visible-draft case

Evidence

  • Added a regression test proving a progress-mode answer partial renders the configured progress placeholder and does not stream the suppressed answer text.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-telegram.config.ts
    • 123 files passed, 2163 tests passed
  • pnpm test:changed
    • Telegram shard passed, 130 tests passed
  • pnpm exec oxfmt --check --threads=1 extensions/telegram/src/bot-message-dispatch.ts extensions/telegram/src/bot-message-dispatch.test.ts
    • passed
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/telegram/src/bot-message-dispatch.ts extensions/telegram/src/bot-message-dispatch.test.ts
    • passed
  • git diff --check
    • passed

Note: pnpm check:changed was not used as final evidence because the local crabbox binary fails its basic --version/--help sanity check before running repo checks.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jun 20, 2026
@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: this PR is a focused, plausible subset of the Telegram progress-placeholder work, but #95183 already owns the same progress-mode answer-activity path, also covers the broader linked Telegram preview issue, and has positive real Telegram proof while this branch only supplies tests.

Canonical path: Follow #95183 as the canonical landing path for the Telegram preview-materialization issue, and close this narrower branch to avoid parallel fixes drifting.

So I’m closing this here and keeping the remaining discussion on #95183.

Review details

Best possible solution:

Follow #95183 as the canonical landing path for the Telegram preview-materialization issue, and close this narrower branch to avoid parallel fixes drifting.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main returns before updating the answer draft for progress-mode answer partials, and the linked issue documents that as a silent-preview path.

Is this the best way to solve the issue?

No as the best landing path. The patch is plausible, but #95183 is the better canonical fix because it covers the same path plus delayed/final cancellation and has real Telegram proof.

Security review:

Security review cleared: The diff only changes Telegram dispatcher control flow and a test; it does not alter dependencies, workflows, credentials, package metadata, or code-execution surfaces.

AGENTS.md: found and applied where relevant.

What I checked:

  • Current main source repro: Current main still returns before updating the answer draft when an answer-lane partial arrives in Telegram progress mode, matching the silent-preview path this PR targets. (extensions/telegram/src/bot-message-dispatch.ts:1378, 7546231762ff)
  • This PR scope: The PR changes that return path to await progressDraft.start() and adds one dispatcher regression test for the placeholder without streaming the suppressed answer text. (extensions/telegram/src/bot-message-dispatch.ts:1378, ea471ba3724e)
  • Canonical superseding PR: The open canonical PR fixes the same progress-mode placeholder path with progressDraft.noteActivity(), adds final-start/final-delivered cancellation guards, covers the broader Telegram preview issue, and carries proof:sufficient plus native Telegram Bot API lifecycle proof. (src/channels/progress-draft-compositor.ts:216, 3a9a60e871e6)
  • Related issue context: The linked open issue tracks both short first-preview suppression and progress-mode answer-activity suppression; this PR addresses only one of those paths, while the canonical PR uses closing syntax for the issue.
  • Telegram proof policy: The Telegram maintainer note requires real Telegram proof for streaming behavior changes; this branch lacks branch-specific real Telegram proof while the canonical PR includes it. (.agents/maintainer-notes/telegram.md:37, 7546231762ff)
  • Feature history: Current blame for the implicated progress-mode return and progress draft compositor wiring points to the current-main carrier commit; broader log history shows repeated Telegram draft/preview ownership in the same files. (extensions/telegram/src/bot-message-dispatch.ts:1367, a1d278b174f0)

Likely related people:

  • vincentkoc: Current blame for the progress-mode suppression and progress compositor wiring points to the current-main carrier commit, and recent history shows adjacent Telegram streaming/config work in the same dispatcher surface. (role: recent current-main carrier and adjacent Telegram lifecycle contributor; confidence: high; commits: a1d278b174f0, 0fdf9e874b7e, 4954d025e21e; files: extensions/telegram/src/bot-message-dispatch.ts, src/channels/progress-draft-compositor.ts, extensions/telegram/src/bot-message-dispatch.test.ts)
  • obviyus: Git history shows multiple Telegram draft streaming and preview boundary fixes by Ayaan Zaidi in the same dispatcher and draft-stream area. (role: Telegram draft streaming feature-history contributor; confidence: high; commits: 575bd77196c3, 3d998828b930, 6edb512efaeb; files: extensions/telegram/src/bot-message-dispatch.ts, extensions/telegram/src/draft-stream.ts, extensions/telegram/src/bot-message-dispatch.test.ts)
  • steipete: Shortlog and file history show repeated plugin/Telegram boundary refactors and test harness changes around the dispatcher surface. (role: adjacent refactor and high-volume area contributor; confidence: medium; commits: 03a43fe23157, ab96520bbad5, 13541864e599; files: extensions/telegram/src/bot-message-dispatch.ts, extensions/telegram/src/bot-message-dispatch.test.ts, src/channels/progress-draft-compositor.ts)

Codex review notes: model internal, reasoning high; reviewed against 7546231762ff.

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jun 20, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. labels Jun 20, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jun 20, 2026
@gbarros-dev

Copy link
Copy Markdown
Author

Closing this as superseded by #95183, which covers the same Telegram progress-mode placeholder path plus the broader #95004 behavior and has the native Telegram proof needed for this message-delivery surface. Thanks for the automated review pointing to the canonical landing path.

@gbarros-dev
gbarros-dev deleted the fix/telegram-progress-placeholder branch June 20, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant