Repository navigation
fix(mobile): Android composer renders DM Sans - #30230
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The Android composer now resolves configured fonts through ReactFontManager, and context chips automatically use bundled DM Sans. A human must confirm the default chip typography change, including its effect on text layout. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The Android screen header's Compose title and subtitle had no font family, and the native composer mapped every non-mono family to Typeface.DEFAULT, so both rendered in Roboto while chat text used DM Sans. Pass DMSans-Regular to the header's Compose Text, and resolve the composer's family through React Native's ReactFontManager, which holds the fonts expo-font registers. The placeholder follows the editor's typeface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4dae28a to
6227a9d
Compare
Native chrome uses the system font on both platforms (the iOS header is SF), so this PR only fixes the Android composer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate 7d68b93
Problem
On Android, the composer (the "Ask anything" hint, typed text, and inline file/mention chips) rendered in Roboto while the chat body and the iOS composer render DM Sans. Reported in #30199.
Change
setFontFamilymapped every non-mono name toTypeface.DEFAULT, ignoring theDMSans-Regularthe JS sends (iOS already honours it). It now resolves the name withReactFontManager, the same lookup React Native and@expo/uiuse. The module declaresreact-androidfor that import. The composer then recomputes its line spacing, because that spacing depends on the current font's metrics and props can arrive in any order.sans-serif-medium. They now useDMSans-Medium, the weight the iOS chips use, through the same lookup. A build without the bundled font keepssans-serif-medium.The Android header is intentionally unchanged: native chrome stays on the system font on both platforms (the iOS header is SF). Configurable fonts are a separate, later change.
The Kotlin change alters the Android native fingerprint, so this reaches users with the next native build. iOS is unchanged (same native fingerprint on
mainand this branch).Verification
vp run check:changedpasses.AGENTS.mdchip entered the same way. Crops are 1:1 from 1080×2424 captures.main)Not checked: large system text sizes, Android versions other than API 36, and the no-bundled-font fallback for chips on a device.
Written by Claude Opus 5.5 (Claude Code), with GPT-6.1 Sol (Codex) for review and captures, through T3 Code.
🤖 Generated with Claude Code