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#5848
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/3224
Author: @kolacheee
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/5/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/conversation-emoji-map-identity📝 Commits (2)
9702783fix: stop conversation emoji/sticker maps breaking message memoization every render (#3223)94a9bc9Merge branch 'staging' into fix/conversation-emoji-map-identity📊 Changes
2 files changed (+58 additions, -6 deletions)
View changed files
📝
packages/client/src/hooks/use-conversation-custom-emojis.ts(+29 -3)📝
packages/client/src/hooks/use-conversation-custom-stickers.ts(+29 -3)📄 Description
Fixes #3223
Summary
useConversationCustomEmojis()anduseConversationCustomStickers()returned a freshlistarray and a freshMapon every render.ConversationViewpasses those Maps asemojiMap/stickerMapprops to everymemo(ConversationMessage), so the memo's shallow compare failed for every mounted message on every ConversationView render — and ConversationView renders once per animation frame during any token stream. Net effect: the whole transcript re-rendered per streaming frame (~15–35 ms/frame measured on a 100-message group chat), the same disease class as #3104/#3164.The fix applies the ref-backed reuse pattern ChatArea already uses for
chatCharacterRows(the #3164 fix): build the resolved list as before, compare it element-wise against the previous one (all fields are primitives), and return the cached{ list, map }object when unchanged. Both hooks fixed identically.Why
Found by a regression/performance sweep of the reaction PRs (#3211/#3221). The bug predates them — but per-segment reactions added more per-message subtrees under the broken memo boundary, so fixing the boundary is what makes the transcript cheap again during streaming.
Known limitations
useQueriesinputs having no stable identity to memo against (a plainuseMemocannot work here, which is why the ref pattern exists).Test plan (manual verification needed)
Docs touched
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.