Skip to content

fix(telegram): show typing for accepted topic messages#99965

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
moeedahmed:fix/telegram-topic-typing-visibility
Jul 6, 2026
Merged

fix(telegram): show typing for accepted topic messages#99965
vincentkoc merged 1 commit into
openclaw:mainfrom
moeedahmed:fix/telegram-topic-typing-visibility

Conversation

@moeedahmed

@moeedahmed moeedahmed commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Related: #92287

What Problem This Solves

Accepted Telegram forum-topic messages can spend noticeable time in context and session construction before the existing typing cue runs. During that window, an addressed message looks dropped even though OpenClaw accepted it.

Why This Change Was Made

Telegram direct chats already send the first native typing cue after access and body validation but before expensive context construction. This extends that same timing to accepted non-room_event group/topic turns.

The cue still runs only after authorization, mention gating, body classification, and configured-binding readiness. Ambient room events and unaddressed require-mention messages remain quiet. The later fallback in bot-message.ts still covers any accepted path that did not send this early cue.

This is complementary to #92287, which covers queued follow-up and dispatch typing policy.

User Impact

Users in Telegram forum topics get prompt native typing feedback for messages OpenClaw has accepted. Dropped, ambient, and unaddressed group traffic does not produce a false acceptance signal.

Evidence

  • Prepared head: 76dfef13052c72f8672f2cf737a0f7d53a895a6e.
  • The unrelated skip-log metadata from the submitted branch was removed; Moeed Ahmed remains the commit author.
  • node scripts/run-vitest.mjs extensions/telegram/src/bot-message-context.typing.test.ts extensions/telegram/src/bot-message-context.require-mention.test.ts extensions/telegram/src/bot-message.test.ts - 3 files, 33 tests passed after rebasing onto current main.
  • Fresh branch AutoReview reported no findings and rated the patch correct with 0.86 confidence.
  • Exact-head CI run 28761749596 completed successfully.
  • Native Telegram Desktop run 28707408543 proved forum-topic typing delivery on the prior candidate. The exact-order follow-up moves that same cue before context construction and is covered by the invocation-order test.
  • Exact-head proof attempt 28759453474 did not produce a behavioral verdict: its manifest skipped both baseline and candidate because the recorded previews lost the proof chat framing. No product assertion failed.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: S labels Jul 4, 2026
@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed July 5, 2026, 7:46 PM ET / 23:46 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source 0, Tests +83. Total +83 across 2 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Not assessed.
Failure reason: timeout.

This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict.
Keep any merge decision on the normal maintainer review path until ClawSweeper can complete a fresh review.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

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

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

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

Label changes

Label changes:

  • remove mantis: telegram-visible-proof: Current Telegram visible-proof status is not_needed.
  • remove P2: Current review triage priority is none.
  • remove rating: 🧂 unranked krab: Current review failed before PR readiness was assessed, so no rating label should remain.
  • remove status: 📣 needs proof: Current PR status no longer selects a status label.
  • remove proof: 🎥 video: Current real behavior proof evidence kind is not_applicable.
Evidence reviewed

PR surface:

Source 0, Tests +83. Total +83 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 4 0
Tests 1 83 0 +83
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 87 4 +83

What I checked:

  • failure reason: timeout.
  • codex failure detail: Codex review failed for this PR: Codex process timed out after 1199999ms.
  • codex stderr: No stderr captured.
  • codex stdout: {"type":"thread.started","thread_id":"019f349a-c59a-76c2-845b-9ac04cbedf0c"}.
  • process error code: ETIMEDOUT.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
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.
Review history (4 earlier review cycles)
  • reviewed 2026-07-04T13:15:03.683Z sha de6dc8c :: needs real behavior proof before merge. :: [P2] Move the topic cue before context setup
  • reviewed 2026-07-04T13:21:26.060Z sha de6dc8c :: needs real behavior proof before merge. :: [P2] Move the topic cue before context setup
  • reviewed 2026-07-04T13:33:47.001Z sha e32cf93 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-04T13:40:18.448Z sha e32cf93 :: needs real behavior proof before merge. :: none

@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. labels Jul 4, 2026
@clawsweeper
clawsweeper Bot temporarily deployed to qa-live-shared July 4, 2026 13:18 Inactive
@moeedahmed
moeedahmed force-pushed the fix/telegram-topic-typing-visibility branch from de6dc8c to e32cf93 Compare July 4, 2026 13:29
@moeedahmed

Copy link
Copy Markdown
Contributor Author

@openclaw-mantis telegram desktop proof: verify an addressed forum-topic message shows typing immediately after acceptance while room_event and unaddressed require-mention messages stay quiet.

@moeedahmed

Copy link
Copy Markdown
Contributor Author

Addressed ClawSweeper P1 timing feedback in e32cf933c4: accepted group/forum-topic typing now fires after body acceptance and before buildTelegramInboundContextPayload; the ordering test now asserts the cue precedes context construction. Local verification after the change: targeted Telegram suites 44/44 passed; check:changed passed extension lanes. Native Telegram proof has been requested from Mantis above and the PR body will be updated with the artifact/output when it lands.

@openclaw-mantis

Copy link
Copy Markdown
Contributor

Mantis Telegram Desktop Proof

Summary: Mantis captured native Telegram Desktop before/after GIF evidence with Convex-leased Telegram credentials.

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-99965/run-28707408543-1/index.json

@clawsweeper clawsweeper Bot added the proof: 🎥 video Contributor real behavior proof includes video or recording evidence. label Jul 4, 2026
@moeedahmed

Copy link
Copy Markdown
Contributor Author

@openclaw-mantis telegram desktop proof: rerun current head e32cf93 and verify an addressed forum-topic message shows typing immediately after acceptance while room_event and unaddressed require-mention messages stay quiet.

@moeedahmed

Copy link
Copy Markdown
Contributor Author

Current-head proof follow-up: the rerun request above did not start the Telegram Desktop proof because the issue_comment workflow authorized moeedahmed as repo read permission only (run 28708128900), and this workflow requires write/maintain/admin or a maintainer label/dispatch trigger. The code/test side is already addressed in e32cf933c4; the remaining merge blocker is only fresh native Telegram proof for the current head, or a maintainer proof override. A maintainer can trigger it via workflow_dispatch for PR 99965 or by using the ClawSweeper/Mantis suggested current-head Telegram Desktop proof request.

@vincentkoc
vincentkoc force-pushed the fix/telegram-topic-typing-visibility branch from e32cf93 to fa89a1a Compare July 5, 2026 23:18
@vincentkoc vincentkoc self-assigned this Jul 5, 2026
@clawsweeper clawsweeper Bot 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 Jul 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui labels Jul 6, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: diffs size: XL and removed size: S labels Jul 6, 2026
@vincentkoc
vincentkoc force-pushed the fix/telegram-topic-typing-visibility branch from 50d62b9 to 76dfef1 Compare July 6, 2026 01:17
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: diffs size: XL labels Jul 6, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Land-ready review completed for exact head 76dfef13052c72f8672f2cf737a0f7d53a895a6e.

Proof:

  • node scripts/run-vitest.mjs extensions/telegram/src/bot-message-context.typing.test.ts extensions/telegram/src/bot-message-context.require-mention.test.ts extensions/telegram/src/bot-message.test.ts - 3 files, 33 tests passed.
  • Fresh branch AutoReview reported no findings with 0.86 confidence.
  • Exact-head CI run 28761749596 completed successfully.
  • Native Telegram Desktop run 28707408543 proved forum-topic typing delivery on the prior candidate.
  • Exact-head proof attempt 28759453474 was inconclusive because both baseline and candidate previews lost the proof chat framing; no product assertion failed. The final invocation-order regression test directly covers the cue moving before context construction.

The patch remains narrow: accepted non-room_event topic/group messages send typing after authorization and mention gates, while ambient and unaddressed require-mention traffic stays quiet.

@vincentkoc
vincentkoc merged commit 0e0f0b1 into openclaw:main Jul 6, 2026
114 of 118 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
Co-authored-by: Moeed Ahmed <5780040+moeedahmed@users.noreply.github.com>
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
Co-authored-by: Moeed Ahmed <5780040+moeedahmed@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram P2 Normal backlog priority with limited blast radius. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants