fix(feishu): render markdown replies as interactive cards - #61365
Open
WhaleLiu-2173 wants to merge 1 commit into
Open
fix(feishu): render markdown replies as interactive cards#61365WhaleLiu-2173 wants to merge 1 commit into
WhaleLiu-2173 wants to merge 1 commit into
Conversation
teknium1
reviewed
Jul 10, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing the Feishu table-rendering gap. Current main confirms the underlying issue: plugins/platforms/feishu/adapter.py:4524-4534 explicitly sends table-shaped replies as plain text because post markdown tables render blank.
Problems
- The fallback migration is incomplete. The changed interactive branch still relies on
_POST_CONTENT_INVALID_RE(plugins/platforms/feishu/adapter.py:166), which only matches the literal post-type validation message. The updated fallback fixture intests/gateway/test_feishu.py:471also returns that post-specific message despite the request becominginteractive, so it does not validate the promised fallback for an interactive-card rejection.
Suggested changes
- Verify the interactive-card validation error/code, broaden the shared predicate to that verified response shape, and cover send/edit fallback using it before relying on the plain-text fallback path.
Automated hermes-sweeper review.
| ) | ||
| except Exception as exc: | ||
| if msg_type != "post" or not _POST_CONTENT_INVALID_RE.search(str(exc)): | ||
| if msg_type != "interactive" or not _POST_CONTENT_INVALID_RE.search(str(exc)): |
Contributor
There was a problem hiding this comment.
This now gates an interactive fallback with _POST_CONTENT_INVALID_RE, but that regex only matches the literal post-type validation message (adapter.py:166). The updated tests keep that post-specific fixture, so they do not prove an interactive-card rejection reaches the text fallback. Please use the verified interactive validation error/code and cover it here and in the edit path.
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
Tests
.venv/bin/python -m pytest tests/gateway/test_feishu.py -q -k "send_ or edit_message or build_post_payload or interactive_card_for or streaming_send_then_table_edit".venv/bin/python -m pytest tests/gateway/test_stream_consumer_fresh_final.py -q.venv/bin/python -m pytest tests/gateway/test_stream_consumer.py::TestFinalizeCapabilityGate tests/gateway/test_stream_consumer.py::TestEditMessageFinalizeSignature -qgit diff --checkNote: full
tests/gateway/test_feishu.pystill has two unrelated local webhook failures becauseaiohttp.webisNone.