From 88c9dfecb23c372c20e760057e44856188b91566 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Tue, 30 Jun 2026 23:27:06 -0700 Subject: [PATCH] docs(slack): correct block_kit docstrings to reflect native table blocks The renderer now emits native Block Kit table blocks; the module and _rich_blocks_enabled docstrings still described the earlier monospace-only approach. --- plugins/platforms/slack/adapter.py | 5 +++-- plugins/platforms/slack/block_kit.py | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/platforms/slack/adapter.py b/plugins/platforms/slack/adapter.py index ec102a398f0..521d82f4016 100644 --- a/plugins/platforms/slack/adapter.py +++ b/plugins/platforms/slack/adapter.py @@ -1811,8 +1811,9 @@ class SlackAdapter(BasePlatformAdapter): Opt-in via ``platforms.slack.extra.rich_blocks`` (config.yaml). Default off: messages continue to go out as flat mrkdwn ``text``. Enabling it renders the *final* agent message with real structural primitives - (headers, dividers, true nested lists via ``rich_text``); tables are - rendered as aligned monospace (Block Kit has no robust table block). + (headers, dividers, true nested lists via ``rich_text``, and native + Block Kit ``table`` blocks with per-column alignment); over-limit + tables fall back to aligned monospace. """ raw = self.config.extra.get("rich_blocks") if raw is None: diff --git a/plugins/platforms/slack/block_kit.py b/plugins/platforms/slack/block_kit.py index 56c8809ade5..01b048f93a5 100644 --- a/plugins/platforms/slack/block_kit.py +++ b/plugins/platforms/slack/block_kit.py @@ -7,11 +7,11 @@ gives us real structural primitives — section headers, dividers, and true Design constraints (why this module is deliberately conservative): -* **Block Kit has no robust table primitive.** The newer ``table`` block is - limited and fragile, so markdown pipe-tables are rendered as monospace - ``rich_text_preformatted`` — the same thing a human would paste today, just - aligned. Proper ``table`` blocks are a future iteration (see the PR's Open - Questions), not a v1 gate. +* **Markdown pipe-tables render as native ``table`` blocks** — real grid + cells with per-column alignment and inline-formatted ``rich_text`` content. + A table that exceeds Slack's limits (100 rows / 20 cols / 10k aggregate + cell chars) or won't parse falls back to aligned monospace + ``rich_text_preformatted`` so a large table never breaks the message. * **Slack caps a message at 50 blocks** and a ``section``/text object at 3000 characters. :func:`render_blocks` enforces both and, if the content simply cannot be expressed within them, returns ``None`` so the caller falls back