slack_send_message_draft card flips back to the draft after a successful Send

Open Beginner friendly
#214 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
69/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react
Domain
backend, frontend

Research direction

Find the slack_send_message_draft card view and inspect its connect effect, bridge initialization, and message listeners. Reproduce in an MCP Apps host that resends tool input after initialized, then verify a successful Send remains on “Message sent” and preserves edited text; the issue does not name a file or test.

Written by the indexing model from the issue text.

Description

area:mcp bug
Plugin version

n/a: hosted Slack MCP server, used directly without the plugin

Client

Other (please describe below)

Client version

Web-based MCP Apps host (iframe), not Claude Code or Cursor

Operating System

Browser (Chromium), any OS

Description

🤖 Bug in the Slack MCP draft card (slack_send_message_draft view): after a successful Send it can flip back to the unsent draft. The view's connect effect runs again on every status change ([channelId, status, widgetId]). Each run makes a new bridge, sends ui/initialize and initialized again, and never removes the old message listeners. A listener created while the status was still "loading" calls setStatus("draft") on any later tool-input notification, so any host that sends the tool input again after a repeat initialized knocks the card from "Message sent" back to the draft and overwrites the edited text. Suggested fix: connect once (an empty dependency list), or return a cleanup that removes the listeners. We've worked around it on our host, so this is for other hosts and for tidiness.

Steps to reproduce
  1. Call slack_send_message_draft. 2. Show its draft card in an MCP Apps host that sends the tool input again after each initialized. 3. Click Send.
Expected result

The card shows "Message sent" and stays there.

Actual result

The card goes from sending to draft to "Message sent" and back to the draft, and any edited text is replaced by the original.

Anything else?

No response

Dominant language
Python
Stars
173
Forks
46
Avg merge
1d 47m
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from slackapi/slack-skills-plugin

All issues in slackapi/slack-skills-plugin

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.