Skip to content

feat(cosmetics): add EMOTE_PACK cosmetic type with pack validation - #109

Merged
diangogav merged 2 commits into
mainfrom
feat/emote-packs
Oct 14, 2026
Merged

diangogav merged 2 commits into
mainfrom
feat/emote-packs

Conversation

@diangogav

@diangogav diangogav commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds the EMOTE_PACK cosmetic type (domain enum and a Postgres enum migration).
  • An emote pack is published under emote-packs/<slug>/. It holds one pack.json and 1 to 12 Lottie files.
  • pack.json (version 1) lists each emote's key, label and file.
    • Keys are kebab-case, at most 20 characters and unique.
    • file must be <key>.json.
    • <slug>/<key> must fit in 48 bytes.
    • Every listed file must be uploaded, and every uploaded Lottie must be listed.
  • Each Lottie must be vector-only, at most 200 KB and at most 3 seconds long. Image assets, fonts, text layers and expressions are rejected, because the client renders emotes with lottie_light (SVG).
  • The expression check walks the tree iteratively up to a depth of 64. Deeper input is a 400, not a stack overflow.
  • An EMOTE_PACK cannot be equipped through PUT /me/loadout. Emotes are chosen through the emote bar in the next PRs.
  • The admin upload schema now accepts up to 13 files for every type. PublishCosmetic keeps the 8-file limit for every type except EMOTE_PACK.

Chain context

This is part of the emote packs feature: emote packs become cosmetics, and each player builds an 8-slot emote bar from the default emotes and the emotes of packs they own. The duel server already relays any emote id up to 48 bytes (diangogav/EDOpro-server-ts#418).

This is a stacked chain into main. Merge the PRs in order. After each merge, retarget the next PR to main.

main
└── #109 EMOTE_PACK cosmetic type and pack validation 📍
  └── #110 emote bar domain and persistence
    └── #111 GET and PUT /me/emote-bar
      └── #112 emote bar fixes

Size

719 changed lines: 294 production, 425 tests. The maintainer accepted a size exception because the excess over the budget is tests.

Verification

  • bun test: 683 pass, 0 fail (on the top of the chain).
  • bun run lint and bun run build --noEmit are clean.

@diangogav diangogav self-assigned this Oct 14, 2026
@diangogav
diangogav merged commit fae0be1 into main Oct 14, 2026
1 check passed
@diangogav
diangogav deleted the feat/emote-packs branch October 14, 2026 23:59
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