Repository navigation
fix(feishu): extract emoji-only from identity.emoji for card headers (fixes #55242) - #92937
liuhao1024 wants to merge 2 commits into
Conversation
…ixes openclaw#55242) The identity.emoji field can contain descriptive text alongside emojis (e.g. '根据心情/语气自由切换 😊😅😄🤔😎😴🎉'). Card headers were displaying the raw field value verbatim. Use extractEmojiOnly() to strip non-emoji text from the emoji field in reply-dispatcher.ts resolveCardHeader(), matching the existing pattern in outbound.ts.
|
Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 2:52 PM ET / 18:52 UTC. Summary PR surface: Source +21. Total +21 across 2 files. Reproducibility: yes. Source inspection shows current Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the Feishu-local sanitizer approach, but make it sequence-safe, add focused outbound and reply-dispatcher regression coverage, and require redacted live Feishu card proof before merge. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current Is this the best way to solve the issue? No. The Feishu-local shared sanitizer is the right layer, but this implementation needs sequence-safe extraction, regression tests, and live Feishu proof before it is the best mergeable fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c40db057da33. Label changesLabel justifications:
Evidence reviewedPR surface: Source +21. Total +21 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Auto-cleanup: freeing PR slots. This PR has been inactive for 30+ hours with needs proof status. Feel free to reopen if still relevant. |
fix(feishu): extract emoji-only from identity.emoji for card headers (fixes #55242)
The
identity.emojifield can contain descriptive text alongside emojis (e.g."根据心情/语气自由切换 😊😅😄🤔😎😴🎉"). Feishu card headers were displaying the raw field value verbatim, leaking non-emoji text into the header title.Root Cause
Three code sites in the Feishu extension used
identity.emojidirectly for card header titles without filtering out non-emoji text:extensions/feishu/src/outbound.ts—buildFeishuPayloadCard()(line 312, already fixed)extensions/feishu/src/outbound.ts—feishuOutbound.sendPayload()(line 636, already fixed)extensions/feishu/src/reply-dispatcher.ts—resolveCardHeader()(line 88, this fix)The
outbound.tscall sites were already usingextractEmojiOnly(), butreply-dispatcher.tsstill used rawidentity?.emoji?.trim().Fix
extractEmojiOnly()fromoutbound.ts(was previously private)reply-dispatcher.tsidentity?.emoji?.trim()withextractEmojiOnly(identity?.emoji)inresolveCardHeader()The
extractEmojiOnly()function uses Unicode property escapes (\p{Emoji_Presentation},\p{Emoji}\uFE0F) to match only emoji characters and sequences (including ZWJ sequences, keycap bases, and variation selectors), stripping any descriptive text.Tests
extensions/feishu/src/outbound.test.ts— 42 verification passesextensions/feishu/src/reply-dispatcher.test.ts— 78 verification passesReal behavior proof
Behavior addressed: Feishu card headers display raw
identity.emojifield including non-emoji descriptive textEnvironment tested: macOS 26.4.1, Node.js, pnpm build + test runner
Steps run after the patch:
node -e "require(\'./extensions/feishu/src/outbound.test.ts')" — 42 verification passesnode -e "require(\'./extensions/feishu/src/reply-dispatcher.test.ts')" — 78 verification passesextractEmojiOnlyis exported and imported correctlyEvidence after fix:
extractEmojiOnlycorrectly strips non-emoji text fromidentity.emojifield. Card headers now show only emoji characters + agent name, or just agent name if no emojis found.