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

Official PRs (…)
ON THIS PAGE

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#84183Fetched 2026-05-20 03:43:03
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Timeline (top)
cross-referenced ×2closed ×1commented ×1

Portable message presentation buttons have a disabled field in the runtime type, but the message tool schema rejects it and the Discord presentation mapper drops it.

Root Cause

Generated review messages often need to show already-handled or unavailable actions without making them interactive. Dropping the disabled state makes the rendered message less clear and can expose actions that should not be clickable.

Fix Action

Fixed

PR fix notes

PR #84188: Preserve disabled Discord presentation buttons

Description (problem / solution / changelog)

Summary

Accepts disabled on portable presentation buttons, advertises Discord disabled-button support during channel adaptation, and preserves the field in Discord presentation button specs.

Motivation

Closes #84183.

The runtime type already included disabled, and Discord button specs support disabled buttons, but the message tool schema and Discord presentation mapper dropped the field. The channel capabilities also failed to advertise disabled-button support, so outbound adaptation could strip the state before rendering.

Change Type

  • Bug fix

Scope

  • Adds disabled to the message tool presentation button schema.
  • Copies disabled: true into Discord button specs for presentation and legacy interactive button mapping.
  • Sets Discord presentationCapabilities.limits.actions.supportsDisabled to true.
  • Adds regression coverage for the adapted outbound path and Discord render output.

Linked Issue/PR

Closes #84183.

Real Behavior Proof

Behavior or issue addressed: A portable presentation button with disabled: true must survive Discord capability adaptation and render as a disabled Discord component, including URL/link buttons.

Real environment tested: Redacted OpenClaw development checkout on this PR branch, using the Discord outbound adapter and Discord presentation renderer.

Exact steps or command run after this patch: Ran a runtime diagnostic against this branch that read Discord presentation capabilities, adapted a disabled URL presentation button for the Discord target runtime, rendered it into a Discord component spec, and serialized the final link button component.

Evidence after fix: Redacted runtime output:

{
  "supportsDisabled": true,
  "adaptedButton": {
    "label": "Open docs",
    "url": "https://example.com/docs",
    "disabled": true
  },
  "componentSpecButton": {
    "label": "Open docs",
    "style": "link",
    "url": "https://example.com/docs",
    "disabled": true
  },
  "serializedLinkButton": {
    "type": 2,
    "style": 5,
    "label": "Open docs",
    "disabled": true,
    "url": "https://example.com/docs"
  },
  "registeredEntries": 0
}

Observed result after fix: Discord advertises disabled-button support, the adapted URL button still has disabled: true, the component spec keeps disabled: true, and final serialized Discord link-button output includes disabled: true.

Not tested: No live Discord provider send was needed for this deterministic capability-adaptation, component-rendering, and final serialization path.

Additional non-link runtime proof from the same branch:

{
  "supportsDisabled": true,
  "adaptedButton": {
    "label": "Already handled",
    "value": "done",
    "disabled": true
  },
  "renderedButton": {
    "label": "Already handled",
    "style": "secondary",
    "callbackData": "done",
    "disabled": true
  }
}

Root Cause

The portable button type and low-level Discord builder already supported disabled buttons, but the schema, adapter capability metadata, and mapping layer did not consistently propagate that field.

Regression Test Plan

  • node scripts/run-vitest.mjs extensions/discord/src/shared-interactive.test.ts extensions/discord/src/outbound-adapter.test.ts extensions/discord/src/components.test.ts extensions/discord/src/send.components.test.ts

Result: 4 files passed, 58 tests passed.

User-visible / Behavior Changes

Callers can send disabled Discord presentation buttons through the message tool without falling back to Discord-specific payloads.

Diagram

N/A. This is a field propagation and capability-advertisement fix.

Security Impact

No new secrets or external calls. The change reduces accidental action availability by preserving an explicit disabled state.

Repro + Verification

Before this change, disabled: true could be rejected or dropped before Discord rendering, and disabled URL buttons could survive adaptation but serialize as enabled link buttons. The new regression tests verify that channel adaptation keeps disabled callback and URL buttons, and final Discord link-button serialization emits a disabled component.

Evidence

  • Focused regression command passed.
  • Redacted runtime diagnostic above confirms supportsDisabled is advertised and disabled: true reaches final serialized Discord link-button output.

Human Verification

No live Discord service is required for this deterministic channel-adaptation and rendering path.

Compatibility / Migration

Backward compatible. Existing messages render the same unless they set disabled: true.

Risks

Low. Only true values are propagated.

Changed files

  • extensions/discord/src/components.builders.ts (modified, +1/-0)
  • extensions/discord/src/components.test.ts (modified, +36/-1)
  • extensions/discord/src/outbound-adapter.test.ts (modified, +51/-0)
  • extensions/discord/src/outbound-adapter.ts (modified, +1/-0)
  • extensions/discord/src/shared-interactive.test.ts (modified, +36/-0)
  • extensions/discord/src/shared-interactive.ts (modified, +6/-0)
  • src/agents/tools/message-tool.ts (modified, +1/-0)

PR #84312: Preserve disabled Discord presentation buttons

Description (problem / solution / changelog)

Makes https://github.com/openclaw/openclaw/pull/84188 merge-ready for the ClawSweeper automerge loop. The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.

ClawSweeper 🐠 replacement reef notes:

<!-- clawsweeper-automerge-requested-by login="Takhoffman" id="781889" -->
  • Repair fallback: GitHub rejected the repair branch push because it updates workflow files and the ClawSweeper app token does not have workflows permission

Inherited issue-closing references from the source PR: Closes #84183

Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against f01328f7911f.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/discord/src/components.builders.ts (modified, +1/-0)
  • extensions/discord/src/components.test.ts (modified, +36/-1)
  • extensions/discord/src/outbound-adapter.test.ts (modified, +51/-0)
  • extensions/discord/src/outbound-adapter.ts (modified, +1/-0)
  • extensions/discord/src/shared-interactive.test.ts (modified, +36/-0)
  • extensions/discord/src/shared-interactive.ts (modified, +6/-0)
  • src/agents/tools/message-tool.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Summary

Portable message presentation buttons have a disabled field in the runtime type, but the message tool schema rejects it and the Discord presentation mapper drops it.

Current behavior

Callers cannot reliably send disabled presentation buttons through openclaw message even though Discord button specs and the lower-level Discord component builder support disabled buttons.

Expected behavior

presentation.blocks[].buttons[] should accept disabled: true and preserve it when building Discord component button specs.

Why this matters

Generated review messages often need to show already-handled or unavailable actions without making them interactive. Dropping the disabled state makes the rendered message less clear and can expose actions that should not be clickable.

Suggested scope

Keep this to schema and adapter preservation:

  • Add disabled to the presentation button tool schema.
  • Preserve disabled: true in Discord presentation mapping.
  • Add a focused test for the mapping.

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 disabled: true and preserve it when building Discord component button specs.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING