[PR #3494] [MERGED] fix: character-owned custom emoji reactions never resolve an image (#3485) #5964

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3494
Author: @kolacheee
Created: 7/11/2026
Status: ✅ Merged
Merged: 7/11/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/3485-character-emoji-key


📝 Commits (1)

  • ba693f0 fix: store character gallery emojis under their scoped lookup key

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/server/src/routes/generate/conversation-custom-assets.ts (+1 -1)

📄 Description

Linked issue

Closes #3485

Why this change

Character-owned custom emoji reactions never resolve an image. The producer stored character gallery emojis under the bare customName, while the only consumer (resolveCustomEmojiImageUrl in conversation-react-command-runtime.ts:106) looks them up under the scoped key buildConversationCustomEmojiKey("character", characterId, name). The keys never match, so the character scope always misses and falls through. Persona and global emojis already use the scoped key on both sides and work.

What changed

  • packages/server/src/routes/generate/conversation-custom-assets.ts: the character-gallery emoji writer now builds its map key with buildConversationCustomEmojiKey("character", info.charId, name), the same helper the consumer uses (and the same pattern as the persona and global writers a few lines above). One line.

Regression surface checked before changing anything:

  • conversationCustomEmojiUrlByName has exactly three writers (global, persona, character) and exactly one reader (the react-command lookup). No code iterates the map's keys, so no other consumer can observe the key-format change (verified repo-wide).
  • The bare-name lists advertised to the model (ownEmojisByChar / emojiNames) are untouched.
  • Stickers have no URL-by-name map, so there is no sticker analog of this bug to half-fix.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Static verification done: producer and consumer now call the same key helper with the same scope and character id, and a repo-wide reference search confirms the map has no other readers or key iteration.

  • Tagged a character gallery image with Make emoji, then have that character react with :name: in a Conversation chat, and confirm the reaction renders the image.
  • Confirmed persona-owned and global emoji reactions still resolve (they share the lookup path).

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

N/A server-side lookup fix; before/after is "reaction shows no image" vs "reaction shows the gallery image" (can add a screenshot after the manual verify above).

Summary by CodeRabbit

  • Refactor
    • Reformatted internal code without changing functionality or user-visible behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3494 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/11/2026 **Status:** ✅ Merged **Merged:** 7/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3485-character-emoji-key` --- ### 📝 Commits (1) - [`ba693f0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ba693f031549410d18a7c9a2374ef4c0e8c51758) fix: store character gallery emojis under their scoped lookup key ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate/conversation-custom-assets.ts` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #3485 ## Why this change Character-owned custom emoji reactions never resolve an image. The producer stored character gallery emojis under the bare `customName`, while the only consumer (`resolveCustomEmojiImageUrl` in `conversation-react-command-runtime.ts:106`) looks them up under the scoped key `buildConversationCustomEmojiKey("character", characterId, name)`. The keys never match, so the character scope always misses and falls through. Persona and global emojis already use the scoped key on both sides and work. ## What changed - `packages/server/src/routes/generate/conversation-custom-assets.ts`: the character-gallery emoji writer now builds its map key with `buildConversationCustomEmojiKey("character", info.charId, name)`, the same helper the consumer uses (and the same pattern as the persona and global writers a few lines above). One line. Regression surface checked before changing anything: - `conversationCustomEmojiUrlByName` has exactly three writers (global, persona, character) and exactly one reader (the react-command lookup). No code iterates the map's keys, so no other consumer can observe the key-format change (verified repo-wide). - The bare-name lists advertised to the model (`ownEmojisByChar` / `emojiNames`) are untouched. - Stickers have no URL-by-name map, so there is no sticker analog of this bug to half-fix. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Static verification done: producer and consumer now call the same key helper with the same scope and character id, and a repo-wide reference search confirms the map has no other readers or key iteration. - Tagged a character gallery image with **Make emoji**, then have that character react with `:name:` in a Conversation chat, and confirm the reaction renders the image. - Confirmed persona-owned and global emoji reactions still resolve (they share the lookup path). ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) N/A server-side lookup fix; before/after is "reaction shows no image" vs "reaction shows the gallery image" (can add a screenshot after the manual verify above). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Reformatted internal code without changing functionality or user-visible behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:05:40 +07:00
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#5964
No description provided.