[GH-ISSUE #3210] [Issue]: Conversation mode — can't react to individual characters' messages in a multi-character reply (only the whole block) #1725

Closed
opened 2026-10-21 05:42:04 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Jul 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3210

Originally assigned to: @kolacheee on GitHub.

What's being asked for (a limitation, not a crash)

In conversation mode with multiple characters, a reply from the characters is delivered as one message split into per-speaker segments (Admin / QRK-E / Bosh each get their own line). But emoji reactions are stored and shown for the whole message, so you can only react to the entire block — you can't give one reaction to character A's line and a different one to character B's. In a 1:1 chat this is invisible (one message = one speaker); with a group it means reactions can't be aimed at a specific character.

This is a direct consequence of how conversation replies are generated: all characters are merged into a single message separated by name headers (to avoid a separate API call per character, which matters especially for autonomous messaging). So the request here is a client/storage-side workaround that lets reactions target individual segments without changing that merged-generation model.

How to see it (try it yourself)

  1. Conversation mode with 2+ characters.
  2. Send a message; the characters reply. (You'll see several name-headed messages that are actually one merged message — see the multi-character stagger issue for that model.)
  3. Hover/tap any of those replies and add an emoji reaction.

You'll see: the reaction attaches to the whole block (rendered once, at the bottom), and there's no way to react to character A's line separately from character B's.
Requested: each character's segment can be reacted to independently.

Why it happens / where it is

  • A multi-character reply is a single messages row. The client splits it into per-speaker segments — groupedSegments (packages/client/src/components/chat/ConversationMessage.tsx ~380) — and renders them via ConversationMessageGrouped.tsx (each segment, lines 133-292).
  • Reactions, though, are a single flat list on the whole message: MessageReaction (packages/shared/src/types/chat.ts:555-561) is { emoji, imageUrl?, by[] } with no segment/speaker key, and MessageExtra.reactions (line 581) is one array per message.
  • The reaction row + picker are rendered once per message and keyed only to message.id: ConversationMessage.tsx reactions = extra.reactions (173-175), handleToggleReaction → api.patch('/chats/{chatId}/messages/{id}/extra', { reactions }) (333), and reactionRow / onPickReaction are used once (647, 659-668). ConversationMessageGrouped.tsx renders ConversationMessageActions (which carries the reaction picker) once at the block bottom (333-362), never per segment.

Suggested workaround (keeps the one-message merged model)

Make reactions segment-aware, purely on the storage + client side — no change to generation or the number of API calls:

  1. Give a reaction an optional segment key — e.g. add segment?: number (the segment index) to MessageReaction, or store reactions as a map keyed by segment index. Reactions with no segment key keep meaning "whole message," so existing data and 1:1 chats are unaffected.
  2. In ConversationMessageGrouped.tsx, render a per-segment reaction row + add affordance for each grouped segment, instead of one row at the block bottom.
  3. Route the picker through the existing handleToggleReaction with the segment's key; it's still one PATCH /messages/{id}/extra.

Caveat worth a small decision: segment identity is derived by parsing the message content, so an edit or regeneration that changes the segment boundaries could misalign per-segment reactions. Keying by segment index is the simplest; index + speaker name is a bit more robust. Decide how to handle re-segmentation (e.g. drop reactions whose segment no longer exists).

On the second idea in the report ("characters seeing/responding to your reactions"): the data model already supports character reactors — MessageReaction.by holds "user" or character ids, and the code notes character reactions are applied server-side — so bots reacting is a thing. But whether the user's reaction is surfaced back into the prompt so a character can respond to it is a separate enhancement; happy to investigate and file that on its own if wanted.


AI-investigated against the current tree (v2.0.9) from the user's report (Android/Termux); the reaction type, storage, and grouped-segment rendering read and confirmed. Please verify before implementing.

Originally created by @kolacheee on GitHub (Jul 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3210 Originally assigned to: @kolacheee on GitHub. **What's being asked for (a limitation, not a crash)** In conversation mode with multiple characters, a reply from the characters is delivered as **one message** split into per-speaker segments (Admin / QRK-E / Bosh each get their own line). But emoji reactions are stored and shown for the **whole message**, so you can only react to the entire block — you can't give one reaction to character A's line and a different one to character B's. In a 1:1 chat this is invisible (one message = one speaker); with a group it means reactions can't be aimed at a specific character. This is a direct consequence of how conversation replies are generated: all characters are merged into a single message separated by name headers (to avoid a separate API call per character, which matters especially for autonomous messaging). So the request here is a **client/storage-side workaround** that lets reactions target individual segments **without** changing that merged-generation model. **How to see it (try it yourself)** 1. Conversation mode with 2+ characters. 2. Send a message; the characters reply. (You'll see several name-headed messages that are actually one merged message — see the multi-character stagger issue for that model.) 3. Hover/tap any of those replies and add an emoji reaction. **You'll see:** the reaction attaches to the whole block (rendered once, at the bottom), and there's no way to react to character A's line separately from character B's. **Requested:** each character's segment can be reacted to independently. **Why it happens / where it is** - A multi-character reply is a single `messages` row. The client splits it into per-speaker segments — `groupedSegments` (`packages/client/src/components/chat/ConversationMessage.tsx` ~380) — and renders them via `ConversationMessageGrouped.tsx` (each segment, lines 133-292). - Reactions, though, are a single flat list on the whole message: `MessageReaction` (`packages/shared/src/types/chat.ts:555-561`) is `{ emoji, imageUrl?, by[] }` with **no segment/speaker key**, and `MessageExtra.reactions` (line 581) is one array per message. - The reaction row + picker are rendered once per message and keyed only to `message.id`: `ConversationMessage.tsx` `reactions = extra.reactions` (173-175), `handleToggleReaction` → `api.patch('/chats/{chatId}/messages/{id}/extra', { reactions })` (333), and `reactionRow` / `onPickReaction` are used once (647, 659-668). `ConversationMessageGrouped.tsx` renders `ConversationMessageActions` (which carries the reaction picker) once at the block bottom (333-362), never per segment. **Suggested workaround (keeps the one-message merged model)** Make reactions segment-aware, purely on the storage + client side — no change to generation or the number of API calls: 1. Give a reaction an optional segment key — e.g. add `segment?: number` (the segment index) to `MessageReaction`, or store `reactions` as a map keyed by segment index. Reactions with no segment key keep meaning "whole message," so existing data and 1:1 chats are unaffected. 2. In `ConversationMessageGrouped.tsx`, render a per-segment reaction row + add affordance for each grouped segment, instead of one row at the block bottom. 3. Route the picker through the existing `handleToggleReaction` with the segment's key; it's still one `PATCH /messages/{id}/extra`. Caveat worth a small decision: segment identity is derived by parsing the message content, so an edit or regeneration that changes the segment boundaries could misalign per-segment reactions. Keying by segment index is the simplest; index + speaker name is a bit more robust. Decide how to handle re-segmentation (e.g. drop reactions whose segment no longer exists). **On the second idea in the report** ("characters seeing/responding to your reactions"): the data model already supports **character** reactors — `MessageReaction.by` holds `"user"` or character ids, and the code notes character reactions are applied server-side — so bots reacting is a thing. But whether the *user's* reaction is surfaced back into the prompt so a character can respond to it is a separate enhancement; happy to investigate and file that on its own if wanted. --- *AI-investigated against the current tree (v2.0.9) from the user's report (Android/Termux); the reaction type, storage, and grouped-segment rendering read and confirmed. Please verify before implementing.*
bsakaguchi 2026-10-21 05:42:04 +07:00
  • closed this issue
  • added the
    in-pr
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1725
No description provided.