[PR #2632] [MERGED] feat(conversation): sticker selector with in-place management #5698

Closed
opened 2026-10-22 04:18:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2632
Author: @kolacheee
Created: 6/18/2026
Status: ✅ Merged
Merged: 6/19/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/staging-custom-stickers


📝 Commits (10+)

  • 113f4c9 feat(custom-emojis): data model + storage for global custom emojis
  • 1cea476 feat(custom-emojis): routes — upload, serve, list, rename, delete, import/export
  • ffdf5c1 feat(custom-emojis): emoji-picker Custom tab + client hooks
  • e834059 feat(custom-emojis): render :name: tokens as inline images in conversation messages
  • 6216af2 feat(custom-emojis): jumbo rendering for emoji-only lines
  • 1e8338a feat(custom-emojis): :emoji: autocomplete in the conversation composer
  • 2ba59cb feat(emoji): resolve per-source custom emojis in conversations
  • 4627cef feat(emoji): show persona & character emojis in the picker's Custom tab
  • 2636930 feat(emoji): advertise available custom emojis to the model
  • 35ec1ff feat(emoji): add selection preferences (max count + random/semantic)

📊 Changes

36 files changed (+3153 additions, -62 deletions)

View changed files

📝 packages/client/src/components/chat/ConversationInput.tsx (+283 -2)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+9 -0)
📝 packages/client/src/components/chat/ConversationMessageBubble.tsx (+6 -4)
📝 packages/client/src/components/chat/ConversationMessageGrouped.tsx (+5 -3)
📝 packages/client/src/components/chat/ConversationMessageLine.tsx (+4 -2)
📝 packages/client/src/components/chat/ConversationMessageShared.tsx (+18 -3)
📝 packages/client/src/components/chat/ConversationView.tsx (+10 -0)
➕ packages/client/src/components/chat/CustomEmojiSelectionSettings.tsx (+123 -0)
➕ packages/client/src/components/chat/CustomEmojiTab.tsx (+308 -0)
➕ packages/client/src/components/chat/StickerPicker.tsx (+413 -0)
📝 packages/client/src/components/ui/AppDialogRenderer.tsx (+38 -1)
📝 packages/client/src/components/ui/EmojiPicker.tsx (+69 -33)
📝 packages/client/src/components/ui/GifPicker.tsx (+25 -12)
➕ packages/client/src/hooks/use-conversation-custom-emojis.ts (+88 -0)
➕ packages/client/src/hooks/use-conversation-custom-stickers.ts (+88 -0)
➕ packages/client/src/hooks/use-custom-emojis.ts (+70 -0)
➕ packages/client/src/hooks/use-custom-stickers.ts (+70 -0)
📝 packages/client/src/lib/app-dialogs.ts (+11 -0)
➕ packages/client/src/lib/custom-emoji-render.tsx (+76 -0)
➕ packages/client/src/lib/sticker-render.tsx (+58 -0)

...and 16 more files

📄 Description

Linked issue

Closes #2609.

Stacked on #2622 (Part 1 — custom emojis). This branch builds on feat/staging-custom-emojis and merges it in, so until #2622 merges this PR's diff includes its commits too (and you can test both selectors on this one branch). Review/merge #2622 first.

Why this change

Port the sticker selector to Conversation mode (Part 2 of 3, after custom emojis). Stickers are added/renamed/deleted directly in the sticker selector — behind an Edit toggle so users don't delete one while reaching to use it, with set import/export. Selecting a sticker posts it as its own message, sticker:name: renders as a block image, and sticker names are advertised to the model like emoji names. Conversation mode only — no Roleplay/Game codepaths.

What changed

Reuses the custom-emoji foundation (Part 1). Landed:

  • Persistence: a file-backed custom_stickers table + storage + routes (list / upload / serve / rename / delete + set import/export at /api/custom-stickers, capped 512×512) + shared Zod schema + client hooks.
  • Selector: a StickerPicker — a popover beside a new sticker button on desktop, and embedded in the mobile composer sheet's now-live Stickers tab. Shows the global pool plus the active persona's and chat bots' gallery stickers; Edit toggle for upload / rename / delete + Import / Export a set; search.
  • Sending: selecting a sticker posts sticker:name: as its own user message, mirroring the GIF send guards (persist-only while streaming / in manual group order, else send-and-reply).
  • Rendering: sticker:name: renders as an own-line block image in Conversation messages (split out before the inline emoji pass so it isn't mistaken for an emoji token).
  • Model access: sticker names are advertised to the responding character in the system prompt, reusing Part 1's capped/weighted selection (max count, random/semantic; tool-call falls back to semantic).

The merged-in #2622 also gains Import/Export buttons in the emoji selector, for parity.

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

Pending playtest.

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)

Pending — sticker selector (desktop popover + mobile sheet tab) + a rendered sticker message, after playtest.

Summary by CodeRabbit

New Features

  • Custom Emojis & Stickers: Upload and manage custom emojis and stickers for use in conversations; appear inline in messages as :name: and sticker:name: tokens.
  • Emoji Autocomplete: Type : in chat to trigger autocomplete suggestions for custom and standard emojis.
  • Unified Mobile Picker: Consolidated bottom-sheet interface for selecting emojis, GIFs, and stickers on mobile.
  • Emoji Selection Settings: Configure how custom emojis are offered (random, semantic, or tool-based selection) and set max count per offering.

🔄 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/2632 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 6/18/2026 **Status:** ✅ Merged **Merged:** 6/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/staging-custom-stickers` --- ### 📝 Commits (10+) - [`113f4c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/113f4c97187d102ae176cf849795f110d2424ab7) feat(custom-emojis): data model + storage for global custom emojis - [`1cea476`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1cea476491b4802ad14eba9b418bfd210acd6111) feat(custom-emojis): routes — upload, serve, list, rename, delete, import/export - [`ffdf5c1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ffdf5c1c092d99c8bfb37871cec0677ec3e65e5f) feat(custom-emojis): emoji-picker Custom tab + client hooks - [`e834059`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e8340591b5d97e8059db8bf901603714729d8261) feat(custom-emojis): render :name: tokens as inline images in conversation messages - [`6216af2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6216af2a2b0e03dbafc8279736afe9bf057e0e6c) feat(custom-emojis): jumbo rendering for emoji-only lines - [`1e8338a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1e8338a642007aed02e119e9d68b8347e3a9b5f4) feat(custom-emojis): :emoji: autocomplete in the conversation composer - [`2ba59cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2ba59cb08df826d99edde8055900506d5966e57d) feat(emoji): resolve per-source custom emojis in conversations - [`4627cef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4627cef3b45bcacabf68b77add1022f289a99b76) feat(emoji): show persona & character emojis in the picker's Custom tab - [`2636930`](https://github.com/Pasta-Devs/Marinara-Engine/commit/26369303b393c756b8356b02639a989c03301962) feat(emoji): advertise available custom emojis to the model - [`35ec1ff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/35ec1ff342582aecb480bbaa62c399be22906981) feat(emoji): add selection preferences (max count + random/semantic) ### 📊 Changes **36 files changed** (+3153 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+283 -2) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+9 -0) 📝 `packages/client/src/components/chat/ConversationMessageBubble.tsx` (+6 -4) 📝 `packages/client/src/components/chat/ConversationMessageGrouped.tsx` (+5 -3) 📝 `packages/client/src/components/chat/ConversationMessageLine.tsx` (+4 -2) 📝 `packages/client/src/components/chat/ConversationMessageShared.tsx` (+18 -3) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+10 -0) ➕ `packages/client/src/components/chat/CustomEmojiSelectionSettings.tsx` (+123 -0) ➕ `packages/client/src/components/chat/CustomEmojiTab.tsx` (+308 -0) ➕ `packages/client/src/components/chat/StickerPicker.tsx` (+413 -0) 📝 `packages/client/src/components/ui/AppDialogRenderer.tsx` (+38 -1) 📝 `packages/client/src/components/ui/EmojiPicker.tsx` (+69 -33) 📝 `packages/client/src/components/ui/GifPicker.tsx` (+25 -12) ➕ `packages/client/src/hooks/use-conversation-custom-emojis.ts` (+88 -0) ➕ `packages/client/src/hooks/use-conversation-custom-stickers.ts` (+88 -0) ➕ `packages/client/src/hooks/use-custom-emojis.ts` (+70 -0) ➕ `packages/client/src/hooks/use-custom-stickers.ts` (+70 -0) 📝 `packages/client/src/lib/app-dialogs.ts` (+11 -0) ➕ `packages/client/src/lib/custom-emoji-render.tsx` (+76 -0) ➕ `packages/client/src/lib/sticker-render.tsx` (+58 -0) _...and 16 more files_ </details> ### 📄 Description ## Linked issue Closes #2609. > **Stacked on #2622 (Part 1 — custom emojis).** This branch builds on `feat/staging-custom-emojis` and merges it in, so until #2622 merges this PR's diff includes its commits too (and you can test both selectors on this one branch). Review/merge #2622 first. ## Why this change Port the sticker selector to Conversation mode (Part 2 of 3, after custom emojis). Stickers are added/renamed/deleted directly in the sticker selector — behind an **Edit** toggle so users don't delete one while reaching to use it, with set import/export. Selecting a sticker posts it as its own message, `sticker:name:` renders as a block image, and sticker names are advertised to the model like emoji names. **Conversation mode only** — no Roleplay/Game codepaths. ## What changed Reuses the custom-emoji foundation (Part 1). Landed: - **Persistence:** a file-backed `custom_stickers` table + storage + routes (list / upload / serve / rename / delete + set import/export at `/api/custom-stickers`, capped 512×512) + shared Zod schema + client hooks. - **Selector:** a `StickerPicker` — a popover beside a new sticker button on desktop, and embedded in the mobile composer sheet's now-live **Stickers** tab. Shows the global pool plus the active persona's and chat bots' gallery stickers; **Edit** toggle for upload / rename / delete + **Import / Export** a set; search. - **Sending:** selecting a sticker posts `sticker:name:` as its own user message, mirroring the GIF send guards (persist-only while streaming / in manual group order, else send-and-reply). - **Rendering:** `sticker:name:` renders as an own-line block image in Conversation messages (split out before the inline emoji pass so it isn't mistaken for an emoji token). - **Model access:** sticker names are advertised to the responding character in the system prompt, reusing Part 1's capped/weighted selection (max count, random/semantic; tool-call falls back to semantic). > The merged-in #2622 also gains Import/Export buttons in the emoji selector, for parity. ## 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 _Pending playtest._ ## 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) _Pending — sticker selector (desktop popover + mobile sheet tab) + a rendered sticker message, after playtest._ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## New Features * **Custom Emojis & Stickers**: Upload and manage custom emojis and stickers for use in conversations; appear inline in messages as `:name:` and `sticker:name:` tokens. * **Emoji Autocomplete**: Type `:` in chat to trigger autocomplete suggestions for custom and standard emojis. * **Unified Mobile Picker**: Consolidated bottom-sheet interface for selecting emojis, GIFs, and stickers on mobile. * **Emoji Selection Settings**: Configure how custom emojis are offered (random, semantic, or tool-based selection) and set max count per offering. <!-- 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-22 04:18:37 +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#5698
No description provided.