Skip to content

fix(mobile): never show emoji shortcodes in reaction pills - #9411

Merged
brow merged 1 commit into
mainfrom
mobile-reaction-shortcode-fallback
Nov 12, 2026
Merged

brow merged 1 commit into
mainfrom
mobile-reaction-shortcode-fallback

Conversation

@brow

@brow brow commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Context

A reaction slot should never show an emoji shortcode as text. Today it does in two cases:

  • An agent's reaction is a kind 7 event with content :shortcode: and no NIP-30 emoji tag, so the pill printed :approve: in tiny text instead of the community emoji.
  • A custom emoji whose image fails to load fell back to the shortcode text.

Behavior

  • A tagless :shortcode: reaction resolves against the community custom-emoji palette and renders that image. An emoji tag on the event still wins.
  • A shortcode with no palette entry, or whose image fails to load, shows a neutral placeholder glyph (the muted sparkles icon) instead of text. The shortcode survives only as the semantics label.
  • This applies to every reaction slot: the timeline pills, the combined reaction tray, the Flutter reaction detail sheet, and the native iOS reactions sheet (which is told which shortcodes have no image, so NativeMessageGlyph draws the placeholder). System-message rows reuse the same reaction row.
  • Unicode emoji are unchanged.

The icon is the existing BuzzIcons.sparkles. Pareto note: the palette lookup is the shared reactionEmojiUrl helper, so there is no new resolver, and the pill only watches the palette when the reaction has no tag.

Validation

  • just mobile-check mobile-test: format and analyze clean; full suite passes (4773 passed, 74 skipped).
  • New widget tests (journeys, in reaction_row_test/shortcode_tests.dart): a tagless known shortcode renders its image; an unknown shortcode and a failed image render the placeholder and never the text; unicode is unchanged; the native sheet payload marks image-less shortcodes. Reverting the fix makes both new journeys fail.
  • iOS: added a Swift unit test for the native glyph placeholder (NativeMessageImageLoaderTests); not run locally, the app run below exercises the same code.
  • Automated app run on a cloned iOS simulator with a fixture entry point (mocked media, synthetic palette): confirmed the pills before and after, and opened the reaction sheet from a long-press to confirm the placeholder renders there too. The clone was deleted afterwards.

Before / after

Captures use synthetic shortcodes and a synthetic palette.

reaction-pills-before

reaction-pills-after

Reaction sheet after:

reaction-sheet-after

🤖 Generated with Claude Code

A reaction slot (timeline pill, combined tray, reaction sheet, native iOS
sheet) now never renders a `:shortcode:` as text. A tagless shortcode
reaction, as agents send today, resolves against the community custom-emoji
palette and shows that image. A shortcode with no palette entry, or whose
image fails to load, shows the neutral sparkles placeholder; the shortcode
stays only as the semantics label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Signed-off-by: Tom Brow <[email protected]>
brow pushed a commit that referenced this pull request Nov 12, 2026
@brow

brow commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T19:32:22.289730Z 0b1af91 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b1af910a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// The neutral glyph that stands in for a custom emoji with no image: a muted
/// sparkles icon, because a truncated `:shortcode:` is illegible at glyph size.
/// The shortcode survives only as the semantics label.
class CustomEmojiPlaceholder extends StatelessWidget {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move the public placeholder widget into its own file

Adding CustomEmojiPlaceholder here puts two public widgets in the same file alongside the existing CustomEmojiImage, violating the mobile rule in AGENTS.md: “One public widget per file.” Move the placeholder into a separate shared custom-emoji file and import it from both consumers.

AGENTS.md reference: AGENTS.md:L780-L782

Useful? React with 👍 / 👎.

@brow
brow marked this pull request as ready for review November 12, 2026 19:30
@brow
brow requested a review from a team as a code owner November 12, 2026 19:30
@brow
brow deployed to codex-review November 12, 2026 19:31 — with GitHub Actions Active
@brow
brow enabled auto-merge (squash) November 12, 2026 19:32
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 12, 2026
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: cb69ad9e4f21b25954d76f4ce1b406f882dafecc...0b1af910a861af7ca182c4aba877251245fbc6e8
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability findings identified in the authorized changes after tracing palette resolution, media authorization, caching, and native sheet updates.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source and test inspection. Builds and tests were not executed, as instructed.

Generated by Codex Security Review |
Requested by: @brow |
Workflow run

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez.

@brow
brow merged commit 4a10175 into main Nov 12, 2026
60 checks passed
@brow
brow deleted the mobile-reaction-shortcode-fallback branch November 12, 2026 21:38
ravarora2 added a commit that referenced this pull request Nov 12, 2026
…small

* origin/main:
  perf(acp): reduce observer CPU and lock overhead (#9381)
  ci: fix main — stale RunCause call sites and Playwright on ubuntu-26.04 (#9418)
  fix(mobile): keep shortcut taps and the member picker from wedging (#9388)
  fix(mobile/ios): close notification code blocks only at line-ending fences (#9349)
  fix(media): run thumbnail regeneration tests in CI and cap rebuild pixels (#9198)
  fix(mobile): never show emoji shortcodes in reaction pills (#9411)
  fix(mobile): isolate channel header scroll rebuilds (#9400)

Signed-off-by: Ravneet Arora <[email protected]>

This branch was successfully deployed

1 active deployment
codex-review — 0b1af910 Deployed Nov 12, 2026 by brow via Run Codex Security Review #14651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants