Skip to content

[Feishu] Presentation buttons block not rendered as native Feishu interactive card buttons #85959

Description

@kzclaw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions