Repository navigation
feat: add portable table presentation blocks - #103583
Conversation
There was a problem hiding this comment.
💡 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".
a407a3b to
ab19c4b
Compare
There was a problem hiding this comment.
💡 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".
ab19c4b to
1bb790a
Compare
|
Codex review: stale review; fresh review needed. Summary Next step Review history (10 earlier review cycles; latest 8 shown)
|
There was a problem hiding this comment.
💡 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".
ddc09b6 to
5618b35
Compare
5618b35 to
03b33cb
Compare
There was a problem hiding this comment.
💡 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".
| text: truncateSlackText( | ||
| appendSlackNativeDataFallbackText(message.text, message.blocks), | ||
| SLACK_TEXT_LIMIT, | ||
| ), |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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)) { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
* 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]>
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
tablepresentation block with an atomic caption, headers, and typed rows contract. Slack renders it as a nativedata_tablewhen 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
42496768640passed 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.run_f55cff333acf, 4 files / 197 tests) and changed gaterun_63cbdc329fa1(typechecks, core/extension/script lint, dependency, database-first, sidecar, and import-cycle guards).29138310817completed with 66 successes, 29 skips, and 1 neutral. The only two failures (86506769451,86506769441) are QA Smoke profiles 1/2; exact basedc097bereproduces the identical missing2026.7.2changelog-section failure in main run29138266189(86506773560,86506773620).data_tableblock reference.