Skip to content

Emoji font: review follow-up from longbridge/gpui-mobile#29 - #11

Merged
Bombatomica64 merged 2 commits into
mainfrom
lab-emoji-review
Oct 12, 2026
Merged

Bombatomica64 merged 2 commits into
mainfrom
lab-emoji-review

Conversation

@Bombatomica64

Copy link
Copy Markdown
Owner

Merges `android-host-emoji-font` (773e5ad, the review follow-up for longbridge#29) into main. Conflict in the `set_host_activity` doc comment resolved by keeping main's text plus the deferred-load sentence; main's `or_clear` calls are kept.

🤖 Generated with Claude Code

Bombatomica64 and others added 2 commits October 12, 2026 07:54
Review follow-up for the host-path emoji font:

- If host::start runs before set_host_activity, the platform finds no
  AssetManager. It now leaves its text system pending and logs a warning,
  and set_host_activity loads the font once it has the AssetManager. The
  host.rs docs say set_host_activity comes first.
- host_assets runs in a JNI local frame, so the context and AssetManager
  local references are freed even when the caller stays in native code.
- set_host_activity clears a pending exception on every error path.
- load_asset_bytes reads the asset into one Vec of its size instead of
  copying the mapped buffer, so the ~10 MB font is not held twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-emoji-review

# Conflicts:
#	src/android/jni.rs
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T08:02:44.649797Z a252a73 PR opened
ℹ️ 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: a252a73999

ℹ️ 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".

Comment thread src/android/platform.rs
"loaded bundled CBDT emoji font from assets ({} bytes)",
bytes.len()
);
if let Err(e) = text_system.add_fonts(vec![std::borrow::Cow::Owned(bytes)]) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add deferred fonts through GPUI's text system

When host::start wins the race far enough for a surface to render text before set_host_activity runs, this adds the font directly to the platform CosmicTextSystem. That bypasses GPUI's TextSystem::add_fonts, which invalidates cached font resolution and line layouts, and this UI-thread path also requests no redraw. Consequently, already rendered emoji can remain cached as missing glyphs even though the log reports that the deferred font loaded; route the late installation through the app text system on the render thread and invalidate/redraw the windows.

Useful? React with 👍 / 👎.

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