mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4208] [MERGED] fix(emoji): match picker search on keywords, not just Unicode names #6282
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#6282
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/4208
Author: @Gunterlie
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @SpicyMarinara
Base:
staging← Head:emoji-picker-coverage📝 Commits (3)
4e3856dfeat(emoji): match search on keywords, not just Unicode names8cd02ffMerge remote-tracking branch 'origin/staging' into emoji-picker-coveragefc40a9bFix emoji search false positives by removing ambiguous synonyms📊 Changes
4 files changed (+593 additions, -450 deletions)
View changed files
📝
packages/client/src/components/ui/EmojiPicker.tsx(+7 -446)➕
packages/client/src/lib/emoji-search.ts(+553 -0)📝
packages/client/src/lib/emoji-shortcodes.ts(+4 -4)📝
scripts/regressions/emoji-catalog.regression.ts(+29 -0)📄 Description
Linked issue
Closes #
Why this change
A user reported that emoji they could see in the picker grid could not be
found by typing:
appleandstarreturned nothing, while 🍎 and ⭐ weresitting right there in the list.
The cause is that search matched a plain substring against the official Unicode
name only. Those names are not what people type:
happygrinning facethumbsupthumbs upcelebrateparty popperlollollipop, and 😂 isface with tears of joyface grinningtickchopsticks,ticket,lipstickThe
:shortcode:autocomplete had the same problem, and worse: the curatedkeyword map lived inside
EmojiPicker.tsx, so autocomplete had no aliases at all.What changed
packages/client/src/lib/emoji-search.ts— one search layer shared bythe picker grid and
:shortcode:autocomplete, so the two can no longer drift.EMOJI_KEYWORDS— the existing 429-entry alias map, moved out ofEmojiPicker.tsx. No content change; autocomplete now benefits from it too.WORD_SYNONYMS— keyed on a word of the Unicode name rather than peremoji, so a single entry (
laughing → lol lmao haha funny) covers every emojicontaining that word across all 1,914. This is the part that scales: the old
per-emoji map only ever covered curated entries and silently went stale as the
catalog grew.
emoji's search text. Word order stops mattering, and substring false hits are
gone (
tickno longer returns chopsticks).scripts/regressions/emoji-catalog.regression.ts— extended the existingpnpm regression:emojilane with the reporter's exact queries plus thefalse-positive guards.
Net +588 / −449 across 4 files — smaller overall, since the alias map moved
out of the component.
Results after the change
applestarbeachtravelhappy/smileythumbsupcelebrateface grinningtickValidation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run, for the reviewer's information (these do not substitute for the
boxes above, which are a to-do list for the human contributor):
pnpm check→ exit 0. The one lint warning (NoodleHome.tsx, missinglocalizeUidep) is pre-existing and untouched here.pnpm regression:emoji→ passes.Manual verification notes
Nothing below has been exercised in a real browser by the agent — the regression
lane calls the matcher directly, not the UI. Needs a human:
type each query in the results table above; confirm the listed emoji appear.
:appl,:celebrate,:thumbsupin thecomposer and confirm the
:shortcode:autocomplete suggests the right emoji.tickdoes not return 🥢, i.e. thefalse-positive fix holds in the real UI.
composer sheet (the picker renders
embeddedthere).no-match query (e.g.
zzzz) shows an empty state rather than breaking.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No user-facing docs describe emoji search behaviour, so this likely needs no docs
change — reviewer to confirm whether it warrants a
CHANGELOG.mdentry.Known limitations
beachlists 🌴before 🏖️. Ranking is a larger change and was deliberately left out.
English Unicode names.
entry sprays across the catalog. Four were caught and removed during
development:
eyes → staringmadestarmatch a dozen face emoji, andisland → travel holidaymade everyflag: … islandmatchtravel. Newsynonym entries want a spot-check against the full catalog, not a blind add.
A note on the original report
The same report also said emoji were missing (🫂, 🏖️, ⛱️, "anything related
to travels"). That part appears to be already fixed and not addressed here:
all 9 groups incl. Travel & Places) since
2f3c0a8c2, shipped in v2.2.0.no Travel & Places tab at all — which matches the report exactly.
🍎 and ⭐ were both in the unkeyworded 198. That is precisely the "they are
there, tho" symptom.
Reviewer: worth confirming the reporter's version before this ships as the
answer to their report. If they are on ≥ 2.2.0 and still see missing emoji,
the diagnosis above is wrong and there is a second bug this PR does not fix.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.