mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5846
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3221
Author: @kolacheee
Created: 7/4/2026
Status: ✅ Merged
Merged: 7/5/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/react-toggle-and-group-attribution📝 Commits (5)
e3b8c04feat: Reactions per-command toggle + fix group react attribution to first character (#3219, #3220)254ef44fix: gate group react placement guidance to merged mode; chat members outrank persona-name react targets70b072bfeat: tell merged group replies that multiple characters may react in one reply41f4a48fix: reaction sweep hardening (linear timestamp strip, fewer store scans per react, timestamp-proof attribution, junk-tag rejection, lazy picker, phantom-box guard)f57b3feMerge remote-tracking branch 'origin/staging' into fix/react-toggle-and-group-attribution📊 Changes
9 files changed (+215 additions, -92 deletions)
View changed files
📝
CHANGELOG.md(+8 -1)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+5 -0)📝
packages/client/src/components/chat/ChatSetupWizard.tsx(+1 -0)📝
packages/client/src/components/chat/ConversationMessageGrouped.tsx(+4 -0)📝
packages/client/src/components/chat/ReactionAddButton.tsx(+59 -38)📝
packages/server/src/routes/generate.routes.ts(+79 -38)📝
packages/server/src/services/conversation/character-commands.ts(+52 -13)📝
packages/shared/src/types/chat.ts(+1 -0)📝
packages/shared/src/utils/speaker-segments.ts(+6 -2)📄 Description
Fixes #3219, fixes #3220
Summary
Two follow-ups from maintainer playtesting of the reaction feature (#3211):
[react:]tags are filtered by the command pipeline. Default on.[react:]tag as the first line of the whole merged reply, above any character'sName:section, and that leading region fell back to the generation-primary (first) character.Why
While playtesting, reactions silently didn't work until the master Commands toggle was found (nothing indicates reactions depend on it), and once they worked, every chip's tooltip read "reacted by " regardless of who was reacting in the story. Inspecting
extra.conversationCommandContentof the actual replies confirmed the tag-above-first-section placement in 3 out of 3 reacting replies.What changed
packages/shared/src/types/chat.ts"react"added toCONVERSATION_COMMAND_KEYS.packages/server/src/routes/generate.routes.tsgetConversationCommandKeymapsreactso the existing command filter enforces the toggle.packages/server/src/services/conversation/character-commands.tsparseCharacterCommandsBySpeaker: the leading region (text above the first recognizedName:prefix) now attributes to the speaker of the first named section — the turn the header visually opens — instead of the generation-primary character. No named sections → unchanged fallback. Affects all commands parked above the first section, not just reacts.packages/client/src/components/chat/ChatSettingsDrawer.tsx+ChatSetupWizard.tsxVerified by executing the real parser: a header-placed tag now attributes to the first section's speaker, an in-section tag to that section's speaker, and a sectionless reply falls back exactly as before.
Sweep hardening (adversarial regression/perf review of #3211 + this branch)
A multi-agent sweep (hunting the #3104/#3164 lag classes specifically) confirmed and fixed five more issues here:
stripLeadingMessageTimestampson whitespace runs (measured 1.1s/call at 40KB of newlines, called per reacted history message per generation) — the leading whitespace class is now same-line-only: 100KB drops from ~6.9s to 0.68ms, output byte-identical on real timestamp shapes. Both new call sites also cap content size BEFORE stripping.[react:]command (each get/update is a full-table scan in the file-native store; 5 reacts on a 30k-message install measured ~2s of event-loop blocking): the chat-member build is now cached per request, the resolved target message is reused instead of re-fetched, and the swipe mirror skips the active swipeupdateMessageExtraalready writes.parseCharacterCommandsBySpeakernow segments the timestamp-stripped shape (matching the client display and the react resolver), so[12:01] Alice: hey [react: …]credits Alice, not the next character. Verified by execution.[react: she said "hi"]) no longer mint literal-text chips — they're rejected and left visible like the old grammar;emoji = "😂"(spaces around=) now parses as intended.[data-card-css]wrapper; and per-segmentReactionAddButtons now mount their picker + custom-emoji query subscription only while open (they render once per speaker segment across the transcript).The sweep's remaining HIGH finding — the whole transcript re-rendering every streaming frame because
useConversationCustomEmojis/Stickersreturn fresh Maps per render — predates these PRs (it's the #3164 disease on another prop) and is filed + fixed separately: #3223 / PR #3224.Known limitations
[selfie]above the first section), for consistency — flagging in case a different fallback is preferred there.Test plan (manual verification needed)
[react:]text leaks into visible messages, and Peek Prompt no longer contains the react instruction.extra.conversationCommandContent) or via chips from different reactors on the same turn. (Verified: single replies carried 2–3 tags; chips from three characters on one message; see verification report comment.)to "User"/persona name now resolve explicitly). (Verified in live playtest — models emitto "User"routinely and chips landed on the user's message; the collision-precedence edge is code-traced only.)Docs touched
CHANGELOG.md(Unreleased → Added + Fixed).Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.