fix(telegram): preserve inline buttons for empty capabilities#96468
Conversation
e828c7b to
273bd54
Compare
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 11:38 AM ET / 15:38 UTC. Summary PR surface: Source +7, Tests +82. Total +89 across 5 files. Reproducibility: yes. from source: current main and v2026.6.10 route an empty Telegram legacy capabilities array to off, and the prompt/action callers use that result to omit or reject inline buttons. I did not run a live Telegram repro in this read-only review, but the PR body includes redacted after-fix live output. 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. Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge this narrow fix after maintainer acknowledgement that empty legacy arrays mean no explicit inline-button setting, while object-form inlineButtons: "off" remains the supported opt-out; close or retire the older same-root-cause candidate after one fix lands. Do we have a high-confidence way to reproduce the issue? Yes from source: current main and v2026.6.10 route an empty Telegram legacy capabilities array to off, and the prompt/action callers use that result to omit or reject inline buttons. I did not run a live Telegram repro in this read-only review, but the PR body includes redacted after-fix live output. Is this the best way to solve the issue? Yes. The resolver plus account-merge fallback is the narrowest maintainable layer because prompt capabilities, explicit sends, and callback handling all consume the same inline-button scope, and the PR preserves explicit opt-out behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa2379dbc883. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +7, Tests +82. Total +89 across 5 files. View PR surface stats
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
|
273bd54 to
cd07f67
Compare
cd07f67 to
5e55b5d
Compare
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIF evidence for legacy Telegram inline-button rendering.
Motion-trimmed clips: |
|
Merged via squash.
Thanks @zhangguiping-xydt! |
…aw#96468) Merged via squash. Prepared head SHA: 5e55b5d Co-authored-by: zhangguiping-xydt <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
…aw#96468) Merged via squash. Prepared head SHA: 5e55b5d Co-authored-by: zhangguiping-xydt <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc




What Problem This Solves
Fixes #96098.
Telegram configs with the legacy array shape
channels.telegram.capabilities: []were treated as an explicit inline-buttons opt-out. That made the Telegram agent prompt omitinlineButtons, so button choices could degrade into plain text even though the documented default scope isallowlist.Note: the
inlineQueries=falsecapability probe shown byopenclaw channels capabilities --channel telegramis Telegram Bot APIsupportsInlineQueries, not OpenClaw's message-toolinlineButtonscapability. The broken path here is the prompt capability resolver.Why This Change Was Made
The fix only changes the empty legacy array case to use the default inline-buttons scope. It intentionally preserves existing semantics for non-empty legacy arrays:
capabilities: ["inlineButtons"]still maps toall.inlineButtonsstill map tooff.capabilities: { inlineButtons: "off" }still explicitly disables buttons.This keeps the fix narrow and preserves explicit opt-out behavior.
User Impact
Users with existing Telegram config that contains an empty legacy capabilities array get the default
allowlistinline-button prompt capability again. Explicit Telegram inline-button opt-outs remain respected.Evidence
Before fix on main source repro:
After fix source/runtime repro:
Live Telegram/OpenClaw proof with
channels.telegram.capabilities: []and a real bot send; private chat identifiers redacted:Local checks after rebasing on
origin/main:Independent review:
Additional local sweep:
The failing test is outside this diff:
extensions/telegram/src/setup-surface.test.tsexpectsTelegram allowFrom (numeric sender id)but current output isTelegram allowFrom(数字发送者 ID).