Skip to content

feat(slack): support native data visualizations - #104539

Merged
steipete-oai merged 1 commit into
mainfrom
codex/pr-103583
Jul 11, 2026
Merged

steipete-oai merged 1 commit into
mainfrom
codex/pr-103583

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a gap where Slack users could ask for chart/table-style visual output, but OpenClaw could only degrade that content to generic text or unsupported Block Kit shapes instead of using Slack's native chart and table blocks with reliable fallbacks.

Why This Change Was Made

Adds Slack-native data visualization/table rendering behind the existing portable presentation path, with ordered fallback delivery for Slack plans that reject native data blocks. The change also hardens Slack fallback/accessibility behavior for edits, slash responses, previews, raw blocks, and multi-message delivery so authored text, controls, and data rows stay visible exactly once.

User Impact

Slack conversations can now render portable line, bar, pie, and area charts plus data tables as native Slack blocks when the workspace supports them, while unsupported clients/workspaces receive readable ordered fallback text. Discord and core outbound paths keep their existing portable presentation behavior.

Evidence

  • Live Slack DM proof on steipeteclaw: native chart/table blocks rendered; fallback path exercised where Slack rejected native data.
  • Autoreview: clean, no accepted/actionable findings (patch is correct).
  • Remote typecheck: run_d4a3245ab5a9 — corepack pnpm tsgo:extensions.
  • Remote matrix: run_088a58fd9332 — 425 Slack tests plus Discord/core touched tests passed.
  • Focused local proof included Slack fallback/edit/native-data suites while iterating.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: slack Channel integration: slack extensions: qa-lab size: XL maintainer Maintainer-authored PR labels Jul 11, 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: 75b39c980e

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

const rawBlockAccessibilityText = trimmedMessage
? [
trimmedMessage,
...(completeBlockFallbackText.includes(trimmedMessage) ? [] : [completeBlockFallbackText]),

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.

P2 Badge Preserve block fallback when text is only a substring

When a raw Slack block send includes message text that happens to be a substring of the rendered block fallback (for example message OK with a section block Not OK), this substring check treats the block as already represented and posts only OK as the top-level Slack fallback. That loses the block content in notifications/screen-reader text even though the previous paragraph-based de-dupe would have kept both pieces of user-visible content.

Useful? React with 👍 / 👎.

Comment thread extensions/slack/src/edit-text.ts Outdated
const fallbackText =
contentContainsBlockText
? trimmedContent
: blockText && !blockText.includes(trimmedContent)

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.

P2 Badge Preserve edit content when it is only a substring

For edited Slack messages with both content and blocks, this branch drops the authored edit text whenever it is merely a substring of the block fallback; e.g. content OK plus a block rendered as Not OK produces only Not OK as the edited message fallback. That changes the user-visible notification/screen-reader text for edits and can remove the caller's explicit content instead of only de-duping an exact represented paragraph.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 12:10 PM ET / 16:10 UTC.

Summary
The PR rewrites Slack chart/table fallback, accessibility, edit, slash-response, and multi-message delivery behavior, with supporting QA, Discord-limit, core UTF-16, and documentation changes.

PR surface: Source +735, Tests +106, Docs +8. Total +849 across 49 files.

Reproducibility: yes. for the review blockers: the current-head branches deterministically reproduce text loss with authored OK and block fallback Not OK; no live execution was performed.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: vector/embedding metadata: extensions/slack/src/send.reconcile.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof is added.

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

Rank-up moves:

  • [P1] Fix both substring-deduplication regressions and add focused tests.
  • [P2] Attach redacted live Slack evidence showing native chart/table rendering and the invalid_blocks fallback without duplicate or missing text.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body asserts live Slack DM and rejection-fallback results but provides no inspectable screenshot, recording, logs, live output, or linked artifact; add redacted evidence and update the PR body to trigger a fresh review, or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P2] The claimed native and rejected-block Slack behavior has not been demonstrated with inspectable real-world evidence, so platform-specific ordering, accessibility, and fallback results remain unverified outside tests.
  • [P1] The PR substantially rewrites established Slack send, edit, slash-response, preview, and reconciliation paths, increasing regression exposure beyond the two confirmed defects.

Maintainer options:

  1. Fix fallback deduplication before merge (recommended)
    Require exact represented-fragment or paragraph matching so raw sends and edits preserve both authored and block-visible text.
  2. Pause the broad rewrite
    Keep the existing merged native visualization behavior and split verified fallback hardening into a narrower follow-up if the regressions cannot be resolved cleanly.

Next step before merge

  • [P1] The protected maintainer label and contributor-owned real-behavior proof gap keep this PR out of the autonomous repair lane; the author should correct the two focused defects and provide inspectable Slack proof.

Security
Cleared: The diff changes Slack delivery and fallback logic but introduces no concrete credential, permission, dependency, supply-chain, or code-execution concern.

Review findings

  • [P2] Preserve block fallback when text is only a substring — extensions/slack/src/send.ts:1138
  • [P2] Preserve authored edit text when it is only a substring — extensions/slack/src/edit-text.ts:26-28
Review details

Best possible solution:

Preserve explicit authored text and complete visible block fallback using exact represented-fragment or paragraph deduplication, add both substring regression cases, and provide redacted live Slack proof for native chart/table rendering and rejected-block fallback delivery.

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

Yes for the review blockers: the current-head branches deterministically reproduce text loss with authored OK and block fallback Not OK; no live execution was performed.

Is this the best way to solve the issue?

No in its current form. Slack is the correct owner boundary, but fallback deduplication must compare complete represented fragments rather than arbitrary substrings before this broad delivery rewrite is safe.

Full review comments:

  • [P2] Preserve block fallback when text is only a substring — extensions/slack/src/send.ts:1138
    For raw block sends, completeBlockFallbackText.includes(trimmedMessage) treats OK as already representing a block whose visible fallback is Not OK, so Slack receives only OK as notification and screen-reader text. Deduplicate exact represented paragraphs or fragments instead of arbitrary substrings.
    Confidence: 0.99
  • [P2] Preserve authored edit text when it is only a substring — extensions/slack/src/edit-text.ts:26-28
    With edit content OK and block fallback Not OK, this condition skips the append branch and returns only the block text, removing the caller's explicit edit content. Require an exact represented fallback match before dropping either text.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4271b82fd111.

Label changes

Label changes:

  • add P2: The PR is a normal-priority Slack delivery improvement with two bounded but user-visible content-suppression defects.
  • add merge-risk: 🚨 message-delivery: Merging the current head can suppress explicit authored or visible block text in Slack notifications and accessibility fallback.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body asserts live Slack DM and rejection-fallback results but provides no inspectable screenshot, recording, logs, live output, or linked artifact; add redacted evidence and update the PR body to trigger a fresh review, or ask a maintainer to comment @clawsweeper re-review.

Label justifications:

  • P2: The PR is a normal-priority Slack delivery improvement with two bounded but user-visible content-suppression defects.
  • merge-risk: 🚨 message-delivery: Merging the current head can suppress explicit authored or visible block text in Slack notifications and accessibility fallback.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body asserts live Slack DM and rejection-fallback results but provides no inspectable screenshot, recording, logs, live output, or linked artifact; add redacted evidence and update the PR body to trigger a fresh review, or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +735, Tests +106, Docs +8. Total +849 across 49 files.

View PR surface stats
Area Files Added Removed Net
Source 27 2559 1824 +735
Tests 20 3451 3345 +106
Docs 2 29 21 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 49 6039 5190 +849

What I checked:

Likely related people:

  • steipete: Introduced the merged native Slack chart and table presentation paths that this PR extends and rewrites. (role: feature owner; confidence: high; commits: add2c586c2d9, 81a201df267b; files: extensions/slack/src/data-visualization.ts, extensions/slack/src/data-table.ts, extensions/slack/src/reply-blocks.ts)
  • vincentkoc: Implemented complete Slack interactive block delivery and later refactored internal Slack delivery symbols used by the affected paths. (role: recent area contributor; confidence: medium; commits: 12ae4eee7ed1, b88f80940add; files: extensions/slack/src/reply-blocks.ts, extensions/slack/src/send.ts)
  • joeyfrasier: Recently implemented Slack ambiguous-send reconciliation, which is directly adjacent to the PR's multi-part fallback delivery and receipt handling. (role: adjacent owner; confidence: medium; commits: 7e0d530e07d6; files: extensions/slack/src/send.ts, extensions/slack/src/send.reconcile.test.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.

@steipete-oai
steipete-oai force-pushed the codex/pr-103583 branch 2 times, most recently from 4edc26c to 938ea04 Compare July 11, 2026 16:04
@clawsweeper clawsweeper Bot added 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. labels Jul 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 11, 2026
@steipete-oai
steipete-oai merged commit 934a974 into main Jul 11, 2026
100 checks passed
@steipete-oai
steipete-oai deleted the codex/pr-103583 branch July 11, 2026 16:18
@steipete-oai

Copy link
Copy Markdown
Contributor

Merged via squash.

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

Labels

channel: discord Channel integration: discord channel: slack Channel integration: slack docs Improvements or additions to documentation extensions: qa-lab maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants