Skip to content

fix: migrate Android edge-to-edge and harden system UI ownership#12558

Draft
huhuanming wants to merge 3 commits into
xfrom
codex/ok-57542-analysis
Draft

fix: migrate Android edge-to-edge and harden system UI ownership#12558
huhuanming wants to merge 3 commits into
xfrom
codex/ok-57542-analysis

Conversation

@huhuanming

@huhuanming huhuanming commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrate Android to one consistent edge-to-edge window model and harden system-bar ownership, navigator backgrounds, recovery/error fallbacks, and native TabBar insets across supported Android versions.

Problems resolved

  • White system bars and transition flashes: dark onboarding or Prime surfaces could expose the light Activity/window background around transparent system bars.
  • Onboarding header actions positioned too low: close/language controls treated a valid zero inset as missing and added fallback spacing again.
  • Native TabBar overlapping system navigation: ignoreBottomInsets disabled Material Components' inset handling after edge-to-edge became active.
  • Incorrect system-bar icon contrast: app-theme updates and still-mounted fixed-dark routes raced while writing to the same Activity Window.
  • Dark-route transition flash: PrimeDashboard → PrimeFeatures could briefly restore the light app theme between blur and focus.
  • Inconsistent navigator backgrounds: onboarding, full-screen push, modal, and root navigators did not always paint behind transparent system bars.
  • Unsafe fallback surfaces: native Recovery and ErrorBoundary fallbacks could render under system controls; ErrorBoundary must also remain independent from native safe-area components.
  • Version-dependent behavior: Android 15+ enforced edge-to-edge while older versions retained the legacy window model.

What changed

  • enable React Native edge-to-edge consistently and reapply it after splash/theme initialization
  • initialize the React Native edge-to-edge feature flag in the custom Application entry point
  • centralize app-level system UI appearance and add a narrow fixed-dark owner set only for Onboarding, PrimeDashboard, and PrimeFeatures
  • use React Navigation's focus lifecycle so frozen routes release ownership correctly; defer base-theme restoration to avoid dark-to-dark flashes
  • give onboarding and navigator surfaces explicit theme backgrounds
  • consume WindowInsets in native Recovery and use conservative core-RN fallback spacing in ErrorBoundary
  • preserve valid zero safe-area insets only on Android for PageClose/Onboarding/Prime while retaining iOS fallback spacing
  • remove ignoreBottomInsets so the native Material TabBar consumes navigation-bar insets
  • isolate Android system UI/theme behavior in .android.ts modules and Android runtime branches; preserve the existing iOS StatusBar/root background lifecycle and Web/Desktop no-op/DOM behavior
  • keep DemoPushKitProvider and generic BasicPage ownership out of the final diff

Android navigation regression

All modes were tested on an API 35 emulator at 1080 × 2400. Two-button navigation is retained as a legacy AOSP compatibility regression.

Mode TabBar bounds System navigation bounds Overlap
Gestural [0,2190][1080,2337] [0,2337][1080,2400] 0 px
Legacy two-button [0,2190][1080,2337] [0,2337][1080,2400] 0 px
Three-button [0,2127][1080,2274] [0,2274][1080,2400] 0 px
Gestural navigation Legacy two-button navigation Three-button navigation
Android gestural navigation regression Android legacy two-button navigation regression Android three-button navigation regression

Validation

  • exercised onboarding and wallet creation on the API 35 emulator through adb reverse tcp:8081 tcp:8081
  • revalidated the native TabBar in gestural, legacy two-button, and three-button navigation after the final refactor
  • completed parallel iOS and Web/Desktop audits after platform isolation; no remaining P0–P3 findings
  • release-android GitHub Actions run succeeded for commit e27c9615a6f190f020da868f3abb92f83114f0a7
  • EAS Android production APK build queued as build d807750e-f826-4de5-a76c-da515b84e113
  • yarn jest packages/components/src/hooks/systemUIState.test.ts --runInBand
  • yarn lint:staged
  • yarn tsc:staged
  • git diff --check

Issue

OK-57542

@huhuanming
huhuanming marked this pull request as ready for review July 20, 2026 08:20
@huhuanming huhuanming changed the title fix: migrate Android system UI to edge-to-edge fix: migrate Android edge-to-edge and fix system UI insets Jul 20, 2026
@huhuanming
huhuanming marked this pull request as draft July 20, 2026 08:24
@huhuanming huhuanming changed the title fix: migrate Android edge-to-edge and fix system UI insets fix: migrate Android edge-to-edge and harden system UI ownership Jul 20, 2026
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