[PR #4042] [MERGED] feat(chat): built-in kaomoji picker with fuzzy search (#4038) #6215

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

📋 Pull Request Information

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

Base: staging ← Head: fix/4038-kaomoji-picker


📝 Commits (3)

  • a676376 feat(chat): add a built-in kaomoji picker to the composer
  • 8960f47 fix: address CodeRabbit review on the kaomoji picker
  • b19c52c Merge branch 'staging' into fix/4038-kaomoji-picker

📊 Changes

7 files changed (+443 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/chat/ChatInput.tsx (+30 -0)
📝 packages/client/src/components/chat/ConversationInput.tsx (+1 -0)
📝 packages/client/src/components/chat/ConversationMediaPickerPanel.tsx (+3 -1)
➕ packages/client/src/components/ui/KaomojiPicker.tsx (+209 -0)
➕ packages/client/src/lib/kaomoji-catalog.ts (+188 -0)
📝 packages/client/src/localization/locales/en.json (+11 -0)

📄 Description

Why

Requested in #4038 (humorously, but a real feature request the maintainer accepted): there was no built-in way to insert kaomoji — users had to find them on an external site and paste them in. This adds a first-class kaomoji picker to the composer, with search.

What changed

  • lib/kaomoji-catalog.ts — a curated, categorized kaomoji set (Happy, Love, Sad, Angry, Surprised, Shrug & Flip, Cute & Misc) where each entry carries lowercase search keywords, plus searchKaomoji() which requires all query tokens to match and ranks whole-word hits first (so table man angry throw surfaces (ノಠ益ಠ)ノ彡┻━┻).
  • components/ui/KaomojiPicker.tsx — a picker with a search box, category tabs, and a 2-column grid. It renders as an anchored portal popover for the Roleplay/Game composer, and has an embedded mode for inline use in the Conversation media panel.
  • ChatInput.tsx — a kaomoji button (SmilePlus) beside the emoji button, opening the popover; inserts at the cursor via the existing emoji-insert handler.
  • ConversationMediaPickerPanel.tsx / ConversationInput.tsx — a new Kaomoji tab in the Conversation media panel.
  • Localization key chat.input.kaomoji added to the English locale; community locales fall back to English.

Not literally "every kaomoji from kaomoji.you shipped by default" (that part was the joke) — this is a solid built-in set that's easy to extend by adding entries to the catalog.

Test plan

  • In a Roleplay/Game chat (desktop), click the kaomoji button beside the emoji button; confirm the popover opens, categories switch, and clicking a kaomoji inserts it at the cursor.
  • Search table man angry throw and confirm the table-flip ranks at/near the top; confirm an empty result shows "No kaomoji found."
  • In a Conversation chat, open the media panel and confirm the new Kaomoji tab works and inserts.
  • Confirm Escape and outside-click close the anchored popover, and that the panel positions above the composer without overflowing the viewport (desktop + mobile widths).
  • pnpm check passes. (Passed in the authoring session; re-verify locally.)

Fixes #4038.

Summary by CodeRabbit

  • New Features
    • Added a built-in kaomoji picker to the composer.
    • Browse kaomoji by category or find them with fuzzy keyword search.
    • Added a Kaomoji tab to the mobile conversation media panel.
    • Select kaomoji to insert them directly into messages.

🔄 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/4042 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/24/2026 **Status:** ✅ Merged **Merged:** 7/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/4038-kaomoji-picker` --- ### 📝 Commits (3) - [`a676376`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a67637625de6e19d387e2d3f383d32f761a653e1) feat(chat): add a built-in kaomoji picker to the composer - [`8960f47`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8960f47e1da6ecedbb383205a368a3c93fa5e46b) fix: address CodeRabbit review on the kaomoji picker - [`b19c52c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b19c52cffd2bfaba4ba49c0a1a49650faeec155b) Merge branch 'staging' into fix/4038-kaomoji-picker ### 📊 Changes **7 files changed** (+443 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+30 -0) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+1 -0) 📝 `packages/client/src/components/chat/ConversationMediaPickerPanel.tsx` (+3 -1) ➕ `packages/client/src/components/ui/KaomojiPicker.tsx` (+209 -0) ➕ `packages/client/src/lib/kaomoji-catalog.ts` (+188 -0) 📝 `packages/client/src/localization/locales/en.json` (+11 -0) </details> ### 📄 Description ## Why Requested in #4038 (humorously, but a real feature request the maintainer accepted): there was no built-in way to insert kaomoji — users had to find them on an external site and paste them in. This adds a first-class kaomoji picker to the composer, with search. ## What changed - **`lib/kaomoji-catalog.ts`** — a curated, categorized kaomoji set (Happy, Love, Sad, Angry, Surprised, Shrug & Flip, Cute & Misc) where each entry carries lowercase search keywords, plus `searchKaomoji()` which requires all query tokens to match and ranks whole-word hits first (so `table man angry throw` surfaces `(ノಠ益ಠ)ノ彡┻━┻`). - **`components/ui/KaomojiPicker.tsx`** — a picker with a search box, category tabs, and a 2-column grid. It renders as an anchored portal popover for the Roleplay/Game composer, and has an `embedded` mode for inline use in the Conversation media panel. - **`ChatInput.tsx`** — a kaomoji button (`SmilePlus`) beside the emoji button, opening the popover; inserts at the cursor via the existing emoji-insert handler. - **`ConversationMediaPickerPanel.tsx` / `ConversationInput.tsx`** — a new **Kaomoji** tab in the Conversation media panel. - Localization key `chat.input.kaomoji` added to the English locale; community locales fall back to English. Not literally "every kaomoji from kaomoji.you shipped by default" (that part was the joke) — this is a solid built-in set that's easy to extend by adding entries to the catalog. ## Test plan - [ ] In a Roleplay/Game chat (desktop), click the kaomoji button beside the emoji button; confirm the popover opens, categories switch, and clicking a kaomoji inserts it at the cursor. - [ ] Search `table man angry throw` and confirm the table-flip ranks at/near the top; confirm an empty result shows "No kaomoji found." - [ ] In a Conversation chat, open the media panel and confirm the new **Kaomoji** tab works and inserts. - [ ] Confirm Escape and outside-click close the anchored popover, and that the panel positions above the composer without overflowing the viewport (desktop + mobile widths). - [ ] `pnpm check` passes. (Passed in the authoring session; re-verify locally.) Fixes #4038. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a built-in kaomoji picker to the composer. * Browse kaomoji by category or find them with fuzzy keyword search. * Added a Kaomoji tab to the mobile conversation media panel. * Select kaomoji to insert them directly into messages. <!-- 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:08:15 +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#6215
No description provided.