Skip to content

Replace 'thinking' message with a reaction on the user's message #28

Closed

Description

@scarolan

The current pattern in app.js — post a "thinking" message, call the LLM, delete the message, post the reply — works but feels clunky and creates message churn. Delete failures need to be logged around.

Proposal

When a message comes in that will be routed to the LLM:

  1. reactions.add :brain: (or :hourglass_flowing_sand:) to the user's message
  2. Call handleMessage
  3. reactions.remove the reaction
  4. Post the reply

Cleaner Slack UX, no posted-then-deleted message, no race on chat.delete failures.

Touch points

  • postThinking / clearThinking helpers in app.js → replace with addThinkingReaction / removeThinkingReaction.
  • Both message handlers (general + direct mention).
  • Update tests if any cover the thinking UX.

Caveat

DMs require the bot to have reactions:write scope. Check manifest.yaml and re-sync if needed.

Activity

  1. scarolan commented on Jun 14, 2026

    @scarolan
    OwnerAuthor

    Shipped on main as part of the work merged via PR #30.

    :brain: reaction added to user message before processing, removed before reply. Replaces the old post-thinking-message-then-delete dance. Cleaner Slack history, no message churn.

    Requires reactions:read and reactions:write scopes — both added to manifest.yaml. The Slack app manifest had to be re-synced AND the app reinstalled to the workspace before the new scopes took effect; without the reinstall, every reactions.add call failed silently with missing_scope and the bot looked unresponsive while it was actually working fine. Captured in CLAUDE.md "Model selection notes" for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions