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:
reactions.add :brain: (or :hourglass_flowing_sand:) to the user's message
- Call
handleMessage
reactions.remove the reaction
- 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.
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:
reactions.add:brain:(or:hourglass_flowing_sand:) to the user's messagehandleMessagereactions.removethe reactionCleaner Slack UX, no posted-then-deleted message, no race on
chat.deletefailures.Touch points
postThinking/clearThinkinghelpers inapp.js→ replace withaddThinkingReaction/removeThinkingReaction.Caveat
DMs require the bot to have
reactions:writescope. Checkmanifest.yamland re-sync if needed.