Skip to content

feat(slack): render progress as native progress task cards#82258

Closed
simonvanlaak wants to merge 10 commits into
openclaw:mainfrom
project-4ok:feat/slack-plan-progress-drafts
Closed

feat(slack): render progress as native progress task cards#82258
simonvanlaak wants to merge 10 commits into
openclaw:mainfrom
project-4ok:feat/slack-plan-progress-drafts

Conversation

@simonvanlaak

@simonvanlaak simonvanlaak commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds an explicit Slack-only opt-in for native progress task cards:

  • channels.slack.streaming.mode="progress"
  • channels.slack.streaming.progress.nativeTaskCards=true

Default behavior is unchanged. If nativeTaskCards is unset, Slack progress mode continues to use the existing portable draft-preview path.

What changed

  • Slack can render progress as native plan_update / task_update stream chunks when the opt-in is enabled.
  • Final replies stay in the same Slack thread after native progress completes.
  • nativeTaskCards is scoped to Slack config/schema/docs and generated channel metadata.
  • Progress identity preserves optional item/tool ids so Slack task cards can update stable tasks when upstream events provide ids.
  • The public SlackChannelStreamingConfig export remains available through the channel streaming surface.

Maintainer notes

The intended review focus is the Slack opt-in gate, native stream lifecycle, task chunk rendering, final-thread delivery, and the default-off upgrade behavior.

Known follow-ups intentionally left out of this PR:

  • repeated same-name tool identity when upstream progress events do not provide stable ids
  • more precise failed-command task status propagation when a normal final assistant reply follows

Verification

Current head: 2dda167d9569bb424ffd26d1c51dbb095cbb63cf

  • node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check
  • Focused Slack/progress Vitest slice passed locally after the review fix.
  • GitHub current-head checks are green, including check-prod-types, check-test-types, check-lint, check-guards, build-artifacts, check-docs, and Real behavior proof.
  • git diff origin/main -- extensions/openrouter/provider-routing.ts src/commands/status.summary.redaction.test.ts is empty, so the prior unrelated cleanup is no longer in this PR.

Visual proof

Screencast.From.2026-05-20.11-38-07.webm

Shows a native Slack progress task card appearing during work, updating while tools run, completing, and then the final answer landing in the same Slack thread.

Real behavior proof

Behavior addressed: Slack native progress task cards are opt-in through Slack-only channels.slack.streaming.progress.nativeTaskCards=true; existing Slack progress mode remains on the portable draft-preview path unless that flag is set. The opted-in native path sends Slack stream chunks (plan_update / task_update) instead of replacing full Block Kit messages.

Real environment tested: local source-run OpenClaw gateway from this PR branch using OpenClaw test app credentials in Slack workspace 4ok, channel C0ASNARACMT, with streaming.mode="progress" and streaming.progress.nativeTaskCards=true. The current head includes the post-review type/export fix, the scope cleanup that removed unrelated OpenRouter changes, and the final-only native-progress delivery fix.

Exact steps or command run after this patch: started the local source-run gateway with OpenClaw test app credentials and a redacted HTTP-level Slack stream recorder, verified /healthz returned {"ok":true,"status":"live"} and logs showed slack socket mode connected; then sent a Slack prompt that produced native progress task-card updates and a final marker reply.

Evidence after fix: Slack thread https://4okworkspace.slack.com/archives/C0ASNARACMT/p1779268109549229; pass flags were final_text_seen=true and stream_chunk_proof=true. The redacted stream evidence showed chat.startStream with task_display_mode=plan and plan_update + task_update chunks, followed by chat.appendStream chunk updates and chat.stopStream.

Observed result after fix: OpenClaw consumed the Slack prompt, delivered native progress through Slack stream chunks while the command was still running, updated tasks to complete, and posted the final marker reply in the same thread.

What was not tested: maintainer-owned Slack desktop smoke proof on current head. Repeated same-name tool calls without upstream stable ids may still collapse, and a failed command followed by a normal final assistant reply may finalize the native task as complete rather than error; both are intentionally left as follow-ups to keep this PR scoped to the opt-in Slack-native progress feature.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 15, 2026
@clawsweeper

clawsweeper Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 8:01 AM ET / 12:01 UTC.

Summary
The PR adds Slack-only native progress task-card streaming behind channels.slack.streaming.progress.nativeTaskCards, extends Slack stream chunk helpers, carries progress IDs, updates config/schema/docs/metadata, and adds focused tests.

PR surface: Source +499, Tests +1141, Docs +20, Generated 0. Total +1660 across 19 files.

Reproducibility: not applicable. this is a feature PR rather than a bug report. The PR provides a real Slack recording and redacted stream proof for the new opt-in behavior.

Review metrics: 1 noteworthy metric.

  • Slack config surfaces: 1 added, 0 default behavior changes. The new channels.slack.streaming.progress.nativeTaskCards flag is compatibility-sensitive even though existing users stay on the current draft-preview path unless they opt in.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Maintainers should explicitly accept or reject the documented repeated-tool and failed-command follow-up limitations before merge.

Mantis proof suggestion
A maintainer-owned Slack desktop smoke would add useful independent proof for the visible native task-card delivery path. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

slack desktop smoke: verify opt-in Slack native progress task cards update during a tool run and the final reply lands in the same thread.

Risk before merge

  • [P1] Merging adds one default-off Slack config surface that becomes operator-facing schema/docs/metadata and should be accepted as the intended stable opt-in shape.
  • [P1] The opt-in path changes visible Slack progress delivery from draft edits to native stream chunks plus same-thread final delivery; tests and proof are strong, but Slack transport behavior remains the main merge-sensitive area.
  • [P1] The author intentionally leaves repeated same-name tool identity without upstream IDs and failed-command status propagation as follow-ups, so maintainers should agree those limitations are acceptable for the first opt-in version.

Maintainer options:

  1. Accept the opt-in first version (recommended)
    Maintain the default-off gate and merge once maintainers agree the documented repeated-tool and failed-command limitations are acceptable follow-ups.
  2. Require maintainer Slack smoke proof
    Ask for a maintainer-owned Slack desktop or live transport smoke if the team wants independent proof beyond the contributor video, redacted stream evidence, and green checks.
  3. Pause for upstream identity/status contracts
    Hold the PR if maintainers want repeated same-name tools or failed-command task status solved before any native task-card surface ships.

Next step before merge

  • No automated repair is indicated; maintainers need to decide whether the opt-in Slack native progress delivery risk and scoped follow-up limitations are acceptable.

Security
Cleared: No concrete security or supply-chain regression was found; the PR does not touch workflows, lockfiles, dependency sources, package scripts, or secret handling.

Review details

Best possible solution:

Land the default-off Slack native progress path only after maintainers accept the new config surface, the native-stream delivery behavior, and the documented follow-up limitations.

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

Not applicable: this is a feature PR rather than a bug report. The PR provides a real Slack recording and redacted stream proof for the new opt-in behavior.

Is this the best way to solve the issue?

Yes, if maintainers accept the scope: the default-off Slack-only flag preserves current behavior while adding the native task-card path with focused tests and docs. The safer alternative is to pause until upstream tool identity and failed-command status contracts are also solved.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR includes a visible Slack recording plus redacted stream-level evidence showing native progress task cards updating and the final reply landing in the same thread.

Label justifications:

  • P2: This is a meaningful Slack UX improvement with bounded blast radius and no current evidence of a broken core workflow.
  • merge-risk: 🚨 compatibility: The PR adds a new Slack operator config/schema/docs surface that maintainers need to accept before it becomes part of the upgrade contract.
  • merge-risk: 🚨 message-delivery: The opt-in path changes Slack progress delivery to native stream chunks and same-thread final delivery, which green unit tests do not fully settle for all live Slack workspaces.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. Native Slack task cards turn existing progress drafts into a much clearer live work surface without changing defaults for existing users.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR includes a visible Slack recording plus redacted stream-level evidence showing native progress task cards updating and the final reply landing in the same thread.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR includes a visible Slack recording plus redacted stream-level evidence showing native progress task cards updating and the final reply landing in the same thread.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR includes a visible Slack recording plus redacted stream-level evidence showing native progress task cards updating and the final reply landing in the same thread.
Evidence reviewed

PR surface:

Source +499, Tests +1141, Docs +20, Generated 0. Total +1660 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 10 567 68 +499
Tests 7 1188 47 +1141
Docs 1 20 0 +20
Config 0 0 0 0
Generated 1 7 7 0
Other 0 0 0 0
Total 19 1782 122 +1660

What I checked:

Likely related people:

  • steipete: Recent public commit history shows repeated work on Slack dispatch, streaming helper exports, assistant-thread lifecycle, rich Slack progress drafts, progress truncation, and central inbound context around the touched paths. (role: recent area contributor; confidence: high; commits: 1507a9701b, 77547226ce, b5d408cd69; files: extensions/slack/src/monitor/message-handler/dispatch.ts, extensions/slack/src/progress-blocks.ts, extensions/slack/src/streaming.ts)
  • mvanhorn: Recent Slack streaming history includes fallback/finalize behavior that this PR extends with structured stream chunks. (role: streaming behavior contributor; confidence: medium; commits: e55b932632, 676ed34cbd; files: extensions/slack/src/streaming.ts)
  • vincentkoc: Recent channel/Slack history includes scoped DM route updates and rich progress-line preservation near the delivery and progress surfaces touched here. (role: adjacent channel routing contributor; confidence: medium; commits: d1cd74b243, ccb94a6282; files: extensions/slack/src/monitor/message-handler/dispatch.ts, extensions/slack/src/progress-blocks.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

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.

@openclaw-barnacle openclaw-barnacle Bot added size: L proof: supplied External PR includes structured after-fix real behavior proof. and removed size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 16, 2026
@simonvanlaak
simonvanlaak force-pushed the feat/slack-plan-progress-drafts branch 2 times, most recently from fd25fc9 to 036f7df Compare May 16, 2026 08:55
@simonvanlaak
simonvanlaak marked this pull request as ready for review May 16, 2026 09:08
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: supplied External PR includes structured after-fix real behavior proof. labels May 16, 2026

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

Copy link
Copy Markdown
Contributor

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: 036f7dfac1

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

Comment thread extensions/slack/src/progress-blocks.ts Outdated
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 16, 2026
@simonvanlaak
simonvanlaak marked this pull request as draft May 16, 2026 09:18
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. labels May 16, 2026
@simonvanlaak

simonvanlaak commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Product decisions locked from e2e UX review:

  • Hidden/no-label progress (channels.slack.streaming.progress.label = false or no explicit progress title) should not fall back to a generic static title forever. The visible Slack plan title should become the newest meaningful/current progress step, with Thinking only as the initial fallback before a meaningful step exists.
  • Explicit configured labels/titles are intentional operator/customer-facing copy and should remain stable as the plan title.
  • Keep native Slack plan + task_card rendering; do not regress hidden-title progress back to legacy section/fields blocks.
  • The observed dropdown-collapse behavior is likely caused by replacing/editing the whole plan block as tasks change. Prod-style behavior should use Slack stream chunks instead of whole-block replacement where native streaming is active.

Next implementation shape:

  • Extend extensions/slack/src/streaming.ts to support stream chunks, not only markdown text.
  • Add taskDisplayMode?: "timeline" | "plan" | "dense" to startSlackStream.
  • Add an append helper for task/plan chunks.
  • Convert rich progress updates into stable task_update chunks plus optional plan_update title chunks.
  • Keep buildSlackProgressDraftBlocks as fallback for non-native draft/edit mode.
  • Add tests proving native streaming emits task_update / plan_update chunks instead of replacing full plan blocks when native streaming is active.

@openclaw-barnacle openclaw-barnacle Bot added size: XL proof: supplied External PR includes structured after-fix real behavior proof. and removed size: L triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 16, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 16, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label May 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label May 19, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels May 19, 2026
@simonvanlaak
simonvanlaak force-pushed the feat/slack-plan-progress-drafts branch from 12e07b2 to bcbac45 Compare May 19, 2026 21:34
@clawsweeper

clawsweeper Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: ✨ hatched 🥚 common Neon Patch Peep. Rarity: 🥚 common. Trait: keeps receipts.

Details

Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Neon Patch Peep in ClawSweeper.
Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@simonvanlaak

Copy link
Copy Markdown
Contributor Author

Current state for maintainer review:

  • Current head: d2bec4654955d8012aa2ffffb80389dc999a19e8
  • New behavior is opt-in via Slack-only channels.slack.streaming.progress.nativeTaskCards=true
  • Existing Slack progress mode stays on the portable draft-preview path by default
  • PR body includes visual proof, redacted stream proof, focused tests, and a maintainer review guide
  • Patch progress identity rank-up is addressed and covered by focused dispatch/renderer/stream/plugin SDK tests
  • Suggested follow-ups are listed separately and are not required for the opt-in native-card path

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

Copy link
Copy Markdown
Contributor

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: d2bec46549

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

Comment thread extensions/slack/src/monitor/message-handler/dispatch.ts
@Lukas-Kaiser-LK

Copy link
Copy Markdown

this would be very useful. thank you!

@steipete

Copy link
Copy Markdown
Contributor

Thanks @simonvanlaak. I landed this via replacement maintainer PR #87748 because pushing fixups back to the fork branch was denied even though the PR metadata reported maintainer edits were enabled.

Landed commit: 7c4601e
Replacement PR: #87748

For future PRs, please double-check that GitHub's "Allow edits by maintainers" setting is enabled and that the fork branch permissions allow maintainer pushes.

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

Labels

channel: slack Channel integration: slack docs Improvements or additions to documentation feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants