feat(gateway/feishu): render markdown tables via interactive card#35906
Open
eaglewa wants to merge 1 commit into
Open
feat(gateway/feishu): render markdown tables via interactive card#35906eaglewa wants to merge 1 commit into
eaglewa wants to merge 1 commit into
Conversation
Feishu 'post' / 'lark_md' elements cannot render GFM markdown tables — the message arrives blank on the client — so `_build_outbound_payload` previously downgraded any table content to plain text, losing the table. The interactive-card 'markdown' component (card schema 2.0) does render tables, so route table content to a card instead. Non-table content is unchanged (markdown -> post, plain -> text). `send()` falls back to plain text if the card payload is rejected, so a malformed card never drops the message.
Collaborator
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
Feishu
post/lark_mdelements cannot render GFM markdown tables — themessage arrives blank on the client.
_build_outbound_payloadthereforedowngraded any table content to plain text, losing the table formatting.
The interactive-card
markdowncomponent (card schema 2.0) does rendertables, so this routes table content to an interactive card instead. Non-table
content is unchanged:
post(renders fine today)textsend()falls back to plain text if a card payload is rejected by the API, soa malformed card can never drop the message.
Tests
tests/gateway/test_feishu_card_rendering.py:post(unchanged)text(unchanged)