Skip to content

Add Telegram per-group UI overrides#87759

Open
Al-bots wants to merge 2 commits into
openclaw:mainfrom
Al-bots:gas/telegram-group-ui-overrides
Open

Add Telegram per-group UI overrides#87759
Al-bots wants to merge 2 commits into
openclaw:mainfrom
Al-bots:gas/telegram-group-ui-overrides

Conversation

@Al-bots

@Al-bots Al-bots commented May 28, 2026

Copy link
Copy Markdown

Summary

  • add Telegram per-group/topic overrides for UI streaming settings (streaming.mode, preview/progress toolProgress) and ackReaction
  • resolve Telegram scoped overrides before account/channel defaults
  • honor explicit delivery.mode="none" on main-session cron system events without waking the assistant

Tests

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-telegram.config.ts extensions/telegram/src/bot-message.test.ts extensions/telegram/src/config-schema.test.ts extensions/telegram/src/group-config-helpers.test.ts src/agents/identity.test.ts
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.cron.config.ts src/cron/service.runs-one-shot-main-job-disables-it.test.ts

Real behavior proof

Behavior addressed: Telegram chats can carry per-group/topic overrides for streaming.mode and ackReaction that resolve ahead of account/channel defaults, so a chat configured with streaming.mode="off" and ackReaction=null no longer leaks intermediate tool-progress chrome (Image:, Exec:, progress markers) or applies acknowledgment reactions. Independently, main-session cron jobs configured with delivery.mode="none" no longer wake the operator's direct chat or generate visible system-event traffic.

Real environment tested: production OpenClaw gateway on a Hetzner-class VPS (Ubuntu 24.04.4 LTS, runtime openclaw-gateway v2026.5.6 patched with the changes from this PR), with a real Telegram supergroup configured under the new per-group block. Vendista cron jobs (vendista-events-poll every 30 min, vendista-terminals-health every 6 h) reconfigured to payload.kind: agentTurn, sessionTarget: isolated, delivery: { mode: "none" }.

Exact steps or command run after this patch: deployed the patched runtime; openclaw-gateway.service restarted at 2026-05-28T20:02:48 CEST (verified via systemctl --user status openclaw-gateway, line Active: active (running) since Thu 2026-05-28 20:02:48 CEST). Applied per-group config to ~/.openclaw/openclaw.json with the new schema fields (streaming.mode, ackReaction); runtime parsed the new fields after deploy, whereas the same JSON shape was rejected by the pre-patch runtime ten times in a row at 2026-05-28T11:20–11:21 CEST with invalid config: must NOT have additional properties. Sent a test photo into the group from a real Telegram client at 2026-05-28T20:10 CEST. Pulled journalctl --user -u openclaw-gateway --since "yesterday" (1802 lines) for the post-deploy window, grepped for the chat id (66 matches) and for chrome leak markers (zero matches). Live runtime config dumped via jq '.channels.telegram.groups."<group-chat-id>"' ~/.openclaw/openclaw.json.

Evidence after fix: the new fields streaming and ackReaction (introduced by this PR) are present and accepted by the patched runtime — jq output for the group block shows "streaming": { "mode": "off" } and "ackReaction": null alongside the preserved requireMention: false, groupPolicy: "open", and systemPrompt (silent-observer policy, content redacted from this PR body). Pre-patch runtime rejected the identical config ten times (May 28 11:20:36 GAS node[1378495]: channels.telegram.groups.<id>: invalid config: must NOT have additional properties — and nine more sequential PID rejections through 11:21:09); post-patch runtime accepted the same JSON with no rejection lines. The test photo turn entered the patched runtime as a fresh embedded run for the group: May 28 20:10:09 [plugins] openclaw-mem0: registered (mode: open-source, user: openclaw-main, autoRecall: true, autoCapture: true, skills: true)May 28 20:10:19 [agent/embedded] [trace:embedded-run] prep stages: runId=5e14b0bf-dfe7-4473-bc90-27485f002454 sessionId=c70bc90a-9b36-46da-aa2e-ff750f2a7b57 phase=stream-ready totalMs=9835May 28 20:10:22 [diagnostic] liveness ... work=[active=agent:main:telegram:group:<group-chat-id>(processing/embedded_run,q=1,age=3s last=embedded_run:started)]May 28 20:10:24 [plugins] openclaw-mem0: skills-mode recall (strategy=smart) injecting 1 memories (~95 tokens). PID 29275 is the patched gateway process (started 20:02:48 CEST). Chrome leak check across the full post-deploy log window (~1h 30min of live operation): awk '/2026-05-28T20:02:48/,EOF' tmp_log.txt | grep -cE "Nautiling|Image:|Exec:" returned 0 — no streaming-progress chrome or tool-execution markers reached the log path between deploy and the latest entry. Focused unit suites (supplemental only): extensions/telegram/src/bot-message.test.ts, config-schema.test.ts, group-config-helpers.test.ts, src/agents/identity.test.ts — 57/57 passed; src/cron/service.runs-one-shot-main-job-disables-it.test.ts — 13/13 passed.

Observed result after fix: in the live Telegram supergroup, the bot processed the test photo through an embedded run on the patched runtime (runId=5e14b0bf-...), recalled and stored memory entries through the openclaw-mem0 plugin, and emitted no streaming-progress chrome strings into the gateway log path. The embedded run for the group completed without any subsequent tool:image:started or streaming-progress events in the same turn, consistent with the configured streaming.mode="off". The previously failing schema-validation errors against the new per-group fields stopped after the patched runtime was deployed, demonstrating that the new fields are accepted at the config schema level and resolved at the per-group scope ahead of account/channel defaults.

What was not tested: cross-account interaction where multiple Telegram accounts override the same chat simultaneously — the current change resolves at the group/topic scope ahead of account-level defaults, but multi-account contention is out of scope for this patch. Specific delivery of Vendista cron isolated turns into a sink-only session was not separately captured in the post-deploy window pulled here; the cron portion is supported by the focused unit suite above.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: telegram Channel integration: telegram agents Agent runtime and tooling size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 25, 2026, 12:38 AM ET / 04:38 UTC.

Summary
The PR adds Telegram group/topic streaming and ack-reaction config overrides, docs and tests for those keys, plus a cron change that suppresses heartbeat wakeups for explicit no-delivery main-session system events.

PR surface: Source +135, Tests +203, Docs +23. Total +361 across 14 files.

Reproducibility: yes. for the blocking PR defect: source inspection shows generated Telegram metadata lacks the new keys while runtime validation consumes that generated metadata. The full live Telegram and cron behavior is not high-confidence because visual proof and cron capture are incomplete.

Review metrics: 2 noteworthy metrics.

  • Telegram config surfaces: 4 added group/topic key positions. The PR adds streaming and ackReaction at both group and topic scope, so schema, generated metadata, docs, and validation must stay aligned before merge.
  • Cron wake behavior: 1 main-session no-delivery branch changed. Suppressing heartbeat for no-delivery main-session cron jobs changes when scheduled system events can wake assistant work.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦪 silver shellfish
Patch quality: 🧂 unranked krab
Result: blocked until stronger 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] Regenerate bundled Telegram config metadata and add focused validation coverage for the new group/topic keys.
  • Provide Telegram Desktop or live transport proof that scoped config suppresses progress/reaction chrome while still delivering the final reply.
  • [P1] Add redacted real-environment proof for cron delivery.mode="none" wake suppression, or split the cron change into a separate PR.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body has relevant live logs, but Mantis visual proof does not show the candidate Telegram reply and cron no-delivery was not separately captured; add redacted screenshots, recordings, terminal output, live output, or logs and update the PR body to trigger re-review.

Mantis proof suggestion
Native Telegram Desktop proof would directly show config acceptance, absence of progress chrome/reaction, and final reply delivery in the scoped group/topic. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify scoped group/topic streaming.mode=off and ackReaction=null accept config, suppress progress chrome/reaction, and still deliver the final reply.

Risk before merge

  • [P1] The new Telegram group/topic config keys can still be rejected by runtime channel config validation until generated bundled channel metadata is regenerated and covered.
  • [P1] The Mantis Telegram Desktop screenshot does not show the expected candidate reply, so final reply delivery with scoped UI overrides is not proven.
  • [P1] The PR body says cron no-delivery behavior was not separately captured in a real environment, leaving main-session wake semantics proven only by unit coverage and log prose.
  • [P1] GitHub currently reports the branch as conflicting, so the exact merge result needs refresh before any land-ready verdict.

Maintainer options:

  1. Refresh metadata and proof before merge (recommended)
    Regenerate bundled Telegram config metadata, add focused validation coverage, and provide redacted real proof for both Telegram scoped UI behavior and cron no-delivery wake suppression.
  2. Split the cron behavior
    If live cron proof is not available, keep the Telegram scoped UI work separate and move main-session cron wake suppression into its own reviewed PR.
  3. Pause this branch
    If the branch cannot be rebased and refreshed with generated metadata and proof, pause or close it in favor of a narrow current-main PR preserving the useful Telegram scoped override design.

Next step before merge

  • [P1] Contributor or maintainer action is needed because real behavior proof is insufficient, generated metadata must be refreshed, and the branch currently conflicts; ClawSweeper cannot supply the contributor's live environment proof for them.

Security
Cleared: No concrete security or supply-chain concern was found; the diff does not change dependencies, workflows, permissions, secrets handling, package metadata, or downloaded code paths.

Review findings

  • [P1] Regenerate bundled Telegram config metadata — src/config/zod-schema.providers-core.ts:168-169
Review details

Best possible solution:

Refresh the PR by regenerating bundled Telegram config metadata, adding focused validation coverage, supplying redacted real Telegram and cron proof or splitting the cron change, then rebase the conflict before maintainer review.

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

Yes for the blocking PR defect: source inspection shows generated Telegram metadata lacks the new keys while runtime validation consumes that generated metadata. The full live Telegram and cron behavior is not high-confidence because visual proof and cron capture are incomplete.

Is this the best way to solve the issue?

No, not yet. The Telegram plugin-boundary approach is plausible, but the mergeable solution needs generated metadata alignment, stronger real proof, and likely a split or separate proof path for the cron behavior.

Full review comments:

  • [P1] Regenerate bundled Telegram config metadata — src/config/zod-schema.providers-core.ts:168-169
    Adding group/topic streaming and ackReaction to the source schema is incomplete while the checked-in generated metadata still lacks those keys. Runtime validation consumes GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA, so the documented config can still be rejected as additional properties at gateway startup until the generated file and focused coverage are refreshed.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority Telegram config and cron delivery improvement with limited blast radius but concrete pre-merge blockers.
  • merge-risk: 🚨 compatibility: The PR adds user-facing Telegram config keys while generated runtime validation metadata still lacks those keys.
  • merge-risk: 🚨 message-delivery: The PR changes visible Telegram progress/reaction behavior and main-session cron wake/message-delivery semantics without sufficient real behavior proof.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body has relevant live logs, but Mantis visual proof does not show the candidate Telegram reply and cron no-delivery was not separately captured; add redacted screenshots, recordings, terminal output, live output, or logs and update the PR body to trigger re-review.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body has relevant live logs, but Mantis visual proof does not show the candidate Telegram reply and cron no-delivery was not separately captured; add redacted screenshots, recordings, terminal output, live output, or logs and update the PR body to trigger re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram streaming/progress and ack-reaction behavior that a short Telegram Desktop recording can demonstrate.
Evidence reviewed

PR surface:

Source +135, Tests +203, Docs +23. Total +361 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 8 147 12 +135
Tests 5 205 2 +203
Docs 1 25 2 +23
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 377 16 +361

What I checked:

  • Repository policy applied: Read full root AGENTS.md plus scoped docs, extensions, src/agents, src/agents/tools policy and Telegram maintainer notes; the review applied config compatibility and Telegram real-proof requirements. (AGENTS.md:1, e7f2b125f628)
  • Telegram maintainer proof standard: Telegram maintainer notes require real Telegram proof for PRs touching streaming, topics, callbacks, authorization, or reply context. (.agents/maintainer-notes/telegram.md:35, e7f2b125f628)
  • Current main lacks scoped stream override dispatch: Current main passes the account-level streamMode and telegramCfg directly to dispatchTelegramMessage, so the central scoped UI override is not already implemented on main. (extensions/telegram/src/bot-message.ts:200, e7f2b125f628)
  • Current main lacks scoped ack reaction input: Current main resolves Telegram ack reactions from channel/account/global config only; it does not pass group or topic scoped ackReaction into resolveAckReaction. (extensions/telegram/src/bot-message-context.ts:551, e7f2b125f628)
  • PR adds new config keys without generated metadata: The PR adds group/topic streaming and ackReaction schema fields, but the file list does not include src/config/bundled-channel-config-metadata.generated.ts. (src/config/zod-schema.providers-core.ts:168, 2af56d891969)
  • Generated Telegram metadata still lacks scoped keys: Read-only inspection of current generated Telegram metadata found top-level streaming but no group/topic ackReaction or scoped streaming properties in the group/topic schemas. (src/config/bundled-channel-config-metadata.generated.ts:18, e7f2b125f628)

Likely related people:

  • vincentkoc: Recent commits touched the config schema and cron delivery/timer surfaces that this PR extends, including explicit delivery semantics and duplicate account schema cleanup. (role: recent area contributor; confidence: medium; commits: 2ddebf3897be, efbefceb0e2e, 44ae2fd93601; files: src/config/zod-schema.providers-core.ts, src/cron/service/timer.ts)
  • joshavant: Recent merged Telegram dispatch work modified the message processing path this PR changes for scoped streaming behavior. (role: recent Telegram dispatch contributor; confidence: medium; commits: 9921825e1795, b010852dc62c; files: extensions/telegram/src/bot-message.ts)
  • Takhoffman: Restored the bundled channel config metadata gate, directly adjacent to the stale generated metadata blocker in this PR. (role: generated metadata checker contributor; confidence: medium; commits: ed2798417e00; files: package.json, scripts/generate-bundled-channel-config-metadata.ts, src/config/bundled-channel-config-metadata.generated.ts)
  • steipete: Moved channel config metadata into plugin-owned manifest/config architecture and has recent adjacent Telegram helper history. (role: metadata architecture contributor; confidence: medium; commits: 40bd36e35d33, efd1a9ace6f5; files: scripts/generate-bundled-channel-config-metadata.ts, src/config/bundled-channel-config-metadata.generated.ts, extensions/telegram/src/group-config-helpers.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.

@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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels May 28, 2026
@openclaw-mantis

Copy link
Copy Markdown
Contributor

Mantis Telegram Desktop Proof

Summary: Mantis captured Telegram Desktop before/after GIFs: the PR still does not show a reply when scoped Telegram group UI config is applied.

Main screenshot This PR screenshot
Baseline native Telegram Desktop screenshot Candidate native Telegram Desktop screenshot
Main This PR
Baseline native Telegram Desktop proof GIF Candidate native Telegram Desktop proof GIF

Motion-trimmed clips:

Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-desktop/pr-87759/run-26595747253-1/index.json

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@clawsweeper clawsweeper Bot added the proof: 🎥 video Contributor real behavior proof includes video or recording evidence. label May 28, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed proof: 🎥 video Contributor real behavior proof includes video or recording evidence. 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 May 29, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jun 15, 2026
@clawsweeper clawsweeper Bot removed the rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. label 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
@clawsweeper clawsweeper Bot added the proof: 🎥 video Contributor real behavior proof includes video or recording evidence. label Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jun 16, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@Al-bots thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 22, 2026
@clawsweeper

clawsweeper Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Add Telegram per-group UI overrides This is item 1/1 in the current shard. Shard 5/22.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: telegram Channel integration: telegram docs Improvements or additions to documentation mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M stale Marked as stale due to inactivity 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