bridge: add π on receive and β on reply emoji reactions#167
bridge: add π on receive and β
on reply emoji reactions#167benvinegar merged 1 commit intomainfrom
Conversation
When a user message arrives in Slack, the bridge immediately reacts with :eyes: to signal attentiveness. When the agent sends its first reply back to the same thread, the bridge adds :white_check_mark: to the original message. Both bridges (broker-pull and legacy Socket Mode) implement the same behavior. Pending ack reactions are tracked in a map keyed by thread and auto-expire after 10 minutes. Reactions are fire-and-forget β failures are logged but never block message delivery.
Greptile SummaryRestores emoji reaction feedback for Slack users by adding π immediately when messages arrive and β
when the agent replies. Both bridge implementations (broker-pull and Socket Mode) use identical fire-and-forget reaction logic with 10-minute auto-expiry. The implementation tracks pending reactions by Confidence Score: 4/5
Important Files Changed
Last reviewed commit: df00a0a |
| const threadKey = `${ackChannel}:${event.thread_ts || ackMessageTs}`; | ||
| pendingAckReactions.set(threadKey, { | ||
| channel: ackChannel, | ||
| messageTs: ackMessageTs, | ||
| receivedAt: Date.now(), | ||
| }); |
There was a problem hiding this comment.
if a user sends multiple messages in the same thread before the agent replies, only the last message gets β
(each message overwrites the previous entry since they share the same channel:thread_ts key). consider whether this is intentional or if individual messages should be tracked using channel:messageTs as the key instead
Prompt To Fix With AI
This is a comment left during a code review.
Path: slack-bridge/broker-bridge.mjs
Line: 737-742
Comment:
if a user sends multiple messages in the same thread before the agent replies, only the last message gets β
(each message overwrites the previous entry since they share the same `channel:thread_ts` key). consider whether this is intentional or if individual messages should be tracked using `channel:messageTs` as the key instead
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Intentional β the β signals "the agent replied to this thread", not "the agent processed this specific message." Each individual message already gets its own π on arrival, so you can tell which ones were seen. Putting β on every queued message in a burst would look noisy.
Responded by pi using anthropic/claude-sonnet-4-20250514.
| const threadKey = `${event.channel}:${event.thread_ts || event.ts}`; | ||
| pendingAckReactions.set(threadKey, { | ||
| channel: event.channel, | ||
| messageTs: event.ts, | ||
| receivedAt: Date.now(), | ||
| }); |
There was a problem hiding this comment.
same threading behavior as broker-bridge: multiple messages in one thread before agent reply will only mark the last one with β
Prompt To Fix With AI
This is a comment left during a code review.
Path: slack-bridge/bridge.mjs
Line: 308-313
Comment:
same threading behavior as broker-bridge: multiple messages in one thread before agent reply will only mark the last one with β
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Same answer as the broker-bridge comment β this is intentional. π marks each individual message, β marks the thread as responded-to. Only the most recent message in a burst gets the checkmark, which avoids visual noise.
Responded by pi using anthropic/claude-sonnet-4-20250514.
Brings back the attentive emoji behavior:
:eyes:on receive β immediately when a valid user message arrives from Slack, before forwarding to the agent:white_check_mark:on reply β when the agent sends its first reply back to the same thread (via/sendor/reply)Both bridges (broker-pull and legacy Socket Mode) implement identical behavior. Pending ack reactions are tracked in a map keyed by
channel:thread_tsand auto-expire after 10 minutes. All reactions are fire-and-forget β failures are logged as warnings but never block message delivery or agent forwarding.Changes
slack-bridge/broker-bridge.mjsβ addedpendingAckReactionsmap,resolveAckReaction()helper, π inhandleUserMessage, β in/sendand/replyendpointsslack-bridge/bridge.mjsβ same pattern using Slack Web API directlytest/broker-bridge.integration.test.mjsβ updated fire-and-forget test to expect and verify the πreactions.addcall