Repository navigation
fix(telegram): keep tool rows visible under progress preambles - #108394
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ba7346f36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
1ba7346 to
c652941
Compare
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
c652941 to
ea7242b
Compare
ea7242b to
443cf7c
Compare
|
Landed via squash onto
Thanks @keshavbotagent! |
* fix(telegram): keep tool rows below progress preambles * fix(telegram): preserve text tool progress under preambles * fix(telegram): preserve memory progress under preambles --------- Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(telegram): keep tool rows below progress preambles * fix(telegram): preserve text tool progress under preambles * fix(telegram): preserve memory progress under preambles --------- Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #106026
What Problem This Solves
Fixes an issue where Telegram users with
streaming.mode: progressand verbose output off would see only the model's preamble in the ephemeral progress draft while tools were running. The rolling tool rows were masked until the draft collapsed and the permanent final reply arrived.The first bad commit is
8d465d71b5f72450a1c71b21f6af6e7e99293759(#106026). It made a model preamble the status headline, but Telegram's status-headline renderer discarded the accumulated line metadata. The shared compositor also deduplicated only on the unchanged headline text, so later tool rows stopped producing draft updates.Why This Change Was Made
Telegram now opts into line-aware updates while a preamble is active and renders bounded structured work rows beneath that headline. Reasoning and commentary remain buffered behind the headline, the configured
maxLineslimit still owns the rolling window, and Discord/Mattermost retain their existing behavior because the new compositor capability is opt-in.Both Telegram HTML previews and rich-message previews use the same filtered work-row set.
User Impact
A progress-mode Telegram turn now keeps one ephemeral draft showing the preamble plus the newest configured tool rows (for example, the latest 8 of 10 calls). The existing lifecycle is unchanged: the progress window collapses and the permanent final reply is delivered normally.
Evidence
87b808bb57:codex-rs/app-server-protocol/src/protocol/event_mapping.rsmaps command starts toitem/started, whileprotocol/v2/item.rsrepresents them asCommandExecution; OpenClaw's Codex projector normalizes those intostream: "tool"start/result events. This confirms the producer contract was intact.createAgentRunEventHandler, the real buffered reply dispatcher, and Telegram progress rendering with verbose off. It asserts the preamble plus only rows 3-10, permanent final delivery, and a 10-tool collapse summary.Validation:
node scripts/run-vitest.mjs extensions/telegram/src/bot-message-dispatch.test.ts --reporter=dot— 212/212 passed.node scripts/run-vitest.mjs src/channels/progress-draft-compositor.test.ts --reporter=dot— 29/29 passed.pnpm check— preflight, all TypeScript projects, lint, formatting, and policy guards passed.pnpm tsgo:core && pnpm tsgo:extensions && pnpm tsgo:test:root— passed.check-changedremote delegation did not start because the installed Crabbox binary failed its own version/help sanity check; no code check failed, and GitHub CI remains the remote gate.Duplicate audit: no open issue or PR matches progress-mode preambles masking rolling tool rows. #93249 is related but different: it fixes in-flight answer preambles in partial streaming and explicitly excludes progress mode.