[GH-ISSUE #2592] Port conversation avatar override (per-character hide/emoji/sprite/gallery) to staging (from #1812) #1277

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

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

Summary

Refactor PR #1812 bundled a per-character conversation avatar override alongside its card-CSS theming hooks. The card-CSS hooks are being ported in #2580; this issue tracks the avatar override as a separate port, since it's a large, independent feature (a new character setting + editor surface, not card CSS).

What it is

A per-character override for how that character's avatar renders in conversation mode:

  • mode: "default" | "hide" | "emoji" | "sprite" | "gallery", with an optional value (the emoji character, or a sprite/gallery image reference).
  • hide → no avatar; emoji → an emoji avatar; sprite / gallery → a specific image resolved from the character's sprites or gallery.

Scope (re-implementation on the Node stack)

  • Contract: add ConversationAvatarOverride { mode; value? } to the character extensions type (packages/shared/src/types/character.ts, alongside the existing conversationStatus / conversationActivity extensions).
  • CharacterMap: add conversationAvatar (raw ref) + conversationAvatarSrc (resolved image) fields; populate from extensions.conversationAvatar in the conversation character-map builder.
  • Resolver: a gated query (enabled only when a sprite/gallery override actually exists) that resolves the image from the sprite + character-gallery endpoints and writes conversationAvatarSrc back into the map.
  • Render: dual-path avatar render in the conversation message components — hide (no avatar), emoji (text), resolved sprite/gallery (<img>), else the existing avatar fallback.
  • Editor: a control in the character editor Colors tab (mode buttons + emoji input + sprite/gallery picker) with a defensive parser.

Notes

  • No Rust/Tauri involved — pure React/TS.
  • Backward-compatible (optional extension; ignored by the roleplay + game surfaces and by older readers).
  • Source feature: #1812. Split out of #2580 to keep that PR focused on the card-CSS hooks.
Originally created by @kolacheee on GitHub (Jun 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2592 ## Summary Refactor PR #1812 bundled a per-character **conversation avatar override** alongside its card-CSS theming hooks. The card-CSS hooks are being ported in #2580; this issue tracks the avatar override as a separate port, since it's a large, independent feature (a new character setting + editor surface, not card CSS). ## What it is A per-character override for how that character's avatar renders in **conversation mode**: - `mode: "default" | "hide" | "emoji" | "sprite" | "gallery"`, with an optional `value` (the emoji character, or a sprite/gallery image reference). - `hide` → no avatar; `emoji` → an emoji avatar; `sprite` / `gallery` → a specific image resolved from the character's sprites or gallery. ## Scope (re-implementation on the Node stack) - **Contract:** add `ConversationAvatarOverride { mode; value? }` to the character extensions type (`packages/shared/src/types/character.ts`, alongside the existing `conversationStatus` / `conversationActivity` extensions). - **CharacterMap:** add `conversationAvatar` (raw ref) + `conversationAvatarSrc` (resolved image) fields; populate from `extensions.conversationAvatar` in the conversation character-map builder. - **Resolver:** a gated query (enabled only when a sprite/gallery override actually exists) that resolves the image from the sprite + character-gallery endpoints and writes `conversationAvatarSrc` back into the map. - **Render:** dual-path avatar render in the conversation message components — `hide` (no avatar), `emoji` (text), resolved `sprite`/`gallery` (`<img>`), else the existing avatar fallback. - **Editor:** a control in the character editor **Colors** tab (mode buttons + emoji input + sprite/gallery picker) with a defensive parser. ## Notes - No Rust/Tauri involved — pure React/TS. - Backward-compatible (optional extension; ignored by the roleplay + game surfaces and by older readers). - Source feature: #1812. Split out of #2580 to keep that PR focused on the card-CSS hooks.
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#1277
No description provided.