Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Reactions: thumbs up or down reaches the bot quietly in its next turn, without a new post (#7575)
Milind Sonic95c60ec0511
diff --git a/docs/verification/reactions.md b/docs/verification/reactions.mdindex 6c83e37098..2bf49a33fc 100644--- a/docs/verification/reactions.md+++ b/docs/verification/reactions.md@@ -1,10 +1,13 @@# Reactions-A person reacts to a message from the chat's action row. A 👍 or 👎 on a bot's-message is their reply to it and reaches that bot at once; ❤️ 😂 🎉 👀 never-start a turn and reach the bot with the person's next message. The rule lives-in `server/reactions.ts`, the route in `server/routes/reactions.ts`, and the-reply itself goes the way a late answer to a question card goes+A person reacts to a message from the chat's action row. A 👍 on a bot's+message is their reply to it ("yes, go ahead") and reaches that bot at once. A+👎, like ❤️ 😂 🎉 👀, posts nothing and starts no turn: the bot reads it once, in+its next turn: in a 1:1 conversation ahead of the person's next message, in a+room in its next turn in any of the room's conversations. A 👎 still answers an+open card (deny, or no) and a line in a person's inbox. The rule lives in+`server/reactions.ts`, the route in `server/routes/reactions.ts`, and a 👍+reply goes the way a late answer to a question card goes(`server/person-replies.ts`).## Server@@ -26,9 +29,12 @@ data. A second 👍 with `on: true`, or taking the 👍 back andsetting it again, delivers nothing: the bot already has that answer. A ❤️ onthe reply answers `delivery: "noted"`, starts no turn, and opens the next typedturn's prompt with `(User reacted ❤️ to your message “Sent it to Sam.”.)`.-Changing the question's 👍 to 👎 and back to 👍 starts a turn for each change,-whose prompts read the 👎 as no and the 👍 as yes. The system prompt tells the-bot to ask a plain yes or no in one sentence instead of a widget.+Changing the question's 👍 to 👎 answers `delivery: "noted"`, adds no line and+starts no turn; the person's next typed message opens with `(User reacted 👎 to+your message “I drafted the email to Sam. Shall I send it?”.)` exactly once,+and the turn after that does not repeat it. The system prompt tells the bot to+ask a plain yes or no in one sentence instead of a widget, that a 👍 comes back+as the reply and a 👎 as a note with the next message.Another test reacts 👍 to a new bot's greeting: the bot answers, and theconversation keeps its untitled name instead of being named "👍".@@ -40,8 +46,13 @@ engine receives `allow` and `deny`, and each card recordsThe room test runs a room: a 👍 on Otter's question adds the room line`@Otter: 👍` and Otter answers; the room's conversation window shows the line-as `User: [reacted 👍 to Otter: “Shall I post the launch note?”]` and, after a-🎉, Otter's line with `(User reacted 🎉)` under it.+as `User: [reacted 👍 to Otter: “Shall I post the launch note?”]`. After a 🎉 on+Otter's reply, Otter's next turn opens with `(User reacted 🎉 to your message+“Posted it.”.)` once, and Otter's own lines carry no reaction marks in the+transcript it reads (other members still see `(User reacted 🎉)` under them).+A 👎 on that line adds no line and starts no turn, and reaches Otter's next turn+in another of the room's threads, once. These room notes are kept in memory: a+restart drops the ones not yet told.Evidence is written beside the fixture's server log as`<server-log>.reactions.json`, `<server-log>.reaction-cards.json` and@@ -54,8 +65,10 @@ pnpm exec vitest run server/bot-visibility.e2e.test.ts -t "reaction their own"```Ada's and Bob's 👍 sit side by side with their names, Ada's 👎 replaces only-her own, `GET /api/auth/session` returns each session's `reactor` key, and the-three replies reach the bot attributed to the person who reacted.+her own, `GET /api/auth/session` returns each session's `reactor` key, the two+👍 replies reach the bot attributed to the person who reacted, and Ada's 👎 adds+no line. The change streams to Bob, who sees the conversation; a reaction in a+conversation Bob cannot see streams to Ada and never to him.## Renderer@@ -93,7 +106,7 @@ pnpm control:omb ui console --ui $H```Expected: the open row is a toolbar named `Reactions` with six toggle buttons,-`Thumbs up: yes, go ahead` first and focused. After the click the question has+`Thumbs up: yes, go ahead` first and focused, then `Thumbs down`. After the click the question hasa group `Reactions` holding `Thumbs up: yes, go ahead: You`, no `👍` bubble isdrawn, and the bot's next message `Sent it to Sam.` follows by itself. From thekeyboard, Enter on a focused **Add reaction** opens the row, Arrow keys move,diff --git a/docs/verification/widget-prompts.md b/docs/verification/widget-prompts.mdindex 93f2ddd55a..15ce5a5f17 100644--- a/docs/verification/widget-prompts.md+++ b/docs/verification/widget-prompts.md@@ -52,7 +52,7 @@ Expect: A list to pick from. Choosing one and confirming sends it, on the Mac anDraft a two-line note to my team saying the release moved to Friday, and check with me before you send it.```-Expect: The draft and one short question such as "Shall I send it?", with no widget: a yes or no is answered in a word or with a 👍 or 👎 on that message ([Reactions](reactions.md)). After a 👍 the bot goes on by itself.+Expect: The draft and one short question such as "Shall I send it?", with no widget: a yes or no is answered in a word or with a 👍 on that message; a 👎 reaches the bot quietly with the person's next message ([Reactions](reactions.md)). After a 👍 the bot goes on by itself.### 7. Tablediff --git a/packages/phone-protocol/src/reactions.ts b/packages/phone-protocol/src/reactions.tsindex 72a78ac14c..44f5b55785 100644--- a/packages/phone-protocol/src/reactions.ts+++ b/packages/phone-protocol/src/reactions.ts@@ -1,4 +1,5 @@-// Reactions on chat messages. A 👍 or 👎 on a bot's message is the person's reply to it; the others say how they feel.+// Reactions on chat messages. A 👍 on a bot's message is the person's reply to it. A 👎 answers only an open card or a+// line in a person's inbox; elsewhere it, like the others, is quiet feedback the bot reads with its next turn./** Every reaction a client offers and the server accepts, in the order clients show them. */export const REACTIONS = ["👍", "👎", "❤️", "😂", "🎉", "👀"] as const;@@ -6,10 +7,10 @@ export type Reaction = (typeof REACTIONS)[number];/** What a reaction did, as POST /api/threads/:threadId/messages/:messageId/reactions reports it: a turn `started` with* it as the person's reply to that message, or the reply waits `queued` behind the running turn; the open card on the- * message was `answered`; a feeling the bot reads with its next turn (`noted`); or nothing reached a bot. */+ * message was `answered`; feedback the bot reads with its next turn (`noted`); or nothing reached a bot. */export type ReactionDelivery = "started" | "queued" | "answered" | "noted" | "none";-/** 👍 answers yes and 👎 answers no; any other reaction answers nothing. */+/** 👍 answers yes and 👎 answers no (👎 only on a card or an inbox line); any other reaction answers nothing. */export function reactionAnswer(emoji: string | null | undefined): "yes" | "no" | null {return emoji === "👍" ? "yes" : emoji === "👎" ? "no" : null;}diff --git a/server/bot-visibility.e2e.test.ts b/server/bot-visibility.e2e.test.tsindex 3957ec6a86..f07eb3c42f 100644--- a/server/bot-visibility.e2e.test.ts+++ b/server/bot-visibility.e2e.test.ts@@ -585,38 +585,58 @@ posixOnly("per-bot visibility on a shared workspace", () => {}}, 60_000);- it("keeps each person's reaction their own, sends each as that person's reply, and tells a session which are its", async () => {- expect((await api("POST", `/api/bots/${ids.pub}/messages`, { text: "Shall we open the desk early?", threadId: ids.pubThread }, BOSS)).status).toBe(202);- const replied = await settledReply(ids.pubThread, "Shall we open the desk early?");- expect(replied, log.slice(-2_000)).not.toBeNull();- const answer = (replied as Array<{ id: string; role: string; kind: string; text?: string }>)- .findLast((message) => message.role === "bot" && message.kind === "text" && message.text)!;- const react = (as: string, emoji: string) =>- api("POST", `/api/threads/${ids.pubThread}/messages/${answer.id}/reactions`, { emoji, on: true }, as);- const ada = await react(ADA, "👍");- expect(ada.status, JSON.stringify(ada.body)).toBe(200);- expect(ada.body.delivery).toBe("started");- const bob = await react(BOB, "👍");- expect(bob.status, JSON.stringify(bob.body)).toBe(200);- const keyOf = async (as: string) => (await api("GET", "/api/auth/session", undefined, as)).body.reactor as string;- const [adaKey, bobKey] = [await keyOf(ADA), await keyOf(BOB)];- expect(adaKey).toMatch(/^p_[\w-]{22}$/);- expect(bobKey).toMatch(/^p_[\w-]{22}$/);- expect(adaKey).not.toBe(bobKey);- expect(bob.body.message.reactions).toEqual([- { emoji: "👍", by: adaKey, name: "Ada", at: expect.any(Number) },- { emoji: "👍", by: bobKey, name: "Bob", at: expect.any(Number) },- ]);- const changed = await react(ADA, "👎");- expect(changed.body.message.reactions.map((reaction: any) => [reaction.by, reaction.emoji])).toEqual([[bobKey, "👍"], [adaKey, "👎"]]);- const lines = await waitFor(async () => {- const bot = (await api("GET", "/api/bots?messages=0", undefined, BOSS)).body.bots.find((candidate: any) => candidate.id === ids.pub);- const reactions = ((await api("GET", `/api/threads/${ids.pubThread}/messages`, undefined, BOSS)).body.messages as any[])- .filter((message) => message.reaction && message.replyToId === answer.id);- return !bot.busy && reactions.length === 3 ? reactions : null;- });- const thread = (await api("GET", `/api/threads/${ids.pubThread}/messages`, undefined, BOSS)).body.messages;- expect(lines?.map((line: any) => [line.reaction, line.sender?.name]), JSON.stringify(thread.map((m: any) => [m.role, m.kind, m.text?.slice(0, 60), m.reaction]))).toEqual([["👍", "Ada"], ["👍", "Bob"], ["👎", "Ada"]]);+ it("keeps each person's reaction their own, sends each 👍 as that person's reply and a 👎 quietly, and streams it only to who sees the thread", async () => {+ const watcher = openStream(BOB);+ const insider = openStream(ADA);+ try {+ expect(await watcher.ready()).toBeTruthy();+ expect(await insider.ready()).toBeTruthy();+ expect((await api("POST", `/api/bots/${ids.pub}/messages`, { text: "Shall we open the desk early?", threadId: ids.pubThread }, BOSS)).status).toBe(202);+ const replied = await settledReply(ids.pubThread, "Shall we open the desk early?");+ expect(replied, log.slice(-2_000)).not.toBeNull();+ const answer = (replied as Array<{ id: string; role: string; kind: string; text?: string }>)+ .findLast((message) => message.role === "bot" && message.kind === "text" && message.text)!;+ const react = (as: string, emoji: string, threadId = ids.pubThread, messageId = answer.id) =>+ api("POST", `/api/threads/${threadId}/messages/${messageId}/reactions`, { emoji, on: true }, as);+ const ada = await react(ADA, "👍");+ expect(ada.status, JSON.stringify(ada.body)).toBe(200);+ expect(ada.body.delivery).toBe("started");+ const bob = await react(BOB, "👍");+ expect(bob.status, JSON.stringify(bob.body)).toBe(200);+ const keyOf = async (as: string) => (await api("GET", "/api/auth/session", undefined, as)).body.reactor as string;+ const [adaKey, bobKey] = [await keyOf(ADA), await keyOf(BOB)];+ expect(adaKey).toMatch(/^p_[\w-]{22}$/);+ expect(bobKey).toMatch(/^p_[\w-]{22}$/);+ expect(adaKey).not.toBe(bobKey);+ expect(bob.body.message.reactions).toEqual([+ { emoji: "👍", by: adaKey, name: "Ada", at: expect.any(Number) },+ { emoji: "👍", by: bobKey, name: "Bob", at: expect.any(Number) },+ ]);+ const changed = await react(ADA, "👎");+ expect(changed.body.delivery).toBe("noted");+ expect(changed.body.message.reactions.map((reaction: any) => [reaction.by, reaction.emoji])).toEqual([[bobKey, "👍"], [adaKey, "👎"]]);+ expect(await waitFor(() => watcher.frames.some((f) => f.kind === "message.patch" && f.threadId === ids.pubThread+ && f.message?.id === answer.id && f.message.reactions?.some((reaction: any) => reaction.by === adaKey && reaction.emoji === "👎")))).toBe(true);+ const lines = await waitFor(async () => {+ const bot = (await api("GET", "/api/bots?messages=0", undefined, BOSS)).body.bots.find((candidate: any) => candidate.id === ids.pub);+ const reactions = ((await api("GET", `/api/threads/${ids.pubThread}/messages`, undefined, BOSS)).body.messages as any[])+ .filter((message) => message.reaction && message.replyToId === answer.id);+ return !bot.busy && reactions.length === 2 ? reactions : null;+ });+ const thread = (await api("GET", `/api/threads/${ids.pubThread}/messages`, undefined, BOSS)).body.messages;+ expect(lines?.map((line: any) => [line.reaction, line.sender?.name]), JSON.stringify(thread.map((m: any) => [m.role, m.kind, m.text?.slice(0, 60), m.reaction]))).toEqual([["👍", "Ada"], ["👍", "Bob"]]);++ const hidden = ((await api("GET", `/api/threads/${ids.hrThread}/messages`, undefined, BOSS)).body.messages as any[])+ .findLast((message) => message.role === "bot" && message.kind === "text" && message.text);+ expect(hidden).toBeTruthy();+ const seen = watcher.frames.length;+ expect((await react(ADA, "👎", ids.hrThread, hidden.id)).status).toBe(200);+ expect(await waitFor(() => insider.frames.some((f) => f.kind === "message.patch" && f.threadId === ids.hrThread && f.message?.id === hidden.id))).toBe(true);+ expect(JSON.stringify(watcher.frames.slice(seen))).not.toContain(ids.hrThread);+ } finally {+ watcher.close();+ insider.close();+ }}, 90_000);it("keeps bots with different audiences from reaching each other", async () => {diff --git a/server/host/room-transcript.test.ts b/server/host/room-transcript.test.tsindex 49bd649453..b22b6cdd22 100644--- a/server/host/room-transcript.test.ts+++ b/server/host/room-transcript.test.ts@@ -138,3 +138,14 @@ describe("isRoomContextMessage", () => {expect(isRoomContextMessage({ kind: "activity", text: "Bash" })).toBe(false);});});++describe("reactions in a room transcript", () => {+ it("shows them under another member's line, and leaves them off the reader's own, which hears of them once by note", () => {+ const lines = [+ row("mine", { role: "bot", text: "Draft one.", from: editor, reactions: [{ emoji: "👎", by: "p_ada", name: "Ada" }] }),+ row("theirs", { role: "bot", text: "Draft two.", from: writer, reactions: [{ emoji: "❤️", by: "p_ada", name: "Ada" }] }),+ ];+ const text = transcript(lines).window("room", "Omkar", undefined, "editor").text;+ expect(text).toBe("Editor: Draft one.\nWriter: Draft two.\n(Ada reacted ❤️)");+ });+});diff --git a/server/host/room-transcript.ts b/server/host/room-transcript.tsindex 875181e052..e6154d1781 100644--- a/server/host/room-transcript.ts+++ b/server/host/room-transcript.ts@@ -56,13 +56,14 @@ export function createRoomTranscript({ store, teammateReportContext }: RoomTransconst overridden = overrides.get(m.id);const rendered = overridden !== undefined ? { ...m, text: overridden } : m;const person = speakerOf(userName, m);+ const felt = readerBotId && m.from?.botId === readerBotId ? "" : roomReactionNote(m, userName);const speaker = m.role === "user" ? person : m.from ? peerName(m.from.name) : "Bot";const body = escapeNotes(transcriptText(rendered, messagesById, userName));// An outside app chose these words: the bot it is shown as reads the note too, and one JSON string cannot start a line of its own.if (m.webhookPost && m.role === "bot") return `${webhookPostNote(m.from?.name ?? "Bot")}\n${speaker}: ${JSON.stringify(body)}`;const note = lineNote(m, { shared: false, name: () => person });- if (note) return `${note}\n${speaker}: ${JSON.stringify(body)}${roomReactionNote(m, userName)}`;- const line = `${speaker}: ${body}${roomReactionNote(m, userName)}`;+ if (note) return `${note}\n${speaker}: ${JSON.stringify(body)}${felt}`;+ const line = `${speaker}: ${body}${felt}`;if (!m.peerPost || !m.from || m.from.botId === readerBotId) return line;return `${peerProvenanceNote({ botName: m.from.name, delivery: "post_to_room", unattended: m.peerPost.unattended })}\n${line}`;});diff --git a/server/index.ts b/server/index.tsindex f862ba22a0..fc63928897 100644--- a/server/index.ts+++ b/server/index.ts@@ -632,7 +632,7 @@ import { createToolTimingRoute, createUsageRoutes } from "./routes/usage.ts"; imimport { createBotMessageRoutes } from "./routes/bot-messages.ts";import { clearInternalTurn, isInternalTurn, markInternalTurn } from "./internal-turns.ts"; import { createFirstReplyRescue } from "./first-reply-rescue.ts";import { createReactionRoutes } from "./routes/reactions.ts";-import { createReactions, withReactionNotes, type Reactor } from "./reactions.ts";+import { createReactions, createRoomReactionNotes, withReactionNotes, type Reactor } from "./reactions.ts";import { createPersonReplies } from "./person-replies.ts";import { handedOwnServerLender, lendingPerson, lendingPersonKey, OWN_SERVER_LENDER, ownWindowLender, personKey, relayedPersonKey } from "./person-key.ts"; import { ownWindowLine } from "./own-window-sends.ts"; import { ownServerLendingRefusal } from "./own-server-lending-refusal.ts";import { createOutsideLineage, OUTSIDE_STAYS_HERE } from "./host/outside-lineage.ts"; import { OUTSIDE_REFUSAL, outsideRouteRefused } from "./host/outside-fence.ts"; import { createOutsideWrites } from "./host/outside-writes.ts";@@ -9945,7 +9945,7 @@ async function runClaimedGroupMemberTurn(bot.description && `About: ${bot.description}`,`Room members: ${roster}, and ${typeof userName === "string" ? `${userName} (the human)` : roomPeople(threadId, userName)}.`,readyGroup.bulletin.trim() && `Room bulletin (shared instructions for everyone):\n${readyGroup.bulletin.trim()}`,- `Reply as yourself, briefly and conversationally. To bring a teammate in, mention them like @Name — they'll see the conversation and respond.${readyGroup.dm ? "" : ` To get ${typeof userName === "string" ? `${userName}'s` : "a person's"} attention or ask them something blocking, write @you.`} A "[reacted 👍 to …]" line is that person's whole reply to the message it names: 👍 means yes, go ahead when that message asked them something or offered to do something, and only got it (start no new work) when it just told them something; 👎 means no.`,+ `Reply as yourself, briefly and conversationally. To bring a teammate in, mention them like @Name — they'll see the conversation and respond.${readyGroup.dm ? "" : ` To get ${typeof userName === "string" ? `${userName}'s` : "a person's"} attention or ask them something blocking, write @you.`} A "[reacted 👍 to …]" line is that person's whole reply to the message it names: 👍 means yes, go ahead when that message asked them something or offered to do something, and only got it (start no new work) when it just told them something. A "(… reacted 👎 …)" note, like any reaction in parentheses, is quiet feedback on the message it names or follows (👎: not that): weigh it, and start no new work for it alone.`,outsideRoom.length > 0 && roomPeerRosterSystemPrompt(outsideRoom), sharedNamesNote(roomMembers.filter((member) => member.id !== bot.id), Boolean(integrations.agents)),integrations.agents && (CREDENTIAL_PROMPT + botLogins.secretsPrompt(bot.id, vaultReaders.turn(threadId)) + (orchestration && !orchestration.roomHandoffId ? THREADS_PROMPT : "")).trim(),integrations.agents && (!orchestration || orchestration.roomHandoffId) && "For actual OpenMausBot teamwork, discover IDs with list_room_targets and use coordinate_bots for advice or work in this or another room. Do not substitute native coding helpers for these named bots. Consult only when needed to make a decision; no discussion step is mandatory. Give concrete responsibilities, exact accessible paths and acceptance checks. End your turn after assigning; busy teammates queue and results automatically resume you. When they return, finish the requested verification and give the user one final answer. Native helper names are not evidence that an OpenMausBot teammate participated. Plain @mentions are only for conversational replies in this room." + requesterRule,@@ -10161,7 +10161,7 @@ async function runClaimedGroupMemberTurn(}if (roomReset || displaced) broadcast({ kind: "group", group: publicGroupState(store.group(groupId) ?? group) });const roomShareNote = skillsHost.shareNote(bot, threadId, Boolean(workspace));- const clock = turnClockLine(Date.now(), hostTimeZone()), roomPick = cardContinuation ? "" : takeRoomPick(operation, readyBot.id); oneTimeInputTaken = Boolean(roomPick) || heldReplay.messageIds.length > 0;+ const clock = turnClockLine(Date.now(), hostTimeZone()), roomPick = cardContinuation ? "" : takeRoomPick(operation, readyBot.id) + roomReactionNotes.take(group.id, readyBot.id, userName); oneTimeInputTaken = Boolean(roomPick) || heldReplay.messageIds.length > 0;const roomToolScope = toolScopeForTurn(readyBot.id), roomUserMcp = claudeUserMcpEnabled(cfg) && !managedPolicy.restrictsMcp();const roomSession = roomSessions.dispatch({threadId, botId: readyBot.id, claimId: internalGeneration, instance, guestConfined: roomGuestConfined || roomLinkLimited, reset: Boolean(roomReset), hooks: Boolean(integrations.hooks),@@ -11939,8 +11939,8 @@ ROUTES.push(createBotMessageRoutes({const liveRoots = (threadId: string, botId: string | undefined) => { const bot = botId ? store.bot(botId) : store.botByThread(threadId); return bot ? messageFileRootsForThread(bot.id, threadId).filter((root) => root !== ATTACHMENTS_DIR) : null; }; const chatApps = createChatApps({ store, dataDir: DATA_DIR, liveRows: liveAppRows, liveRoots, paused: () => workspaceMaintenance.active || moveFreeze.frozen() });const chatAppsMcp = createChatAppsMcp({ store, apps: chatApps, dataDir: DATA_DIR, keys: mcpKeys, storedServers: () => cfg.mcpServers ?? {}, mountedServers: (bot) => teamConnections.engineMcp(bot), personMcp: teamConnections.personMcp, probeAs: (server) => mcpServersHost.probeAs(server), oauth: mcpOAuth });ROUTES.push(createChatAppRoutes({ store, apps: chatApps, threadRefusal: cloudThreadRefusal, mcpRpc: chatAppsMcp.rpc, threadVisible: (auth, threadId) => (auth.kind !== "session" || sessions.isLive(auth.session.id)) && visibleTo(viewerFor(auth)).thread(threadId) }));-const { react } = createReactions({- store, reply: (input) => teamMessages.reactedIn(input.auth, input.threadId, input.target.id, input.answer, { sendId: input.sendId, sender: messageSender(input.auth) }) ?? personReplies.deliver({ ...input, about: "message" }),+const roomReactionNotes = createRoomReactionNotes({ store }), { react } = createReactions({+ store, noted: roomReactionNotes.noted, inboxAnswer: (input) => teamMessages.reactedIn(input.auth, input.threadId, input.target.id, input.answer, { sendId: input.sendId, sender: messageSender(input.auth) }), reply: (input) => personReplies.deliver({ ...input, about: "message" }),answerCard: (input) => respondToCard({ ...input, via: "reaction" }), withdraw: personReplies.withdraw,});const publishedPages = createPublishedPages({ dataDir: DATA_DIR, cloudHome: CLOUD_HOME, selfHosted: !CLOUD_HOME && !HOSTED_WORKSPACE && utilityParentPort === undefined, patch: (threadId, messageId, text, publishedPage) => void store.patchMessage(threadId, messageId, { text, publishedPage }), liveRoots: (botId, threadId) => liveRoots(threadId, botId), paused: () => workspaceMaintenance.active || moveFreeze.frozen(), apps: { chat: chatApps, store } }); ROUTES.push(createReactionRoutes({ react, reactorFor, cloudGuestSendRefusal }), publishedPages.routes, createBotLibraryRoutes({ bot: (id) => store.bot(id), visibleFor: (auth) => visibleTo(viewerFor(auth)), pages: () => publishedPages.store.list() }), savedSteps.routes, createPlacesElsewhereRoutes({ elsewhere: placesElsewhere, owner: (auth) => !sharedMembership() && !HOSTED_WORKSPACE && (auth.kind === "loopback" || ownHome.owner(auth) || (CLOUD_PERSONAL && cloudOwnerSession(auth))) }));diff --git a/server/reaction-delivery-lifetime.test.ts b/server/reaction-delivery-lifetime.test.tsindex 9548b9383f..7c613eb3a5 100644--- a/server/reaction-delivery-lifetime.test.ts+++ b/server/reaction-delivery-lifetime.test.ts@@ -13,7 +13,7 @@ const OWNER: RequestAuth = { kind: "loopback", scopes: ["admin", "client"] };const deferred = () => { let resolve!: () => void; const promise = new Promise<void>((done) => { resolve = done; }); return { promise, resolve }; };beforeEach(() => { rmSync(DATA_DIR, { recursive: true, force: true }); restoreSteeredMessages(); });-function harness(queued = true) {+function harness(queued = true, inbox = false) {const store = new Store(() => ({ instanceId: "fixture", model: "fixture" }));const bot = store.createBot({ name: "Scout" });const asked = store.appendMessage(bot.threadId, { role: "bot", kind: "text", text: "Shall I send the email?" });@@ -30,7 +30,11 @@ function harness(queued = true) {return { queued: true };},});- const reactions = createReactions({ store, reply: (input) => replies.deliver({ ...input, about: "message" }), answerCard: async () => ({ ok: true }), withdraw: replies.withdraw });+ const deliver = (input: Parameters<typeof replies.deliver>[0]) => replies.deliver(input);+ const reactions = createReactions({+ store, reply: (input) => deliver({ ...input, about: "message" }), inboxAnswer: (input) => inbox ? deliver({ ...input, about: "message" }) : null,+ answerCard: async () => ({ ok: true }), withdraw: replies.withdraw,+ });const tap = (emoji: "👍" | "👎", by = "user") => reactions.react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji, reactor: { by } });return { bot, store, tap, entered, release, sends };}@@ -49,10 +53,31 @@ it("withdraws a queued answer that finishes after its reaction was cleared", asyexpect(queuedSteeredMessage(h.bot.id, h.bot.threadId, h.sends[0]!)).toBeNull();});-it("keeps a newer opposite answer when the older queued answer finishes last", async () => {+it("retires an older 👍 still on its way when the person switches to a quiet 👎", async () => {const h = harness();const first = h.tap("👍");await h.entered.promise;+ expect((await h.tap("👎")).delivery).toBe("noted");+ h.release.resolve();+ expect((await first).delivery).toBe("none");+ expect(queuedSteeredMessage(h.bot.id, h.bot.threadId, h.sends[0]!)).toBeNull();+ expect(h.sends).toHaveLength(1);+});++it("does not let another person's quiet 👎 retire this person's 👍", async () => {+ const h = harness();+ const first = h.tap("👍", "alice");+ await h.entered.promise;+ expect((await h.tap("👎", "bob")).delivery).toBe("noted");+ h.release.resolve();+ expect((await first).delivery).toBe("queued");+ expect(h.sends.map((id) => queuedSteeredMessage(h.bot.id, h.bot.threadId, id)?.text)).toEqual(["👍"]);+});++it("on an inbox line, keeps a newer opposite answer when the older queued answer finishes last", async () => {+ const h = harness(true, true);+ const first = h.tap("👍");+ await h.entered.promise;expect((await h.tap("👎")).delivery).toBe("queued");h.release.resolve();const result = await first;@@ -61,8 +86,8 @@ it("keeps a newer opposite answer when the older queued answer finishes last", aexpect(queuedSteeredMessage(h.bot.id, h.bot.threadId, h.sends[1]!)?.text).toBe("👎");});-it("does not let another person's reaction retire this person's answer", async () => {- const h = harness();+it("on an inbox line, does not let another person's answer retire this person's answer", async () => {+ const h = harness(true, true);const first = h.tap("👍", "alice");await h.entered.promise;expect((await h.tap("👎", "bob")).delivery).toBe("queued");diff --git a/server/reactions.e2e.test.ts b/server/reactions.e2e.test.tsindex d2a8ecbab8..7bd4e64947 100644--- a/server/reactions.e2e.test.ts+++ b/server/reactions.e2e.test.ts@@ -7,7 +7,7 @@ import { expect, it } from "vitest";import { launchVerificationServer } from "../scripts/control-omb.ts";import { removeTempDir } from "./testing/cleanup.ts";-it("answers a bot's yes-or-no question with a 👍, and the bot goes on by itself", async () => {+it("answers a bot's yes-or-no question with a 👍, and the bot goes on by itself; a 👎 reaches its next turn quietly, once", async () => {const scratch = mkdtempSync(join(tmpdir(), "omb-reactions-"));const promptLog = join(scratch, "prompts.jsonl");const fixture = await launchVerificationServer({@@ -61,7 +61,7 @@ it("answers a bot's yes-or-no question with a 👍, and the bot goes on by itsel]);expect(prompts()).toHaveLength(2);expect(JSON.parse(readFileSync(fixture.fixtureDumpPath, "utf8")).systemPrompt).toContain(- "A plain yes or no needs no widget: ask in one short sentence; a word or 👍/👎 on your message comes back as their reply.");+ "A plain yes or no needs no widget: ask in one short sentence; a word or 👍 on your message comes back as their reply, and a 👎 reaches you as a note with their next message.");const reactionPrompt = prompts()[1]!;evidence.push({ reactionPrompt });expect(reactionPrompt).toContain("The current message is the person's reaction: they reacted 👍 to your earlier message instead of typing a reply.");@@ -86,15 +86,22 @@ it("answers a bot's yes-or-no question with a 👍, and the bot goes on by itselexpect(thanks).toMatch(/\(\S+ reacted ❤️ to your message “Sent it to Sam\.”\.\)\n\nThanks!/);expect(thanks).not.toContain("reacted 👍");- expect(await react(asked.id, "👎", true)).toMatchObject({ delivery: "started", message: { reactions: [{ emoji: "👎", by: "user" }] } });+ const lines = (await transcript()).length;+ expect(await react(asked.id, "👎", true)).toMatchObject({ delivery: "noted", message: { reactions: [{ emoji: "👎", by: "user" }] } });+ expect((await api("GET", "/api/bots?messages=0")).bots.find((candidate: any) => candidate.id === bot.id).busy).toBeFalsy();+ expect(await transcript()).toHaveLength(lines);+ expect(prompts()).toHaveLength(3);+ await api("POST", `/api/bots/${bot.id}/messages`, { threadId: bot.threadId, text: "Actually, wait." }, 202);await settled("Understood: I'll recall it.");- expect(prompts()[3]).toContain("they reacted 👎 to your earlier message instead of typing a reply.\n👎 means no, not that.");- expect(await react(asked.id, "👍", true)).toMatchObject({ delivery: "started" });+ const quiet = prompts()[3]!;+ evidence.push({ quiet });+ expect(quiet.match(/\(\S+ reacted 👎 to your message “I drafted the email to Sam\. Shall I send it\?”\.\)/g)).toHaveLength(1);+ expect(quiet).toMatch(/reacted 👎 to your message “I drafted the email to Sam\. Shall I send it\?”\.\)\n\nActually, wait\./);+ await api("POST", `/api/bots/${bot.id}/messages`, { threadId: bot.threadId, text: "Fine." }, 202);await settled("Then it stays sent.");- expect(prompts()[4]).toContain("they reacted 👍 to your earlier message instead of typing a reply.\n👍 answers that message. If it asked them something or offered to do something, 👍 means yes, go ahead");+ expect(prompts()[4]).not.toContain("reacted 👎");const answers = (await transcript()).filter((message) => message.reaction);- expect(answers.map((message) => [message.reaction, message.sendId.slice(-1)])).toEqual([["👍", "y"], ["👎", "n"], ["👍", "y"]]);- expect(new Set(answers.map((message) => message.sendId)).size).toBe(3);+ expect(answers.map((message) => [message.reaction, message.sendId.slice(-1)])).toEqual([["👍", "y"]]);const session = await api("GET", "/api/auth/session");expect(session).not.toHaveProperty("reactor");@@ -193,11 +200,11 @@ it("allows an open approval with a 👍 on its card and denies one with a 👎",}}, 90_000);-it("in a room, gives the 👍 to the member that asked, by name", async () => {+it("in a room, gives the 👍 to the member that asked, by name, and a 👎 to its next turn anywhere in the room, quietly", async () => {const scratch = mkdtempSync(join(tmpdir(), "omb-reaction-room-"));const promptLog = join(scratch, "prompts.jsonl");const fixture = await launchVerificationServer({- FAKE_CLAUDE_REPLIES: JSON.stringify(["Shall I post the launch note?", "Posted it.", "Noted."]),+ FAKE_CLAUDE_REPLIES: JSON.stringify(["Shall I post the launch note?", "Posted it.", "Noted.", "On the pricing now."]),FAKE_CLAUDE_REPLY_STATE: join(scratch, "reply-state"),FAKE_CLAUDE_TOOL_CALLS: "[]",FAKE_CLAUDE_PROMPTS: promptLog,@@ -237,7 +244,7 @@ it("in a room, gives the 👍 to the member that asked, by name", async () => {expect(answered).toContain(": [reacted 👍 to Otter: “Shall I post the launch note?”]");expect(answered).not.toContain("@Otter: 👍");expect(JSON.parse(readFileSync(fixture.fixtureDumpPath, "utf8")).systemPrompt)- .toContain("A \"[reacted 👍 to …]\" line is that person's whole reply to the message it names: 👍 means yes, go ahead when that message asked them something or offered to do something, and only got it (start no new work) when it just told them something; 👎 means no.");+ .toContain("A \"[reacted 👍 to …]\" line is that person's whole reply to the message it names: 👍 means yes, go ahead when that message asked them something or offered to do something, and only got it (start no new work) when it just told them something. A \"(… reacted 👎 …)\" note, like any reaction in parentheses, is quiet feedback on the message it names or follows (👎: not that): weigh it, and start no new work for it alone.");const posted = after.find((message) => message.text === "Posted it.");expect(await api("POST", `/api/threads/${room.threadId}/messages/${posted.id}/reactions`, { emoji: "🎉", on: true }))@@ -246,7 +253,21 @@ it("in a room, gives the 👍 to the member that asked, by name", async () => {await settled("Noted.");const thanked = prompts()[2]!;evidence.push({ thanked });- expect(thanked).toMatch(/Otter: Posted it\.\n\(\S+ reacted 🎉\)/);+ expect(thanked.match(/\(\S+ reacted 🎉 to your message “Posted it\.”\.\)/g)).toHaveLength(1);+ expect(thanked).not.toMatch(/Otter: Posted it\.\n\(/);++ const roomLines = (await transcript()).length;+ expect(await api("POST", `/api/threads/${room.threadId}/messages/${posted.id}/reactions`, { emoji: "👎", on: true }))+ .toMatchObject({ delivery: "noted" });+ expect(await transcript()).toHaveLength(roomLines);+ expect(prompts()).toHaveLength(3);+ const pricing = (await api("POST", `/api/groups/${room.id}/tasks`, { title: "Pricing" }, 201)).task;+ await api("POST", `/api/groups/${room.id}/messages`, { threadId: pricing.threadId, text: "@Otter start on pricing." }, 202);+ await expect.poll(async () => (await api("GET", `/api/threads/${pricing.threadId}/messages`)).messages+ .some((message: any) => message.text === "On the pricing now."), { timeout: 20_000 }).toBe(true);+ const elsewhere = prompts()[3]!;+ evidence.push({ elsewhere });+ expect(elsewhere.match(/reacted 👎 to your message “Posted it\.”/g)).toHaveLength(1);} finally {writeFileSync(`${fixture.info.logPath}.reaction-room.json`, JSON.stringify(evidence, null, 2));await fixture.close();diff --git a/server/reactions.test.ts b/server/reactions.test.tsindex a17363fa7b..b1049e5603 100644--- a/server/reactions.test.ts+++ b/server/reactions.test.ts@@ -4,7 +4,7 @@ import { beforeEach, describe, expect, it } from "vitest";import type { OptionCardData } from "../shared/wire.ts";import { DATA_DIR } from "./config.ts";import type { ModelSelection } from "./contracts.ts";-import { cardReply, createReactions, reactionSendPrefix, roomReactionNote, withReactionNotes, type ReactionDeps } from "./reactions.ts";+import { cardReply, createReactions, createRoomReactionNotes, reactionSendPrefix, roomReactionNote, withReactionNotes, type ReactionDeps } from "./reactions.ts";import type { RequestAuth } from "./request-auth.ts";import { Store, type Message } from "./store.ts";@@ -15,12 +15,13 @@ const BOB = { by: "p_bob", name: "[email protected]" };beforeEach(() => rmSync(DATA_DIR, { recursive: true, force: true }));-function fixture(options: { queued?: boolean; refuse?: Error } = {}) {+function fixture(options: { queued?: boolean; refuse?: Error; inbox?: boolean } = {}) {const store = new Store(() => sonnet);const bot = store.createBot({ name: "Scout" });const calls = { replies: [] as Parameters<ReactionDeps["reply"]>[0][], cards: [] as Parameters<ReactionDeps["answerCard"]>[0][], withdrawn: [] as string[] };const deps: ReactionDeps = {store,+ inboxAnswer: (input) => options.inbox ? deps.reply(input) : null,reply: async (input) => {calls.replies.push(input);if (options.refuse) throw options.refuse;@@ -60,7 +61,39 @@ describe("a reaction on a bot's message", () => {it("says when the reply waits behind the running turn", async () => {const { bot, react, say } = fixture({ queued: true });- expect((await react({ auth: OWNER, threadId: bot.threadId, messageId: say().id, emoji: "👎", reactor: { by: "user" } })).delivery).toBe("queued");+ expect((await react({ auth: OWNER, threadId: bot.threadId, messageId: say().id, emoji: "👍", reactor: { by: "user" } })).delivery).toBe("queued");+ });++ it("keeps a 👎 quiet: posts nothing and starts no turn, and takes back a 👍 it replaces that still waits", async () => {+ const { store, bot, calls, react, say } = fixture({ queued: true });+ const asked = say();+ const before = store.messagesFor(bot.threadId).length;+ expect((await react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👍", reactor: { by: "user" } })).delivery).toBe("queued");+ const changed = await react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👎", reactor: { by: "user" } });+ expect(changed).toMatchObject({ delivery: "noted", message: { reactions: [{ emoji: "👎", by: "user", at: expect.any(Number) }] } });+ expect(calls.replies.map((reply) => reply.answer)).toEqual(["👍"]);+ expect(calls.withdrawn).toEqual([calls.replies[0]!.sendId]);+ expect(store.messagesFor(bot.threadId)).toHaveLength(before);+ const removed = await react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👎", reactor: { by: "user" }, on: false });+ expect(removed).toMatchObject({ delivery: "none", message: { reactions: undefined } });+ });++ it("reaches the bot's next turn with a 👎 once, and its turn after that no more", () => {+ const line = (patch: Partial<Message>): Message => ({ id: "x", at: 0, role: "bot", kind: "text", text: "Here is the plan.", ...patch });+ const path = [+ line({ id: "b1", at: 1, reactions: [{ emoji: "👎", by: "p_mira", name: "Mira", at: 5 }] }),+ line({ id: "u1", at: 6, role: "user", text: "Try again" }),+ line({ id: "b2", at: 7, text: "Second plan." }),+ line({ id: "u2", at: 8, role: "user", text: "Better" }),+ ];+ expect(withReactionNotes("Try again", path.slice(0, 2), new Set(["u1"]), "Milind"))+ .toBe("(Mira reacted 👎 to your message “Here is the plan.”.)\n\nTry again");+ expect(withReactionNotes("Better", path, new Set(["u2"]), "Milind")).toBe("Better");+ });++ it("never makes a note of a reaction on an open card, which it answers", () => {+ const card = { id: "c1", at: 1, role: "bot", kind: "options", text: "Run it?", card: { requestId: "r1", options: [] }, reactions: [{ emoji: "👎", by: "user", at: 5 }] } as unknown as Message;+ expect(withReactionNotes("Next", [card, { id: "u1", at: 6, role: "user", kind: "text", text: "Next" }], new Set(["u1"]), "Milind")).toBe("Next");});it("delivers a double tap once: setting the same reaction again changes nothing", async () => {@@ -86,8 +119,8 @@ describe("a reaction on a bot's message", () => {expect(calls.replies).toHaveLength(1);});- it("keeps one reaction per person: 👎 replaces their waiting 👍, withdraws it, and answers no", async () => {- const { bot, calls, react, say } = fixture({ queued: true });+ it("on an inbox line, keeps one reaction per person: 👎 replaces their waiting 👍, withdraws it, and answers no", async () => {+ const { bot, calls, react, say } = fixture({ queued: true, inbox: true });const asked = say();await react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👍", reactor: { by: "user" } });const changed = await react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👎", reactor: { by: "user" } });@@ -107,8 +140,8 @@ describe("a reaction on a bot's message", () => {expect(calls.withdrawn).toEqual([]);});- it("tells the bot each change of a person's answer once: the same answer again after taking it back is not news", async () => {- const { bot, calls, react, say, store } = fixture();+ it("on an inbox line, tells each change of a person's answer once: the same answer again after taking it back is not news", async () => {+ const { bot, calls, react, say, store } = fixture({ inbox: true });const asked = say();const tap = (emoji: "👍" | "👎") => react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji, reactor: { by: "user" } });const stamps: number[] = [];@@ -123,12 +156,12 @@ describe("a reaction on a bot's message", () => {expect(calls.replies.map((reply) => [reply.answer, reply.sendId])).toEqual([["👍", `${prefix}${stamps[0]}y`], ["👎", `${prefix}${stamps[1]}n`], ["👍", `${prefix}${stamps[2]}y`]]);expect(stamps[1]).toBeGreaterThan(stamps[0]!);expect(stamps[2]).toBeGreaterThan(stamps[1]!);- const { react: again } = createReactions({ store, reply: async () => ({ queued: false, repeated: true }), answerCard: async () => ({ ok: true }), withdraw: () => {} });+ const { react: again } = createReactions({ store, reply: async () => ({ queued: false }), inboxAnswer: async () => ({ queued: false, repeated: true }), answerCard: async () => ({ ok: true }), withdraw: () => {} });expect((await again({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👎", reactor: ALICE })).delivery).toBe("none");});- it("takes back a change that still waits, so the bot keeps the answer the person went back to", async () => {- const options = { queued: false };+ it("on an inbox line, takes back a change that still waits, so the bot keeps the answer the person went back to", async () => {+ const options = { queued: false, inbox: true };const { bot, calls, react, say } = fixture(options);const asked = say();const tap = (emoji: "👍" | "👎") => react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji, reactor: { by: "user" } });@@ -142,8 +175,8 @@ describe("a reaction on a bot's message", () => {expect(calls.withdrawn.at(-1)).toBe(calls.replies[1]!.sendId);});- it("lets a person change their mind as often as they like while the bot is busy: each change waits once, the last one stands", async () => {- const { store, bot, calls, react, say } = fixture({ queued: true });+ it("on an inbox line, lets a person change their mind as often as they like while the bot is busy: each change waits once, the last one stands", async () => {+ const { store, bot, calls, react, say } = fixture({ queued: true, inbox: true });const asked = say();const tap = (emoji: "👍" | "👎") => react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji, reactor: { by: "user" } });expect((await tap("👍")).delivery).toBe("queued");@@ -160,7 +193,7 @@ describe("a reaction on a bot's message", () => {it("keeps the answer that waits when a change to it is refused", async () => {const refusal = Object.assign(new Error("this workspace has reached its monthly spend limit"), { status: 409, code: "spend_cap" });- const options: { queued: boolean; refuse?: Error } = { queued: true };+ const options: { queued: boolean; refuse?: Error; inbox: boolean } = { queued: true, inbox: true };const { store, bot, calls, react, say } = fixture(options);const asked = say();expect((await react({ auth: OWNER, threadId: bot.threadId, messageId: asked.id, emoji: "👍", reactor: { by: "user" } })).delivery).toBe("queued");@@ -375,3 +408,72 @@ describe("feelings the bot reads with its next turn", () => {expect(roomReactionNote(line({ role: "user", reactions: [{ emoji: "❤️", by: "user" }] }), "Milind")).toBe("");});});++describe("a room member hears of reactions to its lines in its next turn anywhere in the room", () => {+ function room() {+ const { store } = fixture();+ const scout = store.createBot({ name: "Scout" });+ const otter = store.createBot({ name: "Otter" });+ const group = store.createGroup("Launch", [scout.id, otter.id]);+ const task = store.createGroupTask(group.id, "Pricing")!;+ const notes = createRoomReactionNotes({ store });+ const { react } = createReactions({+ store, noted: notes.noted, reply: async () => ({ queued: false }), answerCard: async () => ({ ok: true }), withdraw: () => {},+ });+ const said = (threadId: string, text: string, bot = otter) =>+ store.appendMessage(threadId, { role: "bot", kind: "text", text, from: { botId: bot.id, name: bot.name, color: bot.color } });+ const feel = (threadId: string, messageId: string, emoji: "❤️" | "🎉", reactor = ALICE, on?: boolean) =>+ react({ auth: OWNER, threadId, messageId, emoji, reactor, ...(on === undefined ? {} : { on }) });+ return { store, scout, otter, group, task, notes, said, feel };+ }++ it("tells the member once, in a turn in another of the room's conversations, and starts no turn", async () => {+ const { otter, scout, group, notes, said, feel } = room();+ const posted = said(group.threadId, "Posted the launch note.");+ expect((await feel(group.threadId, posted.id, "🎉")).delivery).toBe("noted");+ expect(notes.take(group.id, scout.id, "Milind")).toBe("");+ const note = notes.take(group.id, otter.id, "Milind");+ expect(note).toBe("([email protected] reacted 🎉 to your message “Posted the launch note.”.)\n\n");+ expect(notes.take(group.id, otter.id, "Milind")).toBe("");+ });++ it("takes a 👎 the same way: no post, no turn, one note", async () => {+ const { store, otter, group, notes, said } = room();+ const posted = said(group.threadId, "Posted the launch note.");+ const replies: unknown[] = [];+ const { react } = createReactions({ store, noted: notes.noted, reply: async (input) => { replies.push(input); return { queued: false }; }, answerCard: async () => ({ ok: true }), withdraw: () => {} });+ expect((await react({ auth: OWNER, threadId: group.threadId, messageId: posted.id, emoji: "👎", reactor: ALICE })).delivery).toBe("noted");+ expect(replies).toEqual([]);+ expect(store.messagesFor(group.threadId).filter((message) => message.role === "user")).toEqual([]);+ expect(notes.take(group.id, otter.id, "Milind")).toBe("([email protected] reacted 👎 to your message “Posted the launch note.”.)\n\n");+ expect(notes.take(group.id, otter.id, "Milind")).toBe("");+ });++ it("says nothing of a reaction taken back", async () => {+ const { otter, group, task, notes, said, feel } = room();+ const first = said(task.threadId, "Draft one.");+ await feel(task.threadId, first.id, "❤️");+ await feel(task.threadId, first.id, "❤️");+ expect(notes.take(group.id, otter.id, "Milind")).toBe("");+ });++ it("tells a reaction once even when someone else reacts to the same line afterwards", async () => {+ const { otter, group, notes, said, feel } = room();+ const posted = said(group.threadId, "Posted.");+ await feel(group.threadId, posted.id, "❤️", ALICE);+ expect(notes.take(group.id, otter.id, "Milind")).toContain("[email protected] reacted ❤️");+ await feel(group.threadId, posted.id, "🎉", BOB);+ expect(notes.take(group.id, otter.id, "Milind")).toBe("([email protected] reacted 🎉 to your message “Posted.”.)\n\n");+ });++ it("keeps each person's reaction apart, by name", async () => {+ const { otter, group, notes, said, feel } = room();+ const posted = said(group.threadId, "Posted.");+ await feel(group.threadId, posted.id, "❤️", ALICE);+ await feel(group.threadId, posted.id, "🎉", BOB);+ expect(notes.take(group.id, otter.id, "Milind").trim().split("\n")).toEqual([+ "([email protected] reacted ❤️ to your message “Posted.”.)",+ "([email protected] reacted 🎉 to your message “Posted.”.)",+ ]);+ });+});diff --git a/server/reactions.ts b/server/reactions.tsindex 6747264011..6c91e85a28 100644--- a/server/reactions.ts+++ b/server/reactions.ts@@ -16,12 +16,17 @@ export interface Reactor {}type CardReply = { behavior: "allow" | "deny" | "answer"; message?: string };+type ReactionReply = { auth: RequestAuth; threadId: string; owner: BotRecord; target: ReplyTarget; answer: string; sendId: string };type Entry = NonNullable<Message["reactions"]>[number];export interface ReactionDeps {store: Pick<Store, "bot" | "botByThread" | "groupByThread" | "messagesFor" | "setReaction">;- /** `repeated`: that reply had reached the bot already. */- reply(input: { auth: RequestAuth; threadId: string; owner: BotRecord; target: ReplyTarget; answer: string; sendId: string }): Promise<{ queued: boolean; repeated?: true }>;+ /** A person's reaction set or cleared on a message, after it is stored. */+ noted?(threadId: string, message: Message, by: string): void;+ /** A 👍 as the person's reply to that message. `repeated`: that reply had reached the bot already. */+ reply(input: ReactionReply): Promise<{ queued: boolean; repeated?: true }>;+ /** A 👍 or 👎 on a line of a person's inbox, passed back as their answer; null for any other line. */+ inboxAnswer?(input: ReactionReply): Promise<{ queued: boolean; repeated?: true }> | null;/** Answers the card the way a spoken yes or no on a call does, with the same checks on who may answer. */answerCard(input: { auth: RequestAuth; threadId: string; requestId: string } & CardReply): Promise<{ ok: true } | { ok: false; status: number; error: string }>;withdraw(threadId: string, owner: BotRecord, sendId: string): void;@@ -50,7 +55,12 @@ export function cardReply(card: OptionCardData, answer: "yes" | "no"): CardReply/** One line with no brackets or parentheses: a person's name cannot close the note or start a line of its own. */const reactorName = (reaction: Entry, userName: PersonName) =>peerName((reaction.by === "user" ? personOf(userName, {}) : reaction.name ?? "Someone").replace(/[()]/g, " "));-const feelings = (message: Message) => (message.reactions ?? []).filter((reaction) => !reactionAnswer(reaction.emoji));+/** A 👎 says "not that" quietly; only on an open card is it an answer. */+const feelings = (message: Message) => (message.reactions ?? [])+ .filter((reaction) => !reactionAnswer(reaction.emoji) || (!message.card && reaction.emoji === "👎"));++const reactionNote = (message: Message, reaction: Entry, userName: PersonName) =>+ `(${reactorName(reaction, userName)} reacted ${reaction.emoji} to your message “${replyExcerpt(message.text!, 160)}”.)`;/** `turnIds`: the lines this turn carries. */export function withReactionNotes(text: string, path: readonly Message[], turnIds: ReadonlySet<string>, userName: PersonName): string {@@ -60,10 +70,48 @@ export function withReactionNotes(text: string, path: readonly Message[], turnIdconst since = before.findLast((message) => message.role === "user" && !message.peerAsk)?.at ?? 0;const notes = before.flatMap((message) => message.role !== "bot" || message.from || !message.text ? [] : feelings(message).filter((reaction) => (reaction.at ?? 0) > since)- .map((reaction) => `(${reactorName(reaction, userName)} reacted ${reaction.emoji} to your message “${replyExcerpt(message.text!, 160)}”.)`));+ .map((reaction) => reactionNote(message, reaction, userName)));return notes.length ? `${notes.join("\n")}\n\n${text}` : text;}+const ROOM_NOTES_KEPT = 20;++/** A room member hears of each reaction to its own lines once, in its next turn in any of the room's conversations; the+ * transcript it reads leaves them off its own lines. Kept in memory only, so a restart drops the ones not yet told. */+export function createRoomReactionNotes(deps: { store: Pick<Store, "groupByThread" | "messagesFor"> }) {+ const waiting = new Map<string, Map<string, { threadId: string; messageId: string; by: string; at: number }>>();+ const memberKey = (groupId: string, botId: string) => `${groupId}\n${botId}`;++ function noted(threadId: string, message: Message, by: string): void {+ const group = deps.store.groupByThread(threadId);+ if (!group || message.role !== "bot" || !message.from || !message.text) return;+ const key = memberKey(group.id, message.from.botId);+ const entries = waiting.get(key) ?? new Map();+ const id = `${threadId}\n${message.id}\n${by}`;+ const reaction = feelings(message).find((candidate) => candidate.by === by);+ entries.delete(id);+ if (reaction) entries.set(id, { threadId, messageId: message.id, by, at: reaction.at ?? 0 });+ for (const old of [...entries.keys()].slice(0, Math.max(0, entries.size - ROOM_NOTES_KEPT))) entries.delete(old);+ if (entries.size) waiting.set(key, entries);+ else waiting.delete(key);+ }++ /** The notes for `botId`'s next turn in the room, once each. */+ function take(groupId: string, botId: string, userName: PersonName): string {+ const key = memberKey(groupId, botId);+ const entries = waiting.get(key);+ waiting.delete(key);+ const notes = [...entries?.values() ?? []].flatMap(({ threadId, messageId, by, at }) => {+ const message = deps.store.messagesFor(threadId).find((candidate) => candidate.id === messageId);+ const reaction = message && feelings(message).find((candidate) => candidate.by === by && (candidate.at ?? 0) === at);+ return message?.text && message.from?.botId === botId && reaction ? [reactionNote(message, reaction, userName)] : [];+ });+ return notes.length ? `${notes.join("\n")}\n\n` : "";+ }++ return { noted, take };+}+export function roomReactionNote(message: Message, userName: PersonName): string {const felt = message.role === "bot" ? feelings(message) : [];return felt.length ? `\n(${felt.map((reaction) => `${reactorName(reaction, userName)} reacted ${reaction.emoji}`).join(", ")})` : "";@@ -102,9 +150,10 @@ export function createReactions(deps: ReactionDeps) {return "answered";}if ((target.kind !== "text" && target.kind !== "widget") || !target.text?.trim() || sent.latest === entry.emoji) return "none";- const receipt = await deps.reply({- auth, threadId, owner, target: { ...target, reactedWith: entry.emoji }, answer: entry.emoji, sendId: sent.sendId(entry),- });+ const input = { auth, threadId, owner, target: { ...target, reactedWith: entry.emoji }, answer: entry.emoji, sendId: sent.sendId(entry) };+ const inbox = deps.inboxAnswer?.(input) ?? null;+ if (!inbox && answer === "no") return "noted";+ const receipt = await (inbox ?? deps.reply(input));return receipt.queued ? "queued" : receipt.repeated ? "none" : "started";}@@ -123,6 +172,7 @@ export function createReactions(deps: ReactionDeps) {const owner = recipient(target, threadId);const entry: Entry | null = next ? { emoji: next, by: reactor.by, ...(reactor.name ? { name: reactor.name } : {}), at: stamp() } : null;const message = store.setReaction(threadId, messageId, reactor.by, entry) ?? target;+ deps.noted?.(threadId, message, reactor.by);if (!owner) return { message, delivery: "none" };const sent = answersSent(threadId, messageId, reactor.by);const withdrawPrevious = () => {diff --git a/server/system-prompt.ts b/server/system-prompt.tsindex c7c43f1d3c..834a6bccfe 100644--- a/server/system-prompt.ts+++ b/server/system-prompt.ts@@ -306,7 +306,7 @@ export function longCommandsPrompt(computer: ComputerPromptKind | null): stringexport const THREADS_PROMPT =" A thread is one conversation with its own history and run, a row under its bot; several can run at once. start_thread opens one on yourself for separate work; coordinate_bots with thread \"new\" gives a teammate a job in a fresh one; list_threads shows how yours are going. Write a thread's title as #Title so it links. Never use a ticket comment, note or room post as a stand-in for a thread. When the person says to burst something, or a request is clearly many independent items in parallel, use burst: it shows a card, nothing runs until they press Run, and results come back here as one merged reply.";export const WIDGET_PROMPT =- " Unless the person asked (here or in your instructions) to check with them first, ask only what you cannot find or sensibly default, one thing at a time. For a pick among a few options (a time, a day, a choice), use show_widget: a Card with a Row of Buttons, one per option, whose onClickAction sends that option in one tap, at most six; the caption may say they can also type. To change something that exists (routine, reminder, booking, setting), show a form prefilled with its current values (each field's defaultValue), captioned as the current setting, with a confirm button that saves the change. Use a multi-field form only for that or when several required details truly cannot be defaulted. A plain yes or no needs no widget: ask in one short sentence; a word or 👍/👎 on your message comes back as their reply. Data and comparisons go in a markdown table, not a widget.";+ " Unless the person asked (here or in your instructions) to check with them first, ask only what you cannot find or sensibly default, one thing at a time. For a pick among a few options (a time, a day, a choice), use show_widget: a Card with a Row of Buttons, one per option, whose onClickAction sends that option in one tap, at most six; the caption may say they can also type. To change something that exists (routine, reminder, booking, setting), show a form prefilled with its current values (each field's defaultValue), captioned as the current setting, with a confirm button that saves the change. Use a multi-field form only for that or when several required details truly cannot be defaulted. A plain yes or no needs no widget: ask in one short sentence; a word or 👍 on your message comes back as their reply, and a 👎 reaches you as a note with their next message. Data and comparisons go in a markdown table, not a widget.";const APPLIED_RESULT_PROMPT =" Follow the tool result: a change you ask for (your skills, profile or model, or as a Chief a teammate's) applies immediately at every access level and the person sees it with an Undo; then continue the requested work without asking for another confirmation. Only a pending result (a Cloud conversation its owner did not drive) waits for the owner: then end the turn. Never claim success before an applied result, and report failures honestly. Full Access does not grant another bot broader permissions.";const AUTOMATION_COMPLETION_PROMPT =diff --git a/src/components/Reactions.test.ts b/src/components/Reactions.test.tsindex 6423c6705b..72ae834917 100644--- a/src/components/Reactions.test.ts+++ b/src/components/Reactions.test.ts@@ -54,7 +54,7 @@ describe("the react button on a bot's message", () => {expect(toolbar()?.getAttribute("aria-label")).toBe("Reactions");expect(choices().map((choice) => [choice.textContent, choice.getAttribute("aria-label"), choice.getAttribute("aria-pressed")])).toEqual([["👍", "Thumbs up: yes, go ahead", "false"],- ["👎", "Thumbs down: no, not that", "false"],+ ["👎", "Thumbs down", "false"],["❤️", "Heart", "false"],["😂", "Laughing", "false"],["🎉", "Celebrate", "false"],@@ -213,6 +213,26 @@ describe("reaction chips under a message", () => {expect(chips().map((chip) => chip.classList.contains("animate-pop-in"))).toEqual([true, false, false]);});+ it("counts 👍 and 👎 side by side, and takes the viewer's own 👎 back with a tap", async () => {+ fixture.api.mockResolvedValue({ delivery: "none" });+ const split: Message = { ...ASKED, reactions: [+ { emoji: "👎", by: "user", at: 1 },+ { emoji: "👍", by: "p_bob", name: "Bob", at: 2 },+ { emoji: "👎", by: "p_ada", name: "Ada", at: 3 },+ ] };+ await render(createElement(ReactionChips, { threadId: "t1", message: split }));+ expect(chips().map((chip) => [chip.textContent, chip.getAttribute("aria-label"), chip.getAttribute("aria-pressed")])).toEqual([+ ["👍", "Thumbs up: yes, go ahead: Bob", "false"],+ ["👎2", "Thumbs down: You, Ada", "true"],+ ]);+ await click(chips()[1]!);+ expect(fixture.api.mock.calls[0]).toEqual(["/api/threads/t1/messages/m1/reactions", { method: "POST", body: JSON.stringify({ emoji: "👎", on: false }) }]);+ expect(patched()[0]?.message.reactions).toEqual([+ { emoji: "👍", by: "p_bob", name: "Bob", at: 2 },+ { emoji: "👎", by: "p_ada", name: "Ada", at: 3 },+ ]);+ });+it("draws nothing for a message nobody reacted to", async () => {await render(createElement(ReactionChips, { threadId: "t1", message: ASKED }));expect(host.innerHTML).toBe("");diff --git a/src/locales/de.json b/src/locales/de.jsonindex b416cc467b..6f0d17e852 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -1049,7 +1049,7 @@"chat.react": "Reaktion hinzufügen","chat.reactions": "Reaktionen","chat.reaction.yes": "Daumen hoch: ja, mach weiter",- "chat.reaction.no": "Daumen runter: nein, nicht so",+ "chat.reaction.no": "Daumen runter","chat.reaction.love": "Herz","chat.reaction.laugh": "Lachen","chat.reaction.celebrate": "Feiern",diff --git a/src/locales/en.json b/src/locales/en.jsonindex 74c6dc3157..829b862372 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -2736,7 +2736,7 @@"chat.react": "Add reaction","chat.reactions": "Reactions","chat.reaction.yes": "Thumbs up: yes, go ahead",- "chat.reaction.no": "Thumbs down: no, not that",+ "chat.reaction.no": "Thumbs down","chat.reaction.love": "Heart","chat.reaction.laugh": "Laughing","chat.reaction.celebrate": "Celebrate",diff --git a/src/locales/es.json b/src/locales/es.jsonindex e343576fb4..09d935a731 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -1829,7 +1829,7 @@"chat.react": "Añadir reacción","chat.reactions": "Reacciones","chat.reaction.yes": "Pulgar arriba: sí, adelante",- "chat.reaction.no": "Pulgar abajo: no, eso no",+ "chat.reaction.no": "Pulgar abajo","chat.reaction.love": "Corazón","chat.reaction.laugh": "Risa","chat.reaction.celebrate": "Celebrar",diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex 276a2832eb..78ed3bfae0 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -831,7 +831,7 @@"chat.react": "Ajouter une réaction","chat.reactions": "Réactions","chat.reaction.yes": "Pouce levé : oui, allez-y",- "chat.reaction.no": "Pouce baissé : non, pas ça",+ "chat.reaction.no": "Pouce baissé","chat.reaction.love": "Cœur","chat.reaction.laugh": "Rire","chat.reaction.celebrate": "Fête",diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex 1bc2e28200..58b6142ec2 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -829,7 +829,7 @@"chat.react": "प्रतिक्रिया जोड़ें","chat.reactions": "प्रतिक्रियाएँ","chat.reaction.yes": "अंगूठा ऊपर: हाँ, आगे बढ़ें",- "chat.reaction.no": "अंगूठा नीचे: नहीं, ऐसा नहीं",+ "chat.reaction.no": "अंगूठा नीचे","chat.reaction.love": "दिल","chat.reaction.laugh": "हँसी","chat.reaction.celebrate": "जश्न",diff --git a/src/locales/it.json b/src/locales/it.jsonindex 2ff679e921..ffa0b2fcd3 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -2714,7 +2714,7 @@"chat.react": "Aggiungi una reazione","chat.reactions": "Reazioni","chat.reaction.yes": "Pollice su: sì, vai avanti",- "chat.reaction.no": "Pollice giù: no, non quello",+ "chat.reaction.no": "Pollice giù","chat.reaction.love": "Cuore","chat.reaction.laugh": "Risata","chat.reaction.celebrate": "Festa",diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex 2d9c5804cd..f13627cbc4 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -2251,7 +2251,7 @@"chat.react": "リアクションを追加","chat.reactions": "リアクション","chat.reaction.yes": "親指を上に:はい、進めてください",- "chat.reaction.no": "親指を下に:いいえ、違います",+ "chat.reaction.no": "親指を下に","chat.reaction.love": "ハート","chat.reaction.laugh": "笑い","chat.reaction.celebrate": "お祝い",diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 6b0e0db4dd..651dae5d04 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -2141,7 +2141,7 @@"chat.react": "반응 추가","chat.reactions": "반응","chat.reaction.yes": "좋아요: 네, 진행하세요",- "chat.reaction.no": "싫어요: 아니요, 그건 아니에요",+ "chat.reaction.no": "싫어요","chat.reaction.love": "하트","chat.reaction.laugh": "웃음","chat.reaction.celebrate": "축하",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 6dca5df8f7..66fd3a1339 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -1988,7 +1988,7 @@"chat.react": "Dodaj reakcję","chat.reactions": "Reakcje","chat.reaction.yes": "Kciuk w górę: tak, kontynuuj",- "chat.reaction.no": "Kciuk w dół: nie, nie to",+ "chat.reaction.no": "Kciuk w dół","chat.reaction.love": "Serce","chat.reaction.laugh": "Śmiech","chat.reaction.celebrate": "Świętowanie",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex c6e0f9e6b6..6b13aad06f 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -2518,7 +2518,7 @@"chat.react": "Adicionar reação","chat.reactions": "Reações","chat.reaction.yes": "Joinha: sim, pode seguir",- "chat.reaction.no": "Polegar para baixo: não, isso não",+ "chat.reaction.no": "Polegar para baixo","chat.reaction.love": "Coração","chat.reaction.laugh": "Risada","chat.reaction.celebrate": "Comemorar",diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex f7a35c865b..2d7d3d3a44 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -2021,7 +2021,7 @@"chat.react": "Добавить реакцию","chat.reactions": "Реакции","chat.reaction.yes": "Палец вверх: да, действуйте",- "chat.reaction.no": "Палец вниз: нет, не то",+ "chat.reaction.no": "Палец вниз","chat.reaction.love": "Сердце","chat.reaction.laugh": "Смех","chat.reaction.celebrate": "Празднование",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex b40d91dd82..39939d0678 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -500,7 +500,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -5758,7 +5758,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -11572,7 +11572,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -15684,7 +15684,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -20702,7 +20702,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -29626,7 +29626,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -40240,7 +40240,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -50881,7 +50881,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -61039,7 +61039,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -65982,7 +65982,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -72175,7 +72175,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -78713,7 +78713,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -86117,7 +86117,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -93528,7 +93528,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",@@ -105711,7 +105711,7 @@"chat.react": "d97239a628a7c4715ef06c865556a7681e7e5dd96c418e4f8634360ca97722c8","chat.reactions": "8a7ede6b5f07f7929a403b2ed23a46ce481878555c3859676eb22a888aecfc5b","chat.reaction.yes": "701796000877acc5eabfe156ebdaf4a695865a663f93b0ea2db38bfa65e1da53",- "chat.reaction.no": "099c60af3b58bf2e1f5437960eb1d0351e5badb32cf023f7c50251bc9608b047",+ "chat.reaction.no": "1735631fe1135ede82085d2d0e1fc10b4273fde8843a3a3e208dd605378d9b82","chat.reaction.love": "770af9d180375fa9c3d29a50c124a04f538b277e1ed94ec20be8e244820d6534","chat.reaction.laugh": "bdc19fef526416471235e7be05fd5d7dd22026fda0ad5e0109602f5ea658986c","chat.reaction.celebrate": "169381e6fc21b70bfab26db6f6201fc33206f4831890def67f4c2665c4ea70bf",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex 6ff1b0e693..fbf32c2a8e 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -1535,7 +1535,7 @@"chat.react": "Tepki ekle","chat.reactions": "Tepkiler","chat.reaction.yes": "Başparmak yukarı: evet, devam edin",- "chat.reaction.no": "Başparmak aşağı: hayır, öyle değil",+ "chat.reaction.no": "Başparmak aşağı","chat.reaction.love": "Kalp","chat.reaction.laugh": "Gülme","chat.reaction.celebrate": "Kutlama",diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex 574751b2e0..2472311001 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -963,7 +963,7 @@"chat.react": "Додати реакцію","chat.reactions": "Реакції","chat.reaction.yes": "Палець угору: так, продовжуйте",- "chat.reaction.no": "Палець униз: ні, не так",+ "chat.reaction.no": "Палець униз","chat.reaction.love": "Серце","chat.reaction.laugh": "Сміх","chat.reaction.celebrate": "Святкування",diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex a53a377251..062f5b8daf 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -1535,7 +1535,7 @@"chat.react": "Thêm cảm xúc","chat.reactions": "Cảm xúc","chat.reaction.yes": "Thích: có, cứ làm",- "chat.reaction.no": "Không thích: không, không phải vậy",+ "chat.reaction.no": "Không thích","chat.reaction.love": "Trái tim","chat.reaction.laugh": "Cười","chat.reaction.celebrate": "Ăn mừng",diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex db29167c1a..8a4088f494 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -2417,7 +2417,7 @@"chat.react": "新增表情回應","chat.reactions": "表情回應","chat.reaction.yes": "讚:是,繼續",- "chat.reaction.no": "倒讚:不,不是這樣",+ "chat.reaction.no": "倒讚","chat.reaction.love": "愛心","chat.reaction.laugh": "大笑","chat.reaction.celebrate": "慶祝",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex f13b649b9b..be6dd4189d 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -2506,7 +2506,7 @@"chat.react": "添加表情回应","chat.reactions": "表情回应","chat.reaction.yes": "点赞:是,继续",- "chat.reaction.no": "点踩:不,不是这样",+ "chat.reaction.no": "点踩","chat.reaction.love": "爱心","chat.reaction.laugh": "大笑","chat.reaction.celebrate": "庆祝",