Skip to content

feat: add portable table presentation blocks - #103583

Merged
steipete-oai merged 19 commits into
mainfrom
codex/portable-table-presentation
Jul 11, 2026
Merged

steipete-oai merged 19 commits into
mainfrom
codex/portable-table-presentation

Conversation

@steipete

@steipete steipete commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #12602

AI-assisted: Codex. No session transcript is attached.

What Problem This Solves

Agents can send charts and controls through portable presentation, but structured tables still require Markdown or Slack-specific Block Kit JSON. Native and fallback delivery also differs across replies, direct sends, edits, slash responses, previews, and channels, which can drop structured content or make accessibility output inconsistent.

Why This Change Was Made

Add one portable table presentation block with an atomic caption, headers, and typed rows contract. Slack renders it as a native data_table when the complete message fits Slack's published limits; otherwise it emits deterministic, mention-safe text. Shared render and fallback planning now preserves complete presentation content across Slack entry points and the Telegram, Signal, Discord, and Feishu adapters. Markdown pipe tables are deliberately not auto-promoted, and arbitrary Block Kit remains a Slack-owned advanced path.

User Impact

Message-tool, CLI, and plugin SDK callers can send one structured table payload. Slack users get native tables with numeric cells preserved, while unsupported or oversized cases receive complete ordered text instead of silent truncation; screen readers, notifications, session mirrors, and non-native channels receive equivalent content.

Evidence

  • Final head 42496768640 passed the current-main conflict surface: 2 files, 218 tests across Slack action delivery and Feishu channel policy, plus extension production/test typechecks, focused type-aware lint, and regenerated Plugin SDK API checks.
  • Its immediately preceding code tree passed AWS Crabbox focused proof (run_f55cff333acf, 4 files / 197 tests) and changed gate run_63cbdc329fa1 (typechecks, core/extension/script lint, dependency, database-first, sidecar, and import-cycle guards).
  • Consolidated Slack, Feishu, Telegram, and core proof passed: 16 files, 919 tests; the earlier broad cross-channel suite passed 38 files, 1,512 tests.
  • Plugin SDK API baseline and surface-budget checks passed after the final rebase.
  • Fresh focused-fix and final whole-branch autoreviews returned clean with no accepted/actionable findings; final confidence was 0.82.
  • Hosted exact-head run 29138310817 completed with 66 successes, 29 skips, and 1 neutral. The only two failures (86506769451, 86506769441) are QA Smoke profiles 1/2; exact base dc097be reproduces the identical missing 2026.7.2 changelog-section failure in main run 29138266189 (86506773560, 86506773620).
  • Live Slack posting was not performed because no test workspace/channel destination was approved; transport behavior is covered by focused payload, limit, fallback, retry, and delivery tests.
  • API contract: Slack data_table block reference.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: slack Channel integration: slack channel: telegram Channel integration: telegram cli CLI command changes agents Agent runtime and tooling channel: feishu Channel integration: feishu size: XL maintainer Maintainer-authored PR labels Jul 10, 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: a407a3b9aa

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

@steipete
steipete force-pushed the codex/portable-table-presentation branch from a407a3b to ab19c4b Compare July 10, 2026 10:22
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 10, 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: ab19c4ba7a

ℹ️ 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 src/agents/tools/message-tool.ts Resolved
@steipete
steipete force-pushed the codex/portable-table-presentation branch from ab19c4b to 1bb790a Compare July 10, 2026 10:43
@clawsweeper clawsweeper Bot added 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. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. 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. labels Jul 10, 2026
@clawsweeper

clawsweeper Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 4249676864057892f079e22a9178a6fb84e796f8, but the PR head is now ca0b89d8d4f2203db56a3ff202bc017f1ab6e489. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-11T02:10:00.430Z sha 94515e6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-11T02:18:56.354Z sha 94515e6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-11T03:05:33.818Z sha c8a361790f8a32f99bdc82e1c5b4d66aada3fe8f :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-11T03:35:27.724Z sha 1e80ed902d95295dde843527071a1312021a1c6b :: needs real behavior proof before merge. :: [P2] Use mrkdwn-aware chunks for native-data fallback
  • reviewed 2026-07-11T03:42:41.334Z sha 4249676 :: needs real behavior proof before merge. :: [P2] Use the mrkdwn-aware splitter for rejection fallback | [P2] Advertise Feishu table rendering before adaptation
  • reviewed 2026-07-11T03:51:09.847Z sha 4249676 :: needs real behavior proof before merge. :: [P2] Preserve full table fallback on slash retries
  • reviewed 2026-07-11T03:59:21.057Z sha 4249676 :: needs real behavior proof before merge. :: [P2] Preserve full table fallback on slash retries
  • reviewed 2026-07-11T04:07:57.067Z sha 4249676 :: needs real behavior proof before merge. :: none

@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: ddc09b61ea

ℹ️ 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/send.ts Resolved
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed 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. labels Jul 10, 2026
@steipete-oai
steipete-oai force-pushed the codex/portable-table-presentation branch from ddc09b6 to 5618b35 Compare July 11, 2026 01:27
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: signal Channel integration: signal labels Jul 11, 2026
@steipete-oai
steipete-oai force-pushed the codex/portable-table-presentation branch from 5618b35 to 03b33cb Compare July 11, 2026 01:32

@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: 4249676864

ℹ️ 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 on lines +395 to +398
text: truncateSlackText(
appendSlackNativeDataFallbackText(message.text, message.blocks),
SLACK_TEXT_LIMIT,
),

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 full table fallback on slash retries

When Slack rejects a native data_table slash response with invalid_blocks and the linear table fallback is longer than 8,000 characters (Slack's data_table contract allows up to 10,000 cell characters), this retry truncates the fallback before sending it. The direct send path preserves data-table fallback bytes, so slash responses can lose tail rows exactly in the degradation path meant to be lossless; split or send the full mrkdwn fallback instead of truncateSlackText here.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 11, 2026
@steipete
steipete marked this pull request as draft July 11, 2026 05:10
@steipete
steipete marked this pull request as ready for review July 11, 2026 05:10

@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: 4249676864

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

for (const block of presentation.blocks) {
const isControl = block.type === "buttons" || block.type === "select";
const isDivider = block.type === "divider";
if ((isControl || isDivider) && canRenderSlackPresentation({ blocks: [block] }, options)) {

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 Retain native-eligible tables during fallback splits

Fresh evidence: this current split helper still only moves controls/dividers into nativeBlocks. When one table in a presentation is too large or invalid for Slack native rendering, this sends every table to fallback text, including earlier small tables that fit the remaining data_table budget; users lose native sorting/filtering for those valid tables even though only the offending table needs degradation.

Useful? React with 👍 / 👎.

const charts = params.presentation?.blocks.filter((block) => block.type === "chart") ?? [];
const unsupportedBlocks =
params.presentation?.blocks.filter(
(block) => block.type === "chart" || block.type === "table",

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 Avoid duplicating Telegram controls in table action sends

When a Telegram sendMessage action supplies a presentation containing a table plus buttons/selects but no explicit content/message/caption, adding tables here makes the code take the full-presentation fallback branch below while resolveTelegramButtonsFromParams still sends those controls as native inline buttons. The visible message therefore repeats the control labels as fallback text; use the same partitioning as canonicalizeTelegramPresentationPayload so only non-native blocks are materialized.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot removed mantis: telegram-visible-proof Mantis should capture Telegram visible proof. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. labels Jul 11, 2026
@steipete-oai
steipete-oai merged commit 81a201d into main Jul 11, 2026
106 of 114 checks passed
@steipete-oai
steipete-oai deleted the codex/portable-table-presentation branch July 11, 2026 05:29
@steipete-oai

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
* feat(presentation): add portable table blocks

* chore(presentation): refresh generated contracts

* fix(slack): preserve table fallback payloads

* docs(changelog): note portable message tables

* fix(presentation): preserve cross-channel fallback delivery

* chore(plugin-sdk): refresh rebased contracts

* test(slack): align accessibility expectations

* fix(presentation): harden cross-channel fallback delivery

* chore(plugin-sdk): refresh rebased contracts

* docs(changelog): defer portable table release note

* fix(presentation): satisfy extension lint

* chore(plugin-sdk): refresh surface budgets

* fix(telegram): preserve reactions after progress replies

* fix(slack): preserve rendered preview fallback text

* fix(feishu): preserve oversized presentation fallbacks

* docs(changelog): note portable message tables

* docs(changelog): defer portable table release note

* chore(plugin-sdk): refresh rebased contracts

---------

Co-authored-by: Peter Steinberger <[email protected]>
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: feishu Channel integration: feishu channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Slack Block Kit support for agent messages

2 participants