Skip to content

W-432: drop component-group modifiers from the emoji corpus#148

Merged
wr merged 1 commit into
mainfrom
wells/w-432-filter-components
Jun 25, 2026
Merged

W-432: drop component-group modifiers from the emoji corpus#148
wr merged 1 commit into
mainfrom
wells/w-432-filter-components

Conversation

@wr

@wr wr commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

Bare Fitzpatrick skin-tone swatches (🏻–🏿, e.g. :medium_skin_tone:) and hair modifiers (🦰🦱🦳🦲) surfaced as standalone search hits. They're emojibase group 2 ("component") — combining modifiers, useless inserted alone. The browser already skips this group, so they only leaked through live search.

Fix

Filter the component group out of the loaded corpus in EmojiDatabase.load, so it's absent from search and exact-match — matching the browser. SkinTone applies modifiers via hardcoded scalars, not the DB, so skin-tone application is unaffected.

Notes

Test plan

  • New componentModifiersAreExcluded test: no group-2 entries in the corpus; 🏽 gone from byHexcode and from a :medium search.
  • Full suite green; verified in the dev app.

Refs W-432

Bare Fitzpatrick skin-tone swatches (🏻–🏿) and hair modifiers (🦰🦱🦳🦲)
were surfacing as standalone search hits (e.g. `:medium_skin_tone:`). They're
emojibase group 2 ("component") — combining modifiers, useless inserted alone.
The browser already skips this group, so they only leaked through live search.

Filter the component group out of the loaded corpus so it's absent from search
and exact-match, matching the browser. SkinTone applies modifiers via
hardcoded scalars, not the DB, so skin-tone application is unaffected.

Refs: W-432
@linear-code

linear-code Bot commented Jun 25, 2026

Copy link
Copy Markdown

W-432

@wr-claude-reviewer wr-claude-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean filter with a solid matching test — logic is correct and the three-angle test coverage (corpus invariant, byHexcode lookup, search hit) is thorough.

CI: one check (ssot) is in progress (the review pipeline itself); no failed checks.

Nit: The test comment // The reported case: the bare medium skin-tone swatch (🏽) is gone. references the bug-report context ("reported case"), which couples the comment to fix history that rots over time. Per project conventions, comments should describe the invariant, not the fix — e.g. // e.g. the medium skin-tone swatch (🏽) should not appear as a standalone hit says the same thing without the task coupling.

@wr wr merged commit ecbee0e into main Jun 25, 2026
10 checks passed
@wr wr deleted the wells/w-432-filter-components branch June 25, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant