Repository navigation
feat(discord): show per-tool glyphs on progress draft tool rows - #168032
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 changesDiscord’s editable progress messages add tool-specific emoji to tool-log rows using the existing shared renderer. Example: A Discord request runs Exec and Read with tool progress enabled.
Review scores
ProductKind: Preference · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this is a useful, maintainer-directed presentation change that current main does not provide. No actionable correctness or security defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherOpenClaw turns agent activity into progress text through a shared renderer. Discord sends and edits that text in live drafts and retained messages while delegated work continues. flowchart TD
A[Agent activity] --> B[Shared progress renderer]
C[Discord progress settings] --> B
D[Shared tool glyph table] --> B
B --> E[Live draft]
B --> F[Retained progress message]
E --> G[Discord message transport]
F --> G
Technical reviewBest possible solution: Keep Discord’s presentation choice in its adapters and reuse the shared glyph producer. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug: plain Discord rows are the existing presentation choice. Current-main source and existing compositor tests establish the before-state. Is this the best way to solve the issue? Yes. Enabling the existing shared option at Discord’s three compositor call sites is the narrowest implementation and avoids duplicated glyph logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e39552c18106. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests +60, Docs 0. Total +63 across 8 files. Added test files: 0. View PR surface stats
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 (1 earlier review cycle)
Reviewed October 9, 2026, 8:15 PM ET / October 10, 2026, 00:15 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…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
Discord progress drafts show tool-log rows without a per-tool glyph (
• Exec: running), while Telegram shows🛠️ Exec: runningsince #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?: booleanoncreateChannelProgressDraftCompositor, glyph table insrc/channels/progress-tool-glyphs.ts) and left Discord as a follow-up. This PR setstoolIcons: trueon every Discord compositor so all Discord paths render the same:message-handler.draft-preview.ts)message-handler.progress-continuation.ts)editaction rendering a progress snapshot (runtime.messaging.messages.ts)No Discord-specific glyph code. Rows that already carry an explicit
iconkeep 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
Recordlookup per core-built tool row on Discord (core opt-in from fix(channels): Telegram progress drafts lost per-tool emoji on tool rows #167392).Evidence
Isolated gateway (
HOME/OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATHunder/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:Scripted model (
mock-openai), commentary + one exec: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).