Skip to content

Fix Telegram rich progress command output#93364

Merged
obviyus merged 2 commits into
mainfrom
codex/telegram-rich-progress-renderer
Jun 15, 2026
Merged

Fix Telegram rich progress command output#93364
obviyus merged 2 commits into
mainfrom
codex/telegram-rich-progress-renderer

Conversation

@obviyus

@obviyus obviyus commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Route Telegram command-output progress through the channel-aware progress renderer.
  • Preserve command-output status/detail while merging command start/output updates into one progress line.
  • Keep stdout/stderr out of progress drafts; commandText: "status" also hides command titles.

Verification

  • node scripts/run-vitest.mjs src/channels/progress-draft-compositor.test.ts src/channels/streaming.test.ts
  • node scripts/run-vitest.mjs extensions/telegram/src/bot-message-dispatch.test.ts
  • git diff --check

Review

  • Distill pass done before commit shaping.
  • Codex autoreview found privacy/status regressions during review; both were fixed with regression tests. Final rerun was blocked by Codex usage limit before producing a result.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: M maintainer Maintainer-authored PR labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 12:30 PM ET / 16:30 UTC.

Summary
The PR routes Telegram command-output progress through the entry-aware channel renderer, adjusts shared command-output progress formatting, and adds Telegram/shared channel regression tests.

PR surface: Source +35, Tests +135. Total +170 across 4 files.

Reproducibility: yes. source-level: current main routes Telegram command-output progress through the raw renderer while docs/config say commandText status should hide command text in progress previews. I did not run a live Telegram reproduction in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real Telegram proof showing raw and status-only command-output progress previews after the patch.
  • [P1] Decide whether sibling compact-progress channels should be handled as a separate follow-up or included before merge.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists local test commands and git diff check, but it does not include after-fix real Telegram proof such as a redacted recording, live output, or logs showing the changed draft preview behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A native Telegram Desktop proof would directly show whether the rich progress draft renders command status without leaking stdout/stderr or status-only command titles. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

telegram desktop proof: verify rich progress command output shows command status without stdout/stderr, and status-only mode hides command titles.

Risk before merge

  • [P1] Telegram streaming proof is still missing from the PR body/comments; local tests do not prove native Telegram draft edit and rich preview behavior.
  • [P1] The fix is Telegram-scoped even though docs describe the commandText policy as shared; Discord, Slack, and Microsoft Teams still have raw command-output call sites that may need a separate follow-up.

Maintainer options:

  1. Capture Telegram proof before merge (recommended)
    Run a real Telegram Desktop or bot-to-bot proof showing command status remains visible while stdout/stderr and status-only command titles stay hidden as configured.
  2. Accept synthetic-only proof
    Maintainers can intentionally merge with unit-test coverage only, but that owns the risk that native Telegram draft/rich preview behavior differs from the mocks.
  3. Pause for shared-channel scope
    If maintainers want the documented shared commandText policy fixed everywhere now, pause this PR and split or expand it with explicit sibling-channel coverage.

Next step before merge

  • [P1] Protected maintainer labeling plus the Telegram live-proof requirement need human handling; I found no narrow code defect for an automated repair PR.

Security
Cleared: The diff only changes Telegram/channel rendering code and tests; it adds no dependency, workflow, secret, install, or code-execution surface.

Review details

Best possible solution:

Land the Telegram fix only after maintainer review and redacted live Telegram proof, then track any shared-channel command-output consistency cleanup separately.

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

Yes, source-level: current main routes Telegram command-output progress through the raw renderer while docs/config say commandText status should hide command text in progress previews. I did not run a live Telegram reproduction in this read-only review.

Is this the best way to solve the issue?

Yes for the Telegram bug: using buildChannelProgressDraftLineForEntry matches the existing tool/item event path and keeps the fix inside the channel renderer boundary. The only unresolved shape question is whether sibling channels should be fixed in a separate shared cleanup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 53541b2141c6.

Label changes

Label changes:

  • add P2: This is a normal-priority Telegram progress-rendering bugfix with limited blast radius and no evidence of emergency data loss or runtime outage.
  • add merge-risk: 🚨 message-delivery: The PR changes visible Telegram draft-message rendering for command progress, and native Telegram behavior is not proven by the supplied synthetic tests.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists local test commands and git diff check, but it does not include after-fix real Telegram proof such as a redacted recording, live output, or logs showing the changed draft preview behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • add mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram progress draft output and is well suited to a short Telegram Desktop proof recording.

Label justifications:

  • P2: This is a normal-priority Telegram progress-rendering bugfix with limited blast radius and no evidence of emergency data loss or runtime outage.
  • merge-risk: 🚨 message-delivery: The PR changes visible Telegram draft-message rendering for command progress, and native Telegram behavior is not proven by the supplied synthetic tests.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists local test commands and git diff check, but it does not include after-fix real Telegram proof such as a redacted recording, live output, or logs showing the changed draft preview behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram progress draft output and is well suited to a short Telegram Desktop proof recording.
Evidence reviewed

PR surface:

Source +35, Tests +135. Total +170 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 50 15 +35
Tests 2 139 4 +135
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 189 19 +170

What I checked:

  • Repository policy applied: Root and scoped policies require full review beyond the diff, scoped extension/channel boundary checks, and sibling-surface awareness for shared channel changes. (AGENTS.md:28, 53541b2141c6)
  • Current Telegram gap: On current main, Telegram tool starts and item events use buildChannelProgressDraftLineForEntry, but command-output events still call buildChannelProgressDraftLine directly, so channel config such as commandText is not applied there. (extensions/telegram/src/bot-message-dispatch.ts:2436, 53541b2141c6)
  • Documented behavior: The public streaming docs say setting streaming.preview.commandText or streaming.progress.commandText to status keeps progress visible while hiding raw command/exec text across compact progress channels, including Telegram. Public docs: docs/concepts/streaming.md. (docs/concepts/streaming.md:213, 53541b2141c6)
  • PR diff shape: The PR changes Telegram command-output dispatch to use buildChannelProgressDraftLineForEntry and updates shared command-output line construction so status and command title can render separately in text/rich previews. (src/channels/streaming.ts:427, 0f916b236793)
  • Telegram proof requirement: The Telegram maintainer note says streaming-visible Telegram behavior needs real Telegram proof, preferably bot-to-bot QA or an equivalent live probe, over synthetic-only validation. (.agents/maintainer-notes/telegram.md:37, 53541b2141c6)
  • Sibling-surface check: Matrix already uses the entry-aware command-output path, while Discord and Slack still call the raw command-output renderer; this PR is a narrow Telegram fix, not a full shared-channel cleanup. (extensions/matrix/src/matrix/monitor/handler.ts:1996, 53541b2141c6)

Likely related people:

  • obviyus: Authored and merged the recent Telegram rich HTML rendering PR that touched the same Telegram dispatch/rich preview area now being adjusted. (role: recent Telegram rich-rendering contributor; confidence: high; commits: da92615816b6; files: extensions/telegram/src/bot-message-dispatch.ts)
  • vincentkoc: Git history attributes the shared streaming helper surface, docs, and Telegram config hints for commandText/progress behavior to this commit. (role: shared channel streaming introducer; confidence: medium; commits: efbefceb0e2e; files: src/channels/streaming.ts, docs/concepts/streaming.md, docs/channels/telegram.md)
  • bdjben: Authored the recent Matrix command-progress identity fix that changed shared progress-line merge keys and added Telegram-adjacent progress assertions. (role: recent command-progress contributor; confidence: high; commits: 3fc850fe8685; files: src/channels/streaming.ts, src/plugin-sdk/channel-streaming.test.ts, extensions/telegram/src/bot-message-dispatch.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus obviyus self-assigned this Jun 15, 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 15, 2026
@obviyus obviyus force-pushed the codex/telegram-rich-progress-renderer branch from 0f916b2 to dd010d2 Compare June 15, 2026 16:31
@obviyus obviyus merged commit fa9b8c8 into main Jun 15, 2026
26 checks passed
@obviyus obviyus deleted the codex/telegram-rich-progress-renderer branch June 15, 2026 16:32
@obviyus

obviyus commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Landed via rebase onto main.

  • Scoped tests: node scripts/run-vitest.mjs src/channels/progress-draft-compositor.test.ts src/channels/streaming.test.ts; node scripts/run-vitest.mjs extensions/telegram/src/bot-message-dispatch.test.ts; git diff --check
  • Changelog: not updated; focused Telegram progress-renderer bugfix, release-note context is in the PR body
  • Land commit: dd010d2
  • Merge commit: fa9b8c8

@rainman74

Copy link
Copy Markdown
image

So this is the improvement, then?

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 mantis: telegram-visible-proof Mantis should capture Telegram visible proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M 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.

2 participants