fix(desktop): render text reaction fallbacks safely - #4996
Draft
AaronGoldsmith wants to merge 4 commits into
Draft
fix(desktop): render text reaction fallbacks safely#4996AaronGoldsmith wants to merge 4 commits into
AaronGoldsmith wants to merge 4 commits into
Conversation
Co-authored-by: Bozo <c52c3b2f8ad8558a64330f4f9929518e12d500f76e2d7d3aca75ebe7f7a79ea7@buzz.block.builderlab.xyz> Signed-off-by: Bozo <c52c3b2f8ad8558a64330f4f9929518e12d500f76e2d7d3aca75ebe7f7a79ea7@buzz.block.builderlab.xyz>
Co-authored-by: Bozo <c52c3b2f8ad8558a64330f4f9929518e12d500f76e2d7d3aca75ebe7f7a79ea7@buzz.block.builderlab.xyz> Signed-off-by: Bozo <c52c3b2f8ad8558a64330f4f9929518e12d500f76e2d7d3aca75ebe7f7a79ea7@buzz.block.builderlab.xyz>
Co-authored-by: Bozo <c52c3b2f8ad8558a64330f4f9929518e12d500f76e2d7d3aca75ebe7f7a79ea7@buzz.block.builderlab.xyz> Signed-off-by: Bozo <c52c3b2f8ad8558a64330f4f9929518e12d500f76e2d7d3aca75ebe7f7a79ea7@buzz.block.builderlab.xyz>
Co-authored-by: SmartyP <bc4b2dcdb5359ccde0d49f65d1dda695890634a6a3bcc82346e38232934a75d9@buzz.block.builderlab.xyz> Co-authored-by: Smarty <bc4b2dcdb5359ccde0d49f65d1dda695890634a6a3bcc82346e38232934a75d9@buzz.block.builderlab.xyz> Signed-off-by: SmartyP <bc4b2dcdb5359ccde0d49f65d1dda695890634a6a3bcc82346e38232934a75d9@buzz.block.builderlab.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:missing_reaction:displays asmissing_reaction), while preserving raw reaction content for titles, accessibility, and toggle identity.emojiUrlbranch.Kind-7 reaction content is literal under NIP-25, so existing or legacy arbitrary-text events retain their meaning and are rendered safely rather than rejected. NIP-30's matching
emojitag / resolvedemojiUrlremains the only custom-image signal.This is intentionally different from:
This PR is Desktop-only: it changes no relay ingest, persistence, protocol, or channel derivation. A possible CLI warning for an unknown
:shortcode:sent without--emoji-urlis intentionally deferred and not coupled to rendering compatibility.Reproduction
The resulting kind-7 event has no matching NIP-30
emojitag, so Desktop must treat the content as a text fallback rather than forcing it into a native-emoji box.Testing
pnpm biome check src/features/messages/ui/MessageReactions.tsx src/features/messages/lib/reactionGlyphPresentation.ts src/features/messages/lib/reactionGlyphPresentation.test.mjs src/shared/lib/emojiOnly.ts tests/e2e/reaction-names.spec.tspnpm test(4,373 passed)pnpm build:e2epnpm exec playwright test tests/e2e/reaction-names.spec.ts(3 passed), covering:ship itpill + hover popoversq agents review main...HEAD --local ...after addressing its malformed-ZWJ finding (final local review: no findings)Screenshots from Testing
Pill row: unresolved shortcode, arbitrary text, and long literal text — each bounded, left-aligned, and truncated without overlapping its count
Original UI rendering bug example