TGViewer
Telegram github commits and releases Telegram github commits and releases @tgappsupdates · 4.53K subscribers
Post #20533 187
morethanwords/tweb/master • 1ddddac • 2 files, +39/-2
Fix big emoji disappearing in production builds

An emoji-only message stopped rendering big and animated once built — in dev it
was always fine, which is what made it look like a settings or server problem.

src/vendor/emoji/regex.ts held lone surrogates in its string value: the upstream
pattern splits astral emoji across alternations, so '\uD83C[\uDFFB-\uDFFF]' has
a high surrogate with nothing to pair with. Rolldown folds that constant into
the bundle and re-encodes it as UTF-8, where a lone surrogate has no
representation — in index.worker-*.js every one of them came out as U+FFFD
followed by the leftover "d83c", 1246 times. Evaluating the shipped pattern
confirms it: 😳 🔥 👍 😀 no longer match, while ❤ ☝ ⌚ still do, because those
are BMP and were never written as surrogates.

So the worker's FULL_REG_EXP produced no messageEntityEmoji for any astral
emoji, totalEntities carried none, and bubbles' emojiStrLength === strLength
test could never hold — bigEmojis stayed 0, no .emoji-big, no animated sticker.
Only the worker chunk was affected, which is why the input's own suggestions
kept working: those are parsed on the main thread.

The literal is pure ASCII now — every \u and \x backslash is doubled, so the
escapes stay text and RegExp resolves them itself when the pattern compiles.
Same matching, and nothing left in the string for a bundler to mangle. A test
pins both halves: the source stays ASCII, and parseEntities still returns an
emoji entity spanning the whole emoji. A clean build has zero U+FFFD in any
chunk.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

morethanwords/tweb/master • 1d0ec11 • 1 files, +7/-0
Stop rebuilding the emoji suggestions for an emoji already suggested

Typing 😳 into an input that already ended in 😳 tore the suggestion strip down
and built it again from scratch: a fresh searchCustomEmoji, a new container for
every item, replaceWith, and the scroll back at zero — all to arrive at exactly
what was on screen.

checkAutocomplete only guards against an unchanged value, but the emoticon is
derived from it: getCustomEmojiSuggestionEmoticon slices from the emoji entity
that ends at the caret, so a longer value can still name the same emoji.
checkEmoticon took it from there unconditionally.

It returns early now when the emoticon matches the one already on screen. The
helper has to be visible for that — hidden means the strip was torn down and
must be rebuilt, and it also covers an in-flight request that a hide cancelled.
A different emoticon, or a `:query` search (which clears this.emoticon), still
renders as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

#webk
  • 🫡 3
More from @tgappsupdates
  1. Oct 15, 2026TGX-Android/Telegram-X/main • a6c184f • 6 files, +29/-2 Windows Compile Fixes (#1107) #tgx…
  2. Oct 14, 2026morethanwords/tweb/master • c120515 • 6 files, +22/-0 Composer: an Article item in the att…
  3. Oct 14, 2026morethanwords/tweb/master • fefad9f • 20 files, +314/-70 Unread voices, a playlist that re…
  4. Oct 14, 2026telegramdesktop/tdesktop/dev • c317da9 • 5 files, +90/-27 Use whitelisted domains from API…
  5. Oct 14, 2026TGX-Android/Telegram-X/main • 275879f • 1 files, +1/-0 Add `USE_FULL_SCREEN_INTENT` permis…
  6. Oct 14, 2026TGX-Android/Telegram-X/main • df7245d • 1 files, +6/-2 Update `docs` #tgxandroid
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →