feat(slack): convert markdown tables to Block Kit table blocks - #48737
Closed
whatfontisthis wants to merge 1 commit into
Closed
feat(slack): convert markdown tables to Block Kit table blocks#48737whatfontisthis wants to merge 1 commit into
whatfontisthis wants to merge 1 commit into
Conversation
tonydwb
approved these changes
Jun 19, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Converts markdown tables in Slack messages to Block Kit rich_text_table blocks. Clean 1-file feature addition with proper fallback to plaintext for non-table content. Well-scoped.
Reviewed by Hermes Agent
whatfontisthis
force-pushed
the
feat/slack-table-block-kit
branch
from
June 19, 2026 03:52
50c66b8 to
34f5d02
Compare
Contributor
|
Superseded by #56102 (#56102), a broader opt-in Slack Block Kit renderer that includes native table blocks (per-column alignment, inline-formatted cells, monospace fallback over Slack's limits) and closes #18918. This was one of several independent fixes for the same area — thanks for contributing it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When Hermes outputs markdown tables in a Slack response, the Slack adapter now converts them into Slack's supported Block Kit
tableblocks. Prose around tables is rendered as visiblesectionblocks, preserving message order such astext -> table -> textand multiple tables in one response.This replaces the earlier
rich_text_tableapproach, which Slack rejected in live testing withinvalid_blocks.How it works
_parse_markdown_tables()extracts pipe-delimited markdown tables and returns ordered text/table segments._markdown_table_message_blocks()converts ordered segments into visible Slack blocks:section+mrkdwntableblock_tables_to_blocks()builds Slack table rows withraw_textcells, respecting Slack's table limits.send()attaches blocks tochat_postMessageand falls back to plain markdown text if Slack rejects the table payload.Behavior
invalid_blocks, Hermes retries as plain markdown text.Tests
./venv/bin/python -m pytest tests/gateway/test_slack.py -k 'SendMarkdownTables' -q./venv/bin/python -m py_compile gateway/platforms/slack.py