Skip to content

feat(chat): react to a bot's reply without waking it - #154

Merged
httpsphl merged 1 commit into
mainfrom
feat/reactions
Oct 4, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/reactions

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Part 5b of the ideas from 2026-10-04. As the owner chose: a reaction never wakes the bot; it goes with the owner's next message.

Daemon

  • reactions.set {botId, itemId, emoji} puts, changes or (with null) takes off the owner's reaction on one of the bot's replies. The emoji come from a fixed list (REACTIONS: 👍 ❤️ 😂 🎉 🙏 👀, exported to TS). not_found when the item is not in that bot's chat, validation when it is not a reply or the emoji is not in the list.
  • reactions.list {botId} and reaction.changed.
  • Table reactions (migration 0019), one per reply, with the reply quoted on one line (120 chars) and sent_in.
  • Every owner message (messages.send, and the answer to a question) takes the waiting reactions in the same transaction. The bot reads Reacted 👍 to: "…", one line each, above the rest. A changed reaction waits again; taking one off that already went tells nobody.
  • Deleting a bot removes its reactions first (spec 7.6 order).

App

  • A react button beside the reply button on the bot's replies opens the six emoji in a pill.
  • The reaction sits under the reply with "Scout sees it with your next message", then "Scout saw it". A click on it, or the same emoji again, takes it off.

Spec 8.9 (new), 9.3, 11.2, 11.3 and 12 updated.

Test plan

  • cargo fmt, clippy -D warnings, cargo test --workspace (new tests/reactions.rs, envelope test)
  • pnpm check (new reactions.test.tsx)
  • Preview: 🎉 on Scout's reply, waiting
  • Real Claude: react 👍 to an answer, send another message, and see the bot take the reaction into account

The owner puts one emoji on a reply (reactions.set, migration 0019).
Nothing goes to the bot then: every owner message takes the reactions
waiting for one, in the same transaction, and the bot reads a line per
reaction above the owner's words. The app shows the emoji under the
reply, saying whether the bot will see it or already did.
@httpsphl
httpsphl merged commit a86dc62 into main Oct 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant