Skip to content

Improve progress draft labels and tool details#79146

Merged
steipete merged 4 commits intomainfrom
codex/discord-natural-progress-drafts
May 8, 2026
Merged

Improve progress draft labels and tool details#79146
steipete merged 4 commits intomainfrom
codex/discord-natural-progress-drafts

Conversation

@steipete
Copy link
Copy Markdown
Contributor

@steipete steipete commented May 8, 2026

Summary

  • make shared progress draft labels render as rolling lines so starter text scrolls away instead of staying sticky
  • render structured progress rows through the shared formatter as compact emoji + title + details; Discord, Slack, and Teams now use that path
  • show web-search query text for provider/native argument shapes like q, search_query, and batched query arrays instead of falling back to bare Web Search
  • skip empty Discord apply-patch starts until a patch summary exists and summarize bash commands with the shared exec explainer

Real behavior proof

  • Behavior addressed: Discord/Teams/Slack progress draft rows should keep rolling labels, preserve readable tool titles for structured rows, and show web-search query details instead of bare Web Search.
  • Real environment tested: local OpenClaw checkout on macOS, Node 22+/tsx runtime, PR head 70233f8037.
  • Exact steps or command run after this patch: node --import tsx -e 'import { buildChannelProgressDraftLine, formatChannelProgressDraftText } from "./src/plugin-sdk/channel-streaming.ts"; const lines = [buildChannelProgressDraftLine({event:"tool", name:"web_search", args:{search_query:[{q:"Codex OAuth API key"}], response_length:"short"}}), buildChannelProgressDraftLine({event:"tool", name:"bash", args:{command:"pnpm test"}})].filter(Boolean); console.log(formatChannelProgressDraftText({entry:{streaming:{progress:{label:"Shelling", maxLines:4}}}, lines}));'
  • Evidence after fix: console output from the real shared progress-draft formatter:
Shelling
🔎 Web Search: for "Codex OAuth API key"
🛠️ Bash: run tests
  • Observed result after fix: the draft text keeps the starter label as the first rolling line, renders the web-search row with the Web Search title plus query detail, and renders the bash row with the Bash title plus command summary.
  • What was not tested: live Discord/Slack/Teams network delivery; covered the shared formatter plus channel controller tests locally.

Verification

  • pnpm install
  • pnpm test src/plugin-sdk/channel-streaming.test.ts extensions/discord/src/monitor/message-handler.process.test.ts src/agents/tool-display.test.ts
  • pnpm test src/plugin-sdk/channel-streaming.test.ts extensions/discord/src/monitor/message-handler.process.test.ts extensions/slack/src/progress-blocks.test.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts extensions/msteams/src/reply-stream-controller.test.ts extensions/msteams/src/reply-dispatcher.test.ts src/agents/tool-display.test.ts
  • pnpm plugin-sdk:api:check
  • pnpm tsgo:extensions
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md docs/concepts/progress-drafts.md docs/channels/discord.md src/plugin-sdk/channel-streaming.ts src/plugin-sdk/channel-streaming.test.ts extensions/discord/src/monitor/message-handler.process.test.ts
  • pnpm build

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels May 8, 2026
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 8, 2026

Codex review: needs real behavior proof before merge.

Summary
The PR changes progress draft formatting across Discord, Slack, Teams, shared SDK streaming helpers, and tool-display details, with docs, changelog, tests, and SDK API baseline updates.

Reproducibility: not applicable. this is a PR for progress-draft UX/rendering changes rather than a standalone bug report. Source and diff inspection establish the before/after paths, but no live channel behavior was reproduced.

Real behavior proof
Needs real behavior proof before merge: Missing: the PR body and comments list tests/Crabbox only; add redacted screenshot, recording, terminal output, copied live output, linked artifact, or logs, then update the PR body for automatic re-review or ask for @clawsweeper re-review.

Next step before merge
Human maintainer handling is needed because the PR has the protected maintainer label, lacks real behavior proof, and is dirty/unmergeable; there is no safe automation-only repair lane.

Security
Cleared: Cleared: the diff touches channel rendering, docs, tests, changelog, and generated SDK baseline hashes, with no dependency, workflow, secret, or install-script changes.

Review findings

  • [P3] Align Discord examples with compact text output — docs/channels/discord.md:690
Review details

Best possible solution:

Rebase onto current main, align the docs/examples with the intended formatter output, then merge only after real behavior proof or a maintainer proof override.

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

Not applicable: this is a PR for progress-draft UX/rendering changes rather than a standalone bug report. Source and diff inspection establish the before/after paths, but no live channel behavior was reproduced.

Is this the best way to solve the issue?

Mostly yes: the generic structured-line approach keeps channel code sharing the SDK formatter and leaves rich Slack rendering channel-owned. The docs mismatch, missing proof, and dirty branch state should be resolved before merge.

Full review comments:

  • [P3] Align Discord examples with compact text output — docs/channels/discord.md:690
    The shared text formatter added by this PR renders structured lines as icon plus detail when detail exists, so Discord text drafts show forms like 🛠️ run tests or 🔎 for "query". This new doc line promises icon + title + detail examples instead; please either include labels in the text formatter or adjust the examples so the docs match the shipped output.
    Confidence: 0.82

Overall correctness: patch is correct
Overall confidence: 0.78

What I checked:

  • Live PR state: The GitHub pull API reports the PR open with the protected maintainer label, head dbee93be75f5f87243db393f457357a1b1563281, mergeable=false, rebaseable=false, and mergeable_state=dirty. (dbee93be75f5)
  • Real behavior proof missing: The PR body and only comment list build/test/Crabbox verification, but no after-fix screenshots, recordings, terminal output, copied live output, linked artifact, or logs; the latest Real behavior proof check-run for the PR head concluded failure. (dbee93be75f5)
  • Current main behavior: Current main still formats progress draft labels as a header outside the sliced progress lines, so the PR is not already implemented on main. (src/plugin-sdk/channel-streaming.ts:783, a1ac559ed7e6)
  • Current Discord path: Current main passes preformatted string progress lines into the Discord draft preview path; the PR changes that path to pass structured progress line objects. (extensions/discord/src/monitor/message-handler.process.ts:676, a1ac559ed7e6)
  • Review finding evidence: The final PR patch documents Discord text rows as emoji + title + detail, but the changed shared text formatter renders structured lines as icon plus detail when detail exists. Public docs: docs/channels/discord.md. (docs/channels/discord.md:690, dbee93be75f5)
  • Security scope: The PR file list is limited to rendering helpers, channel code, tests, docs, changelog, and generated SDK API hash metadata; it does not touch dependencies, workflows, secrets handling, install scripts, or release/publish paths. (dbee93be75f5)

Likely related people:

  • steipete: GitHub file history shows recent merged work introducing channel progress drafts, Discord progress draft gating, reasoning progress text, rich Slack drafts, and tool progress detail modes across the same surfaces. (role: introduced behavior and recent maintainer; confidence: high; commits: c33e57855469, 392897304cc5, dd3225460734; files: src/plugin-sdk/channel-streaming.ts, extensions/discord/src/monitor/message-handler.draft-preview.ts, extensions/discord/src/monitor/message-handler.process.ts)
  • vincentkoc: GitHub file history and current checkout blame show recent adjacent maintenance on shared progress formatting, Slack rich progress block capping, Microsoft Teams progress streaming, and tool-display helper churn. (role: recent adjacent owner; confidence: medium; commits: 973e240bb347, 8846fe099811, df39e611f89a; files: src/plugin-sdk/channel-streaming.ts, extensions/slack/src/progress-blocks.ts, extensions/msteams/src/reply-stream-controller.ts)

Remaining risk / open question:

  • No after-fix real Discord, Slack, Teams, terminal, or log proof is present, and the real behavior proof check is failing.
  • The branch currently reports a dirty merge state and cannot land without conflict or rebase handling.
  • One added Discord documentation example appears to promise title+detail text rows while the changed shared text formatter emits icon+detail rows.

Codex review notes: model gpt-5.5, reasoning high; reviewed against a1ac559ed7e6.

@steipete steipete changed the title Improve Discord progress draft rendering Make progress draft labels roll across channels May 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: msteams Channel integration: msteams channel: slack Channel integration: slack labels May 8, 2026
@steipete steipete changed the title Make progress draft labels roll across channels Improve progress draft labels and tool details May 8, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbee93be75

ℹ️ 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".

});
}
})),
].slice(-SLACK_MAX_BLOCKS);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor progress maxLines when building rich Slack draft blocks

The new slice(-SLACK_MAX_BLOCKS) cap is applied after the label block is prepended, so in rich progress mode the label does not roll with the configured streaming.progress.maxLines behavior (it only drops near the 50-block Slack hard cap). In dispatch.ts, previewToolProgressLines is already trimmed to resolveChannelProgressDraftMaxLines(account.config), then this helper adds an extra label block on top; for common configs (for example maxLines: 3 or the default 8), rich blocks render one extra stale label row while text-mode drafts correctly roll it away.

Useful? React with 👍 / 👎.

@steipete steipete force-pushed the codex/discord-natural-progress-drafts branch from dbee93b to 70233f8 Compare May 8, 2026 00:58
@steipete steipete merged commit e0cc5c0 into main May 8, 2026
116 of 117 checks passed
@steipete steipete deleted the codex/discord-natural-progress-drafts branch May 8, 2026 01:03
@steipete
Copy link
Copy Markdown
Contributor Author

steipete commented May 8, 2026

Landed via rebase onto main.

  • Source SHA: 70233f8
  • Landed SHA: e0cc5c0
  • Gate: exact-SHA GitHub CI, Real behavior proof, Workflow Sanity, OpenGrep, and CodeQL/Critical Quality all green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord channel: msteams Channel integration: msteams channel: slack Channel integration: slack docs Improvements or additions to documentation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant