Repository navigation
fix(feishu): support text tag and nested arrays in interactive card parsing - #73203
taozengabc wants to merge 2 commits into
Conversation
Greptile SummaryAdds two additive improvements to Confidence Score: 5/5Safe to merge — changes are additive, correctly guarded, and well-tested. Both changes are minimal and additive: the No files require special attention. Reviews (1): Last reviewed commit: "fix(feishu): support text tag and nested..." | Re-trigger Greptile |
…arsing The parseInteractiveCardContent function only recognizes div, markdown, lark_md, and plain_text tags. Cards that use text tags (common in custom monitoring alert cards) or nested array layouts (table-like row structures [[cell1, cell2], ...]) fall through to the [Interactive Card] placeholder, losing all content. This affects quoted message context when users reply to card messages, causing the agent to lose critical context (e.g. alert details). Changes: - Add text tag support in extractInteractiveElementText - Flatten one level of nested arrays in extractInteractiveElementsText - Add test cases for both scenarios
|
ProjectClownfish pushed a narrow repair to this branch so the original contributor path can stay canonical. Source PR: #73203 |
17a7abd to
bf6f954
Compare
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open. Current main and latest release still do not extract direct Feishu interactive-card Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? Yes, at source level. A current-main Is this the best way to solve the issue? No, not as submitted. The Feishu parser is the right boundary and the text-tag support is useful, but the best mergeable fix should avoid unbounded recursion, remove the release-owned changelog edit, rebase, and include real Feishu proof. Security review: Security review needs attention: Security review needs attention: no dependency, workflow, lockfile, secret, or publishing changes were found, but the diff adds unbounded recursion over external Feishu card data.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 66880a5d736c. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Problem
parseInteractiveCardContentonly recognizesdiv,markdown,lark_md, andplain_textelement tags. Two common card formats fall through to the[Interactive Card]placeholder:texttag elements — used by custom cards (e.g. monitoring alert cards built with CardKit):{ "tag": "text", "text": "Service health check failed" }Nested array layouts — table-like row structures common in monitoring/status cards:
{ "elements": [ [{"tag": "text", "text": "Service"}, {"tag": "text", "text": "eip-admin-api"}], [{"tag": "text", "text": "Alert"}, {"tag": "text", "text": "Health check failed 3 times"}] ] }This causes loss of context when users quote-reply to card messages — the agent receives
[Interactive Card]instead of the actual card content.Impact in production: 33 occurrences over 4 weeks in our Feishu deployment, primarily in SLA monitoring groups where users quote alert cards to ask the agent for analysis.
Fix
Two minimal changes in
extensions/feishu/src/send.ts:texttag support inextractInteractiveElementText— extractselement.textwhentag === "text"andtextis a stringextractInteractiveElementsText— when an element is itself an array (row of cells), iterate its children instead of skippingBoth changes are additive and do not affect existing parsing behavior for
div,markdown,lark_md, orplain_texttags.Tests
Added two test cases in
send.test.ts:texttag elements mixed withmarkdownelementsRelated