fix(feishu): keep markdown tables in post payload so prose still renders - #22047
fix(feishu): keep markdown tables in post payload so prose still renders#22047Tranquil-Flow wants to merge 2 commits into
Conversation
Forcing every table-bearing reply to plain text (NousResearch#21778) made all surrounding markdown — headings, fences, bold, links, lists — render as raw source on the Feishu client. The post-type `md` element still does not natively render tables, so the table itself appears as raw markdown, but the rest of the message renders normally. Net UX is strictly better than the prior text-fallback behaviour.
8102b3b to
a02edb9
Compare
|
Thanks for targeting the real formatting regression. Problems
Suggested changes
Automated hermes-sweeper review. |
|
Closing — this was fixed on main by #68121, which removes the |
What does this PR do?
v0.13.0 added a defensive fallback in
_build_outbound_payload()that forces any reply containing a markdown table to send as plaintext, on the rationale that Feishu's post-typemdelement doesn't render tables natively (#21778). The cure is worse than the disease — once the whole reply is plain text, every other markdown construct (headings, fences, bold, links, lists) renders as raw source on the Feishu client, not just the table.This PR drops the table-detection downgrade. Replies with markdown go through the post pipeline as usual; the table itself still appears as raw markdown on the client (Feishu's
mdelement limitation unchanged), but everything around it renders. Net UX is strictly better than the prior text fallback.Related Issue
Closes #21778
Type of Change
Changes Made
gateway/platforms/feishu.py— remove table-detection branch from_build_outbound_payload(); remove the now-unused_MARKDOWN_TABLE_REregextests/gateway/test_feishu.py—TestOutboundPayloadMarkdownTables(3 tests covering table → post, plain text → text, markdown without table → post)How to Test
pytest tests/gateway/test_feishu.py -q— 158 passed, 43 skippedpytest tests/gateway/test_feishu.py::TestOutboundPayloadMarkdownTables -v— 3 new tests passmsg_type == "post"for table content vs. baseline"text")Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs