fix(hero): render HexChartFallback on Android — skip SVG entirely#70
Merged
Conversation
…store Manrope on iOS/web Hero kept native-crashing on Android even with ErrorBoundary in place. A native crash from react-native-svg's C++/Java side bypasses the JS boundary — there's no way to catch it in JS. The user reported the app still force-closes after PR #69 OTA'd. Pivot: on Android, never construct any react-native-svg components. Render HexChartFallback (pure-RN Views/Text) directly. Same data, same look-and-feel for the dim cards / pips, just without the radar polygon. iOS and web continue to render the proper HexChart with Manrope on SvgText labels. Both platforms still wear the ErrorBoundary so any JS-level throw drops in inline. Restored fontFamily="Manrope_800ExtraBold" on the SvgText labels per user request — the rest of the app already uses Manrope and the inconsistency was visible. Re-enable the SVG path on Android once react-native-svg ships the Brush.getVal null guard (PR software-mansion/react-native-svg#2940) and we resolve native typeface registration for SVG text. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Hero kept native-crashing on Android even after PR #69's ErrorBoundary. A native crash from react-native-svg's C++/Java side bypasses any JS error boundary — there's no way to catch it from JS. So the boundary alone wasn't enough.
Pivot
On Android, never construct any react-native-svg components on Hero. Render
HexChartFallback(pure-RN Views + Text) directly. Same data, same dim cards, same pip rows — just no radar polygon visualization.iOS and web keep the proper
HexChartwith all its SVG goodness, still wrapped in the ErrorBoundary as belt-and-suspenders.Plus
Restored
fontFamily="Manrope_800ExtraBold"on<SvgText>labels — the rest of the app uses Manrope and the inconsistency stood out. Now matters only for iOS/web (the only platforms that hit that code path).When can Android get the polygon back?
Two upstream blockers:
Brush.getValnull guard from software-mansion/react-native-svg#2940 needs to landOnce both are resolved (or we patch-package), drop the Platform.OS branch.
Test plan
🤖 Generated with Claude Code