Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesTelegram progress drafts, the messages updated while an agent works, regain tool-specific emoji through a shared core mapping that other channel plugins can optionally enable. Example: A Telegram user asks the agent to write and read note.txt with the tool log enabled.
Review scores
ProductKind: Preference · Worth it: Yes Merge readiness✅ Ready for maintainer review This PR remains useful and distinct from current main. The maintainer-directed revision resolves the earlier presentation decision, and the new live Telegram evidence resolves the previous proof gap; no actionable patch defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared progress compositor turns agent activity into structured progress rows. Telegram converts those rows into standard or rich previews and sends updates through its existing draft transport. flowchart TD
A[Agent tool activity] --> B[Shared progress compositor]
B --> C{Channel enables tool glyphs?}
D[Semantic tool icons] --> E[Core text glyph mapping]
E --> C
C --> F[Structured progress rows]
F --> G[Telegram standard or rich preview]
G --> H[Visible progress message]
Technical reviewBest possible solution: Keep the shared semantic-icon mapping and Telegram opt-in while preserving plain output for channels that omit the option. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: the earlier merged change intentionally made text rows plain. Source and the recorded live comparison establish the presentation difference this PR addresses. Is this the best way to solve the issue? Yes: one glyph mapping consumes existing semantic icons at the shared producer, and Telegram enables it through the existing compositor contract without coupling presentation to status reactions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 959197ba0923. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +62, Tests +50, Docs +3. Total +115 across 11 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (7 earlier review cycles)
Reviewed October 9, 2026, 7:37 PM ET / 23:37 UTC (Revision 8). |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e17f361283
ℹ️ 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".
| it.each([false, true])( | ||
| "keeps tool emojis through progress sends and edits (rich: %s)", | ||
| async (richMessages) => { | ||
| const api = createMockDraftApi(); |
There was a problem hiding this comment.
Validate the preview against live Telegram
This changes Telegram's visible streaming send/edit path, but the new regression uses createMockDraftApi() for both standard and rich modes, so it cannot establish that either payload renders correctly through the real Bot API/client. The scoped Telegram guide requires real Telegram proof for streaming behavior; add a bot-to-bot or Test Server send-and-edit probe before treating this change as validated.
AGENTS.md reference: extensions/telegram/AGENTS.md:L134-L139
Useful? React with 👍 / 👎.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Live Telegram client proof: before / afterPosting the existing inspected screenshots together in a new comment so the comparison is directly visible in the review timeline. Reviewed PR head: Before — previous running buildUser-provided live Telegram-client capture. Bash, Session Status, and Browser rows have no leading tool emojis; the authored commentary emoji remains. A private path fragment was redacted before public upload. This is reported before-state evidence, not an exact-head Test Server run. After — reviewed PR build, standard modeUser-provided live Telegram mobile-client capture made during a real multi-tool turn after an explicitly authorized handoff to the already validated PR build, retaining the existing config, state, history, and chat. The running service, built revision, and clean worktree matched the reviewed head. Effective settings: Visible result: Shared icon path and re-review requestStandard and rich progress previews both consume the same The latest review already acknowledges the after image as meaningful client proof. Both images are now explicit together. They are real client captures, not Telegram Test Server captures, and no Test Server run or still-image proof of the send/edit lifecycle is claimed. QA access for the reviewer-requested Test Server lifecycle evidence remains unavailable; presentation-owner acceptance remains open. Existing isolated validation remains 104/104 focused tests, full build, and targeted lint passed; no code or runtime changes were made for this comment. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
Core owns one text-glyph table keyed by the semantic tool icon from openclaw#165095 and fills ChannelProgressDraftLine.icon where draft lines are built, only for channels that pass toolIcons to the progress compositor. Telegram opts in; Slack and other channels keep plain rows. Replaces the Telegram-local status-reaction table lookup.
|
Taking this over as a maintainer edit (thanks @keshavbotagent, your commit stays on the branch). Per maintainer direction, the fix now lives in core instead of the Telegram plugin: core owns one text-glyph table keyed by the semantic tool icon from #165095, with a coverage test like the native tables. The draft-line builder fills |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
) ## What Problem This Solves Discord progress drafts show tool-log rows without a per-tool glyph (`• Exec: running`), while Telegram shows `🛠️ Exec: running` since #167392. Discord already marks the 🧠 reasoning and 💬 commentary lanes, so its tool rows were the only unmarked lane. ## User Impact Discord tool-log rows in progress drafts now start with the tool's text glyph (`🛠️ Exec`, `📖 Read`, `🩹 Apply Patch`). The 🧠 / 💬 lanes, plan rows, approval rows, and plain status rows are unchanged. No config changes. Slack and other channels keep plain rows. ## Why This Change Was Made #167392 added the core opt-in (`toolIcons?: boolean` on `createChannelProgressDraftCompositor`, glyph table in `src/channels/progress-tool-glyphs.ts`) and left Discord as a follow-up. This PR sets `toolIcons: true` on every Discord compositor so all Discord paths render the same: - live draft preview (`message-handler.draft-preview.ts`) - retained progress continuation after handoff (`message-handler.progress-continuation.ts`) - retained-card `edit` action rendering a progress snapshot (`runtime.messaging.messages.ts`) No Discord-specific glyph code. Rows that already carry an explicit `icon` keep it. ## Tests - `message-handler.draft-preview.rest.test.ts`: new regression through the real draft preview and Discord REST client: `🧠 _Planning the check_` / `💬 Looking at the workspace` / `🛠️ Exec: running` / `📖 Read: running`. Fails on main with `• Exec: running` / `• Read: running`. - `message-bodies.test.ts`: a retained row's explicit icon (`🧪 Read`) wins over the tool glyph. - `message-handler.process.draft-final.test.ts`: existing expectations updated to the glyph rows. ## Bounded cost - One static `Record` lookup per core-built tool row on Discord (core opt-in from #167392). - No new config keys, protocol fields, network calls, or extra Discord sends/edits; the draft text gains one glyph and a space per tool row, inside the existing per-message length bounds. - Production: +3 lines. Tests: +65/−5. Docs: +3/−3. No extra Discord sends or edits in the runs above beyond the existing progress-draft cadence. ## Evidence Isolated gateway (`HOME`/`OPENCLAW_STATE_DIR`/`OPENCLAW_CONFIG_PATH` under `/tmp`) with the real bundled Discord plugin against QA Lab's Crabline Discord provider server, `streaming.mode: "progress"`, `progress.toolProgress: true`. Rows below are the Discord REST bodies the plugin sent, from the Crabline provider recorder (`artifacts/crabline/discord-provider-server.jsonl`). **Live model `openai/gpt-6-astra`** (`qa suite --provider-mode live-frontier --model openai/gpt-6-astra --channel-driver crabline --channel discord`), prompt asked for one exec then one read: ``` POST "Working\n\n🛠️ Exec: running\n🛠️ Exec: running" PATCH "Working\n\n🛠️ Exec: running\n🛠️ Exec" PATCH "…\n\n🛠️ Exec\n🛠️ Exec\n🛠️ Exec: running" PATCH "…\n\n🛠️ Exec\n🛠️ Exec\n🛠️ Exec\n📖 Read from glyph-proof.txt" POST final reply (separate message) ``` **Scripted model (`mock-openai`)**, commentary + one exec: ``` POST "Working\n\n💬 SLACK-QA-COMMENTARY-200C8C6D" PATCH "Working\n\n💬 SLACK-QA-COMMENTARY-200C8C6D\n🛠️ Exec: running" PATCH "Working\n\n💬 SLACK-QA-COMMENTARY-200C8C6D\n🛠️ Exec" POST "SLACK-QA-COMMENTARY-DONE-200C8C6D" ``` The 💬 commentary lane keeps its prefix, and the final reply is one separate message, as before. Before this change, the same rows render as `• Exec: running` / `• Read: running` (the new REST regression fails on main with exactly that diff).
|
Thanks @obviyus for considering putting the icons back |
…ows (openclaw#167392) ## What Problem This Solves Fixes: Telegram progress drafts lost the leading per-tool emoji on tool-log rows (`🛠️ Exec`, `📖 Read`) after openclaw#165095 moved tool display metadata to semantic icons. ## User Impact User impact: Telegram tool-log rows show a per-tool glyph again, in standard and rich-message previews. Slack and every other channel keep plain rows, and graphical clients are unchanged. No config changes. ## Why This Change Was Made openclaw#165095 (0b22a3e) replaced each tool's `emoji` with one semantic `icon` and moved status-reaction emoji to a reaction-only table. As a side effect, core stopped setting `ChannelProgressDraftLine.icon`, so Telegram's renderer no longer had a glyph to show. Removing the glyph was not the goal of openclaw#165095. Core now owns the text presentation of those icons, following the native-client pattern from openclaw#165095: - **One table.** `src/channels/progress-tool-glyphs.ts` maps each semantic tool icon to a text emoji. A coverage test fails if a configured icon has no glyph, like the Swift and Android tables. - **One producer.** `buildNamedProgressLine`, where draft lines are built, fills `line.icon` only when the caller passes `toolIcons`. Plan and approval rows stay plain, commentary/reasoning rows are unchanged, and lines a plugin builds with its own `icon` keep it. - **Per-channel opt-in.** Tool emoji look out of place on some channels, Slack especially, so the default is plain. A channel opts in with one optional SDK field, `toolIcons?: boolean`, on `createChannelProgressDraftCompositor` (next to the existing `reasoningLinePrefix`/`commentaryLinePrefix` lane markers) and on the `buildChannelProgressDraftLine` options. Telegram opts in; nothing else does. This PR began as a Telegram-only fix by @keshavbotagent that reused the status-reaction emoji table inside the Telegram plugin. Per maintainer direction it now uses a core owner. That reaction-table use is gone, and Keshav's commit and credit remain. Follow-up for a maintainer decision: Discord already passes the 🧠/💬 lane markers and could opt in with `toolIcons: true`. This PR leaves Discord unchanged. ## Bounded cost - When a channel opts in, each core-built tool row costs one static `Record` lookup. Channels that don't opt in skip it. - No new config keys, protocol fields, network calls, or extra Telegram sends or edits. In the live runs below, before and after each sent one progress message, six edits, and one final reply. - Production: +63/−1 lines (47 of them are the glyph table). Tests: +50. Docs: +5/−2. ## Evidence **Regression tests (each failed on clean `origin/main` and passes on this head):** - `src/channels/progress-draft-compositor.test.ts`, the `prefixes generated tool rows with text glyphs…` case. With `toolIcons` it renders `💬 _Checking_\n🛠️ Exec: running\n🧪 Read: running`. By default it renders `• Exec: running`. In both cases commentary is unchanged and an explicit plugin icon (`🧪`) wins. On main: `- 🛠️ Exec: running / + • Exec: running`. - `src/channels/progress-tool-glyphs.test.ts`: every icon in `TOOL_DISPLAY_CONFIG` (tools and fallback) has a glyph. - `extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts`: real Telegram dispatch over HTTP Bot API. The progress card keeps `🛠️ Exec` through the failure edit. On main: `expected '<b>Working</b>\n<b>Exec</b> <i>failed…' to contain '🛠️ Exec'`. - These suites also pass: the focused channel, streaming, and tool-display suites, plus the Telegram dispatch suites (preview, progress-card, final-delivery-lifecycle, reply-targets, draft-stream). **Telegram Test Server, live `gpt-6-astra` (real-user DM, `streaming.progress.toolProgress: true`).** Prompt: run `printf glyph-check > note.txt` with exec, read `note.txt`, then reply `OPENCLAW_E2E_OK`. Each run made 5 `gpt-6-astra` requests, all 200. | | Progress card, last edit | Final | | --- | --- | --- | | Before (`origin/main` 46635f6) | `Working ⏎ Skill Search write read local text file ⏎ … ⏎ Exec ⏎ Read lines 1-10 from note.txt ⏎ Exec` | `OPENCLAW_E2E_OK`; card deleted | | After (this PR, 126e5c3; later commits change tests only) | `Working ⏎ 🔎 Skill Search write and read a local text file shell printf ⏎ … ⏎ 🛠️ Exec ⏎ 📖 Read lines 1-10 from note.txt ⏎ 🛠️ Exec` | `OPENCLAW_E2E_OK`; card deleted | **Slack stays plain (isolated formatter check).** Core progress lines from the real compositor, built with Slack's flags (no `toolIcons`) and rendered through Slack's real `formatSlackProgressDraftLine`, `buildSlackProgressTextBlocks`, and `buildSlackProgressCardBlocks`: ``` Slack flags: draft "• Exec: running\n• Read: note.txt"; card "Exec — running\nRead — note.txt · running"; glyphs: none control toolIcons: draft "🛠️ Exec: running\n📖 Read: note.txt"; card unchanged (Slack cards ignore icon) ``` The existing Slack dispatch suite still asserts plain `Bash` / `Apply Patch` task titles. **CI:** Everything is green on c6a2d40 except one test, `extensions/whatsapp/src/send.delivery-recovery.test.ts` ("preserves long styles and quotes only the first chunk"), in `checks-node-changed-extensions-bundle`; `openclaw/ci-gate` fails only because of it. This PR doesn't touch WhatsApp, and the same test fails the same way on clean `origin/main` 46635f6 (`expected [ …(3) ] to deeply equal [ …(5) ]`).
…claw#168032) ## What Problem This Solves Discord progress drafts show tool-log rows without a per-tool glyph (`• Exec: running`), while Telegram shows `🛠️ Exec: running` since openclaw#167392. Discord already marks the 🧠 reasoning and 💬 commentary lanes, so its tool rows were the only unmarked lane. ## User Impact Discord tool-log rows in progress drafts now start with the tool's text glyph (`🛠️ Exec`, `📖 Read`, `🩹 Apply Patch`). The 🧠 / 💬 lanes, plan rows, approval rows, and plain status rows are unchanged. No config changes. Slack and other channels keep plain rows. ## Why This Change Was Made openclaw#167392 added the core opt-in (`toolIcons?: boolean` on `createChannelProgressDraftCompositor`, glyph table in `src/channels/progress-tool-glyphs.ts`) and left Discord as a follow-up. This PR sets `toolIcons: true` on every Discord compositor so all Discord paths render the same: - live draft preview (`message-handler.draft-preview.ts`) - retained progress continuation after handoff (`message-handler.progress-continuation.ts`) - retained-card `edit` action rendering a progress snapshot (`runtime.messaging.messages.ts`) No Discord-specific glyph code. Rows that already carry an explicit `icon` keep it. ## Tests - `message-handler.draft-preview.rest.test.ts`: new regression through the real draft preview and Discord REST client: `🧠 _Planning the check_` / `💬 Looking at the workspace` / `🛠️ Exec: running` / `📖 Read: running`. Fails on main with `• Exec: running` / `• Read: running`. - `message-bodies.test.ts`: a retained row's explicit icon (`🧪 Read`) wins over the tool glyph. - `message-handler.process.draft-final.test.ts`: existing expectations updated to the glyph rows. ## Bounded cost - One static `Record` lookup per core-built tool row on Discord (core opt-in from openclaw#167392). - No new config keys, protocol fields, network calls, or extra Discord sends/edits; the draft text gains one glyph and a space per tool row, inside the existing per-message length bounds. - Production: +3 lines. Tests: +65/−5. Docs: +3/−3. No extra Discord sends or edits in the runs above beyond the existing progress-draft cadence. ## Evidence Isolated gateway (`HOME`/`OPENCLAW_STATE_DIR`/`OPENCLAW_CONFIG_PATH` under `/tmp`) with the real bundled Discord plugin against QA Lab's Crabline Discord provider server, `streaming.mode: "progress"`, `progress.toolProgress: true`. Rows below are the Discord REST bodies the plugin sent, from the Crabline provider recorder (`artifacts/crabline/discord-provider-server.jsonl`). **Live model `openai/gpt-6-astra`** (`qa suite --provider-mode live-frontier --model openai/gpt-6-astra --channel-driver crabline --channel discord`), prompt asked for one exec then one read: ``` POST "Working\n\n🛠️ Exec: running\n🛠️ Exec: running" PATCH "Working\n\n🛠️ Exec: running\n🛠️ Exec" PATCH "…\n\n🛠️ Exec\n🛠️ Exec\n🛠️ Exec: running" PATCH "…\n\n🛠️ Exec\n🛠️ Exec\n🛠️ Exec\n📖 Read from glyph-proof.txt" POST final reply (separate message) ``` **Scripted model (`mock-openai`)**, commentary + one exec: ``` POST "Working\n\n💬 SLACK-QA-COMMENTARY-200C8C6D" PATCH "Working\n\n💬 SLACK-QA-COMMENTARY-200C8C6D\n🛠️ Exec: running" PATCH "Working\n\n💬 SLACK-QA-COMMENTARY-200C8C6D\n🛠️ Exec" POST "SLACK-QA-COMMENTARY-DONE-200C8C6D" ``` The 💬 commentary lane keeps its prefix, and the final reply is one separate message, as before. Before this change, the same rows render as `• Exec: running` / `• Read: running` (the new REST regression fails on main with exactly that diff).


What Problem This Solves
Fixes: Telegram progress drafts lost the leading per-tool emoji on tool-log rows (
🛠️ Exec,📖 Read) after #165095 moved tool display metadata to semantic icons.User Impact
User impact: Telegram tool-log rows show a per-tool glyph again, in standard and rich-message previews. Slack and every other channel keep plain rows, and graphical clients are unchanged. No config changes.
Why This Change Was Made
#165095 (42ebb9d) replaced each tool's
emojiwith one semanticiconand moved status-reaction emoji to a reaction-only table. As a side effect, core stopped settingChannelProgressDraftLine.icon, so Telegram's renderer no longer had a glyph to show. Removing the glyph was not the goal of #165095.Core now owns the text presentation of those icons, following the native-client pattern from #165095:
src/channels/progress-tool-glyphs.tsmaps each semantic tool icon to a text emoji. A coverage test fails if a configured icon has no glyph, like the Swift and Android tables.buildNamedProgressLine, where draft lines are built, fillsline.icononly when the caller passestoolIcons. Plan and approval rows stay plain, commentary/reasoning rows are unchanged, and lines a plugin builds with its owniconkeep it.toolIcons?: boolean, oncreateChannelProgressDraftCompositor(next to the existingreasoningLinePrefix/commentaryLinePrefixlane markers) and on thebuildChannelProgressDraftLineoptions. Telegram opts in; nothing else does.This PR began as a Telegram-only fix by @keshavbotagent that reused the status-reaction emoji table inside the Telegram plugin. Per maintainer direction it now uses a core owner. That reaction-table use is gone, and Keshav's commit and credit remain.
Follow-up for a maintainer decision: Discord already passes the 🧠/💬 lane markers and could opt in with
toolIcons: true. This PR leaves Discord unchanged.Bounded cost
Recordlookup. Channels that don't opt in skip it.Evidence
Regression tests (each failed on clean
origin/mainand passes on this head):src/channels/progress-draft-compositor.test.ts, theprefixes generated tool rows with text glyphs…case. WithtoolIconsit renders💬 _Checking_\n🛠️ Exec: running\n🧪 Read: running. By default it renders• Exec: running. In both cases commentary is unchanged and an explicit plugin icon (🧪) wins. On main:- 🛠️ Exec: running / + • Exec: running.src/channels/progress-tool-glyphs.test.ts: every icon inTOOL_DISPLAY_CONFIG(tools and fallback) has a glyph.extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts: real Telegram dispatch over HTTP Bot API. The progress card keeps🛠️ Execthrough the failure edit. On main:expected '<b>Working</b>\n<b>Exec</b> <i>failed…' to contain '🛠️ Exec'.Telegram Test Server, live
gpt-6-astra(real-user DM,streaming.progress.toolProgress: true). Prompt: runprintf glyph-check > note.txtwith exec, readnote.txt, then replyOPENCLAW_E2E_OK. Each run made 5gpt-6-astrarequests, all 200.origin/mainaa60a5f)Working ⏎ Skill Search write read local text file ⏎ … ⏎ Exec ⏎ Read lines 1-10 from note.txt ⏎ ExecOPENCLAW_E2E_OK; card deletedWorking ⏎ 🔎 Skill Search write and read a local text file shell printf ⏎ … ⏎ 🛠️ Exec ⏎ 📖 Read lines 1-10 from note.txt ⏎ 🛠️ ExecOPENCLAW_E2E_OK; card deletedSlack stays plain (isolated formatter check). Core progress lines from the real compositor, built with Slack's flags (no
toolIcons) and rendered through Slack's realformatSlackProgressDraftLine,buildSlackProgressTextBlocks, andbuildSlackProgressCardBlocks:The existing Slack dispatch suite still asserts plain
Bash/Apply Patchtask titles.CI: Everything is green on c6a2d40 except one test,
extensions/whatsapp/src/send.delivery-recovery.test.ts("preserves long styles and quotes only the first chunk"), inchecks-node-changed-extensions-bundle;openclaw/ci-gatefails only because of it. This PR doesn't touch WhatsApp, and the same test fails the same way on cleanorigin/mainaa60a5f (expected [ …(3) ] to deeply equal [ …(5) ]).