fix(feishu): render Markdown tables using interactive card with table component - #16194
Open
highland0971 wants to merge 1 commit into
Open
highland0971 wants to merge 1 commit into
highland0971 wants to merge 1 commit into
Conversation
Contributor
|
Likely duplicate of #12114 — same fix: route GFM tables to Feishu Card v2 native table component in gateway/platforms/feishu.py. |
12 tasks
… component
Problem: Markdown tables were silently dropped in Feishu messages.
- _MARKDOWN_HINT_RE didn't detect '|' character for table syntax
- Feishu 'md' tag doesn't support Markdown tables (content returns empty [[]])
Solution:
1. Add '(^\s*\|)' pattern to _MARKDOWN_HINT_RE for table detection
2. Add _parse_markdown_table() to extract table structure from content
3. Add _build_table_card_payload() to generate Feishu interactive card JSON
4. Modify _build_outbound_payload() to use 'interactive' msg_type for tables
Feishu table format (reference: github.com/alexaundre/mycc_init):
- columns: [{name, display_name, data_type, width}]
- rows: [{col_0: 'value', col_1: 'value', ...}] (object format)
Tested: Local + CT108 (多吉) instance, table rendering verified.
highland0971
force-pushed
the
fix/feishu-table-rendering
branch
from
April 28, 2026 11:26
8acb515 to
f61c79f
Compare
This was referenced Apr 29, 2026
多表格场景未处理
复现: 一条消息包含多个表格时,只有第一个正确渲染为飞书 Card table 组件,其余全部退化。 建议修复方向: 循环解析多个表格,每个生成独立的 当前 workaround:手动拆成每天一条消息发送。 |
This was referenced May 5, 2026
This was referenced May 23, 2026
Collaborator
|
Thanks for tackling a real Feishu rendering limitation. The blank-message symptom is already mitigated on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
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.
Problem
Markdown tables were silently dropped in Feishu messages:
_MARKDOWN_HINT_REdidn't detect|character for table syntaxmdtag doesn't support Markdown tables - content returns empty[[]]Solution
(^\s*\|)pattern to_MARKDOWN_HINT_REfor table detection_parse_markdown_table()to extract table structure from content_build_table_card_payload()to generate Feishu interactive card JSON_build_outbound_payload()to useinteractivemsg_type for tablesFeishu Table Format
Reference: github.com/alexaundre/mycc_init
buildTableCard{ "tag": "table", "columns": [{"name": "col_0", "display_name": "Header", "data_type": "text", "width": "auto"}], "rows": [{"col_0": "value"}] // object format with keys matching column names }Testing
Screenshots
Before: tables silently dropped, empty content
After: tables render correctly as Feishu table component