openclaw - ✅(Solved) Fix Discord presentation buttons should preserve reusable callback intent [1 pull requests, 1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#84182Fetched 2026-05-20 03:43:05
View on GitHub
Comments
1
Participants
2
Timeline
10
Reactions
1
Timeline (top)
labeled ×8commented ×1cross-referenced ×1

Portable message presentation buttons can express a callback action, but there is no way to mark an individual button as reusable through the message tool schema or Discord presentation mapper.

Root Cause

Review-style workflows often need repeated actions such as refresh, inspect, or get-more-detail. If those buttons are accidentally one-shot, follow-up interaction can fail even though the component registry supports reusable entries.

Fix Action

Fixed

PR fix notes

PR #84187: Preserve reusable Discord presentation buttons

Description (problem / solution / changelog)

Summary

Adds reusable to portable presentation buttons, preserves it through Discord presentation mapping, and documents the field for message presentation authors.

Motivation

Closes #84182.

Presentation buttons can represent repeatable actions such as refresh or more-detail, but the portable schema and Discord mapper dropped the reusable intent before registry entries were created.

Change Type

  • Bug fix
  • Documentation

Scope

  • Adds reusable?: boolean to the presentation button type and tool schema.
  • Carries reusable: true from presentation buttons into Discord button specs.
  • Preserves per-button reusable state when Discord component entries are built.
  • Documents reusable?: boolean in docs/plugins/message-presentation.md.

Linked Issue/PR

Closes #84182.

Real Behavior Proof

Behavior or issue addressed: A portable presentation button with reusable: true must keep that flag through Discord mapping and component registry dispatch so repeatable actions are not consumed after the first callback.

Real environment tested: Redacted OpenClaw development checkout on this PR branch, using the Discord extension runtime path that maps presentation payloads into component entries.

Exact steps or command run after this patch: Ran a runtime diagnostic against this branch that created a reusable presentation button, mapped it to a Discord button spec, built component entries, and performed two dispatch-style lookups against the same callback data.

Evidence after fix: Redacted runtime output:

{
  "componentSpecButton": {
    "label": "More detail",
    "style": "secondary",
    "callbackData": "detail",
    "reusable": true
  },
  "entryReusable": true,
  "handlerConsumePolicy": false,
  "firstDispatch": {
    "label": "More detail",
    "callbackData": "detail"
  },
  "secondDispatch": {
    "label": "More detail",
    "callbackData": "detail"
  }
}

Observed result after fix: The Discord button spec contains reusable: true, the registered entry retains entryReusable: true, handler consume policy is false, and both lookup attempts return the same button metadata.

Not tested: No live Discord provider send was needed for this field-propagation path; the exercised behavior is the runtime mapping and registry decision that controls whether the callback is consumed.

Root Cause

Discord component entries supported reusable behavior, but portable presentation buttons had no reusable schema field and the Discord presentation mapper only copied label, style, callback data, and URL.

Regression Test Plan

  • pnpm exec vitest run extensions/discord/src/shared-interactive.test.ts extensions/discord/src/components.test.ts

Result: 2 files passed, 15 tests passed.

User-visible / Behavior Changes

Message senders can now use presentation.blocks[].buttons[].reusable for Discord presentation buttons.

Diagram

N/A. This is a direct schema, adapter, component-entry, and docs propagation fix.

Security Impact

No new secrets or network calls. The change only preserves an explicit boolean in already-authored message payloads.

Repro + Verification

Before this change, a presentation button authored with reusable intent could not carry that intent through the message tool schema and Discord presentation mapper. The new test asserts that the generated Discord component spec retains it, and the redacted runtime diagnostic confirms the handler sees it as non-consuming.

Evidence

  • Focused regression command passed.
  • Redacted runtime diagnostic above confirms the mapped button remains reusable through component registration and dispatch-style resolution.

Human Verification

No live Discord service is required for this field-propagation fix; the proof exercises the runtime path that decides whether an interaction callback is consumed.

Compatibility / Migration

Backward compatible. Existing payloads are unchanged unless they opt into reusable: true.

Risks

Low. The flag is only emitted when explicitly set to true.

Changed files

  • docs/plugins/message-presentation.md (modified, +5/-0)
  • extensions/discord/src/components.builders.ts (modified, +1/-0)
  • extensions/discord/src/components.types.ts (modified, +2/-0)
  • extensions/discord/src/shared-interactive.test.ts (modified, +22/-0)
  • extensions/discord/src/shared-interactive.ts (modified, +6/-0)
  • src/agents/tools/message-tool.ts (modified, +1/-0)
  • src/interactive/payload.ts (modified, +3/-0)
RAW_BUFFERClick to expand / collapse

Summary

Portable message presentation buttons can express a callback action, but there is no way to mark an individual button as reusable through the message tool schema or Discord presentation mapper.

Current behavior

Discord component entries already support reusable behavior at registration time, but a presentation button cannot carry that intent to the Discord adapter. A sender that needs a repeatable action has to rely on message-level behavior or a Discord-specific component payload.

Expected behavior

presentation.blocks[].buttons[] should accept a reusable flag and preserve it through the Discord component spec so the generated registry entry remains usable after the first successful interaction.

Why this matters

Review-style workflows often need repeated actions such as refresh, inspect, or get-more-detail. If those buttons are accidentally one-shot, follow-up interaction can fail even though the component registry supports reusable entries.

Suggested scope

Keep this narrow to the portable presentation contract and Discord mapping:

  • Add the reusable flag to the presentation button type/schema.
  • Preserve it when building Discord button specs.
  • Add focused adapter coverage.

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…

FAQ

Expected behavior

presentation.blocks[].buttons[] should accept a reusable flag and preserve it through the Discord component spec so the generated registry entry remains usable after the first successful interaction.

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 - ✅(Solved) Fix Discord presentation buttons should preserve reusable callback intent [1 pull requests, 1 comments, 2 participants]