openclaw - 💡(How to fix) Fix [Feishu] Presentation buttons block not rendered as native Feishu interactive card buttons

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

In dist/channel-CCNshI3E.js, the buildFeishuPresentationCard function at line ~885 only renders text and context block types. The buttons block type is completely ignored in the card building logic:

// Current code only renders text/context blocks:
body: { elements: [{
    tag: "markdown",
    content: renderMessagePresentationFallbackText({
        text: params.fallbackText,
        presentation: fallbackPresentation  // buttons here get flattened to "- label" text
    })
}] }

renderMessagePresentationFallbackText converts buttons to plain text labels (e.g., - Confirm: https://...), not to Feishu native button elements.

Fix Action

Fix / Workaround

Workaround Verified

Code Example

// Current code only renders text/context blocks:
body: { elements: [{
    tag: "markdown",
    content: renderMessagePresentationFallbackText({
        text: params.fallbackText,
        presentation: fallbackPresentation  // buttons here get flattened to "- label" text
    })
}] }

---

// presentation payload:
{
  "blocks": [
    { "type": "buttons", "buttons": [{ "label": "Confirm ✅", "value": "ok", "style": "primary" }] }
  ]
}

// Should render as Feishu interactive card:
{
  "tag": "action",
  "actions": [{
    "tag": "button",
    "text": { "content": "Confirm ✅", "tag": "plain_text" },
    "type": "primary",
    "value": { "action": "ok" }
  }]
}
RAW_BUFFERClick to expand / collapse

Problem

When using the message tool with presentation.blocks containing type: "buttons" on the Feishu channel, the buttons are not rendered as native Feishu interactive card buttons. Instead, they are converted to plain fallback text (a list of - button_label).

Root Cause

In dist/channel-CCNshI3E.js, the buildFeishuPresentationCard function at line ~885 only renders text and context block types. The buttons block type is completely ignored in the card building logic:

// Current code only renders text/context blocks:
body: { elements: [{
    tag: "markdown",
    content: renderMessagePresentationFallbackText({
        text: params.fallbackText,
        presentation: fallbackPresentation  // buttons here get flattened to "- label" text
    })
}] }

renderMessagePresentationFallbackText converts buttons to plain text labels (e.g., - Confirm: https://...), not to Feishu native button elements.

Expected Behavior

// presentation payload:
{
  "blocks": [
    { "type": "buttons", "buttons": [{ "label": "Confirm ✅", "value": "ok", "style": "primary" }] }
  ]
}

// Should render as Feishu interactive card:
{
  "tag": "action",
  "actions": [{
    "tag": "button",
    "text": { "content": "Confirm ✅", "tag": "plain_text" },
    "type": "primary",
    "value": { "action": "ok" }
  }]
}

Workaround Verified

Using lark-cli directly with the native Feishu card format (using {tag: "action", actions: [{tag: "button"}]}) works perfectly — buttons display and callbacks fire correctly (message_id: om_x100b6e1dfc5018b8c4d3c0bff5530da).

Environment

  • OpenClaw version: 2026.5.20
  • Feishu channel: WebSocket connection
  • channels.feishu.capabilities: ["all"] (includes inlineButtons)
  • Feishu app has im:message:send_as_bot and cardkit:card:write permissions

Proposed Fix

Modify buildFeishuPresentationCard to:

  1. Iterate over all presentation.blocks
  2. For type: "buttons", convert each button to Feishu {tag: "action", actions: [{tag: "button"}]} element
  3. Append these to the card body.elements alongside the markdown fallback text
  4. For type: "text"/type: "context", keep current markdown rendering
  5. For type: "divider", add a {tag: "hr"} element

Would be happy to contribute a PR if this issue is accepted.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feishu] Presentation buttons block not rendered as native Feishu interactive card buttons