Skip to content

fix(discord): agent presentation controls stop expiring - #201965

Merged
obviyus merged 7 commits into
mainfrom
fix-discord-stateless-agent-controls
Nov 20, 2026
Merged

obviyus merged 7 commits into
mainfrom
fix-discord-stateless-agent-controls

Conversation

@obviyus

@obviyus obviyus commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On Discord, a button or select that the agent sends through the message tool (presentation with action: { type: "callback" } or a legacy value) stops working 30 minutes after it is sent, and after any Gateway restart that loses the in-memory registry: the tap answers "This component has expired." The agent never sees it. Follow-up to #201764, which made these taps reach the agent on every channel while the Discord callback is still registered.

Root cause

Discord presentation controls get a random occomp:cid=<id> custom id, and the meaning of the tap lives only in the component registry (extensions/discord/src/components.builders.ts:55-84, select at :194-244), which expires after agentComponents.ttlMs (default 30 minutes) and is lost when persistence is unavailable. The resolver then replies "This component has expired." (extensions/discord/src/monitor/agent-components.ts, handleDiscordComponentEvent). Core already marks agent-authored values (#201764), so the value alone is enough to route the tap; it was just not carried by the component.

Solution

Agent-authored controls are stateless:

  • Send (shared-interactive.ts, components.builders.ts): a core-marked callback button gets the custom id agent:<index>:<marked value>; a select whose options are all core-marked gets agentsel:<index> and keeps the marked values as option values. No registry entry is written. The index keeps ids unique per message (duplicate values, several selects). The send-action parser (components.parse.ts, readDiscordComponentSpec), which re-reads the generated spec on the message tool path, keeps agent:/agentsel: ids; other internal ids (approvals, questions) stay builder-only.
  • Tap (monitor/agent-components.system-controls.ts): the existing agent/agentsel component handlers, which no code path produced anymore, now handle these ids:
    1. the normal sender checks for components (resolveAuthorizedComponentInteraction: DM policy, pairing, guild/channel allowlists, policy freshness);
    2. single use unless the button sets reusable: true (carried in the id as agent:<index>r:): the tap response disables the agent's buttons and selects (Discord renders them greyed out and rejects further taps) and keeps the text, media, URL buttons and other controls unchanged; the message can never become empty. This happens before any handler runs, so a plugin-handled tap is single use too; a handler that edits the source message replaces that update;
    3. plugin first on the value (the core dispatcher strips the mark); select handlers get the selected option labels in values, as registry selects did;
    4. the value reaches the conversation's session as callback_data: <value> through the same dispatch as registry-backed components.
  • Native components and forms keep the registry and agentComponents.ttlMs.

What was deleted

  • The legacy agent:/agentsel: system-event handler body ([Discord component: … clicked by …]), parseAgentComponentData, ensureAgentComponentInteractionAllowed, and their tests. Nothing produced these ids.
  • Registry writes for agent-authored presentation controls.

Accepted edges

  • If any agent button value in a presentation does not fit Discord's 100-character custom id (values over about 90 characters), all of that presentation's agent controls use the registry path, one consumption group as before, and expire as before. Not dropped, not silent.
  • Buttons sent before this change keep their registry entries and expire as before.
  • A tap goes to the conversation's session (the normal inbound route of the channel and sender), not to the session that sent the message. This matches Telegram, Mattermost and Feishu after fix: agent-authored message buttons reach the agent on every channel #201764, and it is what the agent-controls design specifies ("stateless taps re-run normal inbound auth and resolve the conversation session"). Before, Discord routed to the sender's session through the registry entry, which is the state that expires. Controls sent into a channel from another session (for example, a cron run) now reach that channel's session.

Local review

  • [P2] reusable buttons, [P2] URL buttons kept, [P2] empty container, [P2] controls-only message stayed tappable: fixed, with tests (consumed controls are now disabled instead of removed).
  • [P2] plugin-handled tap skipped consumption, [P2] mixed short and long values, [P2] stateless select lost values for plugin handlers: fixed, with tests (red on 71786b2, green on head).
  • [P1] send parser dropped the generated agent ids on the message tool path (the earlier tests bypassed the parser): fixed. The tests now render through readDiscordComponentSpec; without the parser fix 8 of 11 fail.
  • [P1] sender session route: conversation-session routing approved by the maintainer, see accepted edges.

Tests (red on base cd2ae19272a3, green on head)

extensions/discord/src/monitor/monitor.agent-components.test.ts renders a core-marked presentation through the real builders, clears the in-memory and persistent registry (restart or TTL expiry), and routes the tap to the registered control the way the Discord client resolves custom ids.

Test Base Head
typed callback button after the registry is gone → callback_data: pick:a, controls removed, plugin offered ::pick:a ✗ "This component has expired." ✓
legacy value button after the registry is gone → callback_data: /pick a ✗ "This component has expired." ✓
select choice after the registry is gone → callback_data: size:m ✗ ✓
tapper outside the allowlist → "You are not authorized to use this button.", no dispatch ✗ ✓
duplicate values and two selects in one message → distinct custom ids ✓ (guard) ✓

Gates: Discord extension suite, pnpm tsgo:extensions, pnpm check:test-types, oxlint and oxfmt on changed files.

  • monitor.agent-components.test.ts: tapping an agent button disables it and keeps a URL button in the same row; a reusable agent button leaves the message unchanged and still delivers callback_data: refresh; a controls-only message has its control disabled, so a second tap cannot fire ; a plugin-claimed tap disables the control and the handler runs once; a select handler gets values: ["Medium"]; a presentation with one value too long for an id renders every agent control through the registry, in either order (added after local review).

E2E

Not run live. Discord component clicks need a real user client: bots cannot click components, and the Discord E2E skill treats component clicks as manual (.agents/skills/discord-e2e/features.md). No computer-control node was available for a manual click. A maintainer can verify by sending a presentation button with the message tool, restarting the Gateway (or waiting 30 minutes), and tapping it.

Size

  • Production: +115 / −126 (net −11).
  • Tests/docs: −185 net (legacy handler tests removed).

Buttons and selects that a message action authors are now stateless: a button
carries its core-marked value in its custom id and a select carries it in its
option values, so a tap needs no registry entry and survives restarts and the
callback TTL. A tap runs the normal sender checks, offers the value to a plugin
first, consumes the message's controls, and reaches the conversation's agent as
callback_data. The unused legacy agent:/agentsel: system-event handlers are
replaced by this path.

Co-authored-by: obviyus <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord size: L labels Nov 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR carries agent-authored Discord callback values in controls so supported buttons and selects survive registry expiry and Gateway restarts.

Example: Tap an agent-authored Discord button with callback value pick:a after 31 minutes.

  • Before: Discord replies “This component has expired,” and the agent receives nothing.
  • After: The stateless handler delivers callback_data: pick:a to the conversation’s agent.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful, scoped direction with meaningful regression coverage, but required real behavior evidence is absent and three actionable defects remain.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users tap an older agent-authored Discord choice and receive an expired-component response instead of reaching the agent.
Reason: Removing the registry lifetime dependency has clear value, and maintainer authorship settles the explicitly recorded behavioral tradeoffs.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep open: this maintainer-authored PR addresses a real expiry bug, but plugin dispatch can bypass control consumption, and new production assertions fail the safety ratchet.

Priority: P2
Reviewed head: 6350e8a369651c95f0c6988620a6792acd453cf1

Before merge

  • Consume single-use controls when a plugin handles the callback (P2) - Send an agent-authored callback button with value poll:vote while a matching plugin handles that namespace and replies without clearing components. This return skips the only control-removal operation, and stateless controls have no registry entry to consume. The button and its siblings remain usable, so another click invokes the plugin again despite the documented always-single-use behavior. Ensure successful plugin handling also settles the source controls while preserving the plugin response.
  • Edit the acknowledged message when a matching plugin declines (P2) - For a marked callback such as example:decline, a matching plugin can return handled:false. The shared dispatcher calls onMatched first, and dispatchPluginDiscordInteractiveEvent acknowledges the interaction before returning unmatched. interaction.update always attempts another initial callback, so it throws “Discord interaction has already been acknowledged.” The catch still dispatches the agent turn but leaves every control active, allowing repeated actions. Use the existing edit path for an acknowledged interaction rather than sending a second initial callback.
  • Remove the new unchecked production assertions (P2) - withoutActionRows adds two non-const assertions, at this line and the return projection, without an applicable safety invariant or baseline allowance. The assertion-safety scanner includes this production file and counts both, which explains the diff-caused assertion-safety failure reported by checks-fast-baseline-ratchets. Accept and transform the concrete Discord component union instead of erasing its types and asserting the result; do not increase the baseline.

Findings

  • [P2] Consume single-use controls when a plugin handles the callback — extensions/discord/src/monitor/agent-components.system-controls.ts:75-76
  • [P2] Edit the acknowledged message when a matching plugin declines — extensions/discord/src/monitor/agent-components.system-controls.ts:79-81
  • [P2] Remove the new unchecked production assertions — extensions/discord/src/monitor/agent-components.system-controls.ts:23-25

Tests

  • Missing end-to-end proof: Provide a redacted real Discord send, restart or expiry, user click, control-consumption, and agent-result trace, plus a latest-stable upgrade check retaining existing registry-backed controls; remove keys, IPs, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The Discord plugin renders portable presentations into Discord components, admits incoming interactions through existing access checks, offers callbacks to plugins, and dispatches unclaimed values into conversation turns.

flowchart LR
A[Message tool presentation] --> B[Discord component renderer]
B --> C[Value carried in control]
C --> D[Discord user interaction]
D --> E[Existing access checks]
E --> F[Plugin dispatcher]
F --> G[Conversation agent]
Loading

Technical review

Best possible solution:

Keep stateless encoding and existing admission owners, make control consumption work across plugin response states, and replace unchecked component casts with concrete Discord types.

Do we have a high-confidence way to reproduce the issue?

Current-main rendering requires registry entries whose default lifetime is 30 minutes, and the resolver rejects expired entries before callback dispatch; no target code was executed.

Is this the best way to solve the issue?

Carrying short agent-owned values in Discord controls removes the lifetime dependency using existing owners, but the plugin branches must preserve the promised single-use behavior.

Full review comments:

  • [P2] Consume single-use controls when a plugin handles the callback — extensions/discord/src/monitor/agent-components.system-controls.ts:75-76
    Send an agent-authored callback button with value poll:vote while a matching plugin handles that namespace and replies without clearing components. This return skips the only control-removal operation, and stateless controls have no registry entry to consume. The button and its siblings remain usable, so another click invokes the plugin again despite the documented always-single-use behavior. Ensure successful plugin handling also settles the source controls while preserving the plugin response.
    Confidence: 0.98
  • [P2] Edit the acknowledged message when a matching plugin declines — extensions/discord/src/monitor/agent-components.system-controls.ts:79-81
    For a marked callback such as example:decline, a matching plugin can return handled:false. The shared dispatcher calls onMatched first, and dispatchPluginDiscordInteractiveEvent acknowledges the interaction before returning unmatched. interaction.update always attempts another initial callback, so it throws “Discord interaction has already been acknowledged.” The catch still dispatches the agent turn but leaves every control active, allowing repeated actions. Use the existing edit path for an acknowledged interaction rather than sending a second initial callback.
    Confidence: 0.99
  • [P2] Remove the new unchecked production assertions — extensions/discord/src/monitor/agent-components.system-controls.ts:23-25
    withoutActionRows adds two non-const assertions, at this line and the return projection, without an applicable safety invariant or baseline allowance. The assertion-safety scanner includes this production file and counts both, which explains the diff-caused assertion-safety failure reported by checks-fast-baseline-ratchets. Accept and transform the concrete Discord component union instead of erasing its types and asserting the result; do not increase the baseline.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6502a5769c0e.

Provenance checked

  • Discord callback expiry changes intended behavior with a stated reason (8654353: History records bounding component registry expiry; native components and forms retain that bounded registry.)
  • Reusable presentation buttons changes intended behavior with a stated reason (Preserve reusable Discord presentation buttons #84187: Preserve repeatable actions such as refresh and more-detail through portable presentation mapping; this PR explicitly accepts single-use agent controls instead.)
  • Single-use sibling consumption keeps the original intent (c76ee64: Prevent sibling callbacks from firing after the first authorized choice; the replacement intends to remove the message’s action rows.)
  • Marked callback delivery keeps the original intent (fix: agent-authored message buttons reach the agent on every channel #201764: Offer the inner callback value to plugins and deliver unclaimed agent-owned values as callback_data; stateless Discord transport was explicitly deferred.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test extensions/discord/src/monitor/monitor.agent-components.test.ts extensions/discord/src/monitor/monitor.test.ts extensions/discord/src/internal/interactions.test.ts
  • pnpm check:assertion-safety
  • pnpm tsgo:extensions
  • pnpm check:test-types
  • git diff --check

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit cd2ae19 adds extensions/discord/src/monitor/agent-components.ts:126 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cd2ae19272a3; files: extensions/discord/src/monitor/agent-components.ts)

PR surface

Source -11, Tests -187, Docs +2. Total -196 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 115 126 -11
Tests 2 174 361 -187
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 292 488 -196

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Expired presentation controls break a bounded Discord interaction workflow while ordinary messaging remains available.
  • add merge-risk: 🚨 compatibility: The maintainer-authored body accepts changing reusable presentation controls to single use and routing taps to the conversation session instead of the stored sending session.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Expired presentation controls break a bounded Discord interaction workflow while ordinary messaging remains available.
  • merge-risk: 🚨 compatibility: The maintainer-authored body accepts changing reusable presentation controls to single use and routing taps to the conversation session instead of the stored sending session.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 19, 2026, 1:04 PM ET / 18:04 UTC.

obviyus and others added 6 commits November 19, 2026 23:37
… tapped

A tap removed every action row, so URL buttons and other controls vanished,
and `reusable: true` agent buttons worked only once. The tap now removes only
the agent's controls, and a reusable button keeps the message as it is.

Co-authored-by: obviyus <[email protected]>
A tap on a controls-only message could not remove its controls (Discord rejects empty messages), so every later tap reached the agent again. Disabling keeps the message intact and makes every non-reusable agent control single-use.

Co-authored-by: obviyus <[email protected]>
…one group

- Disable a single-use agent control before plugin dispatch, so a plugin-handled tap is
  consumed too; a handler that edits the source message replaces that update.
- If any agent value does not fit a stateless id, render all of the presentation's agent
  controls through the registry, one consumption group.
- Give plugin select handlers the selected option labels, as registry selects did.

Co-authored-by: obviyus <[email protected]>
…parser

The message tool path re-reads the generated spec with readDiscordComponentSpec, which
dropped internalCustomId, so agent buttons became registry buttons without a value. Keep
agent:/agentsel: ids; approval and question ids stay builder-only.

Co-authored-by: obviyus <[email protected]>
@obviyus

obviyus commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override for head 449bd60. Two checks are red, and this PR caused neither:

Every other check is green, and the local review of this exact head is clean (0 findings). The maintainer approved landing this PR as long as the red checks are shown to be unrelated.

@obviyus
obviyus merged commit a757a08 into main Nov 20, 2026
108 of 112 checks passed
@obviyus
obviyus deleted the fix-discord-stateless-agent-controls branch November 20, 2026 04:17
@obviyus

obviyus commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as a757a08. When the agent sends Discord presentation buttons and selects, and every value fits Discord's 100-character id, each control's id now carries its own value, so taps reach the conversation's agent as callback_data: <value> after the 30-minute registry TTL, eviction or a Gateway restart. A presentation with any value too long for the id stays registry-backed and keeps the TTL. A tap disables the agent's controls (single use) unless the control is reusable; text, links and other controls stay unchanged. Plugin handlers still claim their own values first and receive the selected labels. Proof: tests through the real send and tap path, red on base and green on head; a clean local review; green CI except an unrelated docs lint failure on main's release notes (override comment above). There was no live Discord click test, because our QA bots cannot click components; the maintainer accepted that gap.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
)

## Problem

On Discord, a button or select that the agent sends through the `message` tool (`presentation` with `action: { type: "callback" }` or a legacy `value`) stops working 30 minutes after it is sent, and after any Gateway restart that loses the in-memory registry: the tap answers "This component has expired." The agent never sees it. Follow-up to openclaw#201764, which made these taps reach the agent on every channel while the Discord callback is still registered.

## Root cause

Discord presentation controls get a random `occomp:cid=<id>` custom id, and the meaning of the tap lives only in the component registry (`extensions/discord/src/components.builders.ts:55-84`, select at `:194-244`), which expires after `agentComponents.ttlMs` (default 30 minutes) and is lost when persistence is unavailable. The resolver then replies "This component has expired." (`extensions/discord/src/monitor/agent-components.ts`, `handleDiscordComponentEvent`). Core already marks agent-authored values (openclaw#201764), so the value alone is enough to route the tap; it was just not carried by the component.

## Solution

Agent-authored controls are stateless:

- **Send** (`shared-interactive.ts`, `components.builders.ts`): a core-marked callback button gets the custom id `agent:<index>:<marked value>`; a select whose options are all core-marked gets `agentsel:<index>` and keeps the marked values as option values. No registry entry is written. The index keeps ids unique per message (duplicate values, several selects). The send-action parser (`components.parse.ts`, `readDiscordComponentSpec`), which re-reads the generated spec on the `message` tool path, keeps `agent:`/`agentsel:` ids; other internal ids (approvals, questions) stay builder-only.
- **Tap** (`monitor/agent-components.system-controls.ts`): the existing `agent`/`agentsel` component handlers, which no code path produced anymore, now handle these ids:
  1. the normal sender checks for components (`resolveAuthorizedComponentInteraction`: DM policy, pairing, guild/channel allowlists, policy freshness);
  2. single use unless the button sets `reusable: true` (carried in the id as `agent:<index>r:`): the tap response disables the agent's buttons and selects (Discord renders them greyed out and rejects further taps) and keeps the text, media, URL buttons and other controls unchanged; the message can never become empty. This happens before any handler runs, so a plugin-handled tap is single use too; a handler that edits the source message replaces that update;
  3. plugin first on the value (the core dispatcher strips the mark); select handlers get the selected option labels in `values`, as registry selects did;
  4. the value reaches the conversation's session as `callback_data: <value>` through the same dispatch as registry-backed components.
- Native `components` and forms keep the registry and `agentComponents.ttlMs`.

## What was deleted

- The legacy `agent:`/`agentsel:` system-event handler body (`[Discord component: … clicked by …]`), `parseAgentComponentData`, `ensureAgentComponentInteractionAllowed`, and their tests. Nothing produced these ids.
- Registry writes for agent-authored presentation controls.

## Accepted edges

- If any agent button value in a presentation does not fit Discord's 100-character custom id (values over about 90 characters), all of that presentation's agent controls use the registry path, one consumption group as before, and expire as before. Not dropped, not silent.
- Buttons sent before this change keep their registry entries and expire as before.
- A tap goes to the conversation's session (the normal inbound route of the channel and sender), not to the session that sent the message. This matches Telegram, Mattermost and Feishu after openclaw#201764, and it is what the agent-controls design specifies ("stateless taps re-run normal inbound auth and resolve the conversation session"). Before, Discord routed to the sender's session through the registry entry, which is the state that expires. Controls sent into a channel from another session (for example, a cron run) now reach that channel's session.

## Local review

- `[P2]` reusable buttons, `[P2]` URL buttons kept, `[P2]` empty container, `[P2]` controls-only message stayed tappable: fixed, with tests (consumed controls are now disabled instead of removed).
- `[P2]` plugin-handled tap skipped consumption, `[P2]` mixed short and long values, `[P2]` stateless select lost `values` for plugin handlers: fixed, with tests (red on `71786b2`, green on head).
- `[P1]` send parser dropped the generated agent ids on the `message` tool path (the earlier tests bypassed the parser): fixed. The tests now render through `readDiscordComponentSpec`; without the parser fix 8 of 11 fail.
- `[P1]` sender session route: conversation-session routing approved by the maintainer, see accepted edges.

## Tests (red on base `2887e01d8fa9`, green on head)

`extensions/discord/src/monitor/monitor.agent-components.test.ts` renders a core-marked presentation through the real builders, clears the in-memory and persistent registry (restart or TTL expiry), and routes the tap to the registered control the way the Discord client resolves custom ids.

| Test | Base | Head |
|---|---|---|
| typed callback button after the registry is gone → `callback_data: pick:a`, controls removed, plugin offered `::pick:a` | ✗ "This component has expired." | ✓ |
| legacy value button after the registry is gone → `callback_data: /pick a` | ✗ "This component has expired." | ✓ |
| select choice after the registry is gone → `callback_data: size:m` | ✗ | ✓ |
| tapper outside the allowlist → "You are not authorized to use this button.", no dispatch | ✗ | ✓ |
| duplicate values and two selects in one message → distinct custom ids | ✓ (guard) | ✓ |

Gates: Discord extension suite, `pnpm tsgo:extensions`, `pnpm check:test-types`, oxlint and oxfmt on changed files.

- `monitor.agent-components.test.ts`: tapping an agent button disables it and keeps a URL button in the same row; a `reusable` agent button leaves the message unchanged and still delivers `callback_data: refresh`; a controls-only message has its control disabled, so a second tap cannot fire ; a plugin-claimed tap disables the control and the handler runs once; a select handler gets `values: ["Medium"]`; a presentation with one value too long for an id renders every agent control through the registry, in either order (added after local review).

## E2E

Not run live. Discord component clicks need a real user client: bots cannot click components, and the Discord E2E skill treats component clicks as manual (`.agents/skills/discord-e2e/features.md`). No computer-control node was available for a manual click. A maintainer can verify by sending a presentation button with the `message` tool, restarting the Gateway (or waiting 30 minutes), and tapping it.

## Size

- Production: +115 / −126 (net **−11**).
- Tests/docs: −185 net (legacy handler tests removed).

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant