Skip to content

plat merge 3 cross cleanup#29214

Merged
chrisnojima merged 2 commits into
nojima/HOTPOT-plat-merge-2from
nojima/HOTPOT-plat-merge-3
May 18, 2026
Merged

plat merge 3 cross cleanup#29214
chrisnojima merged 2 commits into
nojima/HOTPOT-plat-merge-2from
nojima/HOTPOT-plat-merge-3

Conversation

@chrisnojima

Copy link
Copy Markdown
Contributor

No description provided.

@chrisnojima chrisnojima merged commit e611c92 into nojima/HOTPOT-plat-merge-2 May 18, 2026
1 check was pending
@chrisnojima chrisnojima deleted the nojima/HOTPOT-plat-merge-3 branch May 18, 2026 17:05
chrisnojima added a commit that referenced this pull request May 18, 2026
* Merge 5 stub platform pairs into unified .tsx files

Pairs merged (desktop stub + native impl → single file with isMobile guard):
- settings/make-icons.page
- teams/add-members-wizard/add-contacts
- teams/invite-by-contact/team-invite-by-contacts
- provision/code-page/qr-scan/scanner
- util/expo-image-picker

Update explicit .native imports in input.native.tsx, misc.native.tsx,
and fs-platform.native.tsx to point to the new merged files.

* Fix desktop build: move native-only imports inside mobile code path

contacts-list.native and use-contacts.native import expo-contacts and
expo-localization. Now that add-contacts.tsx and team-invite-by-contacts.tsx
are plain .tsx files, those top-level imports would be bundled by desktop
webpack. Move them into require() calls inside the mobile component bodies.

* Merge observer hooks and simple util platform pairs

- use-intersection-observer: desktop impl with isMobile stub guard
- use-resize-observer: desktop impl with isMobile stub guard
- common-adapters/text-url: unified useClickURL with isMobile branch
- app/main: two named components, export isMobile ? NativeMain : DesktopMain
- globals.native.d.ts: add stubs for browser observer/DOM types used in desktop branches
- Update explicit .desktop/.native imports in index files and main2.desktop.tsx

* Fix Task 2 type errors: DOM stubs in globals.native.d.ts, avoid typeof import for desktop files

* merge platform files: image, list, bottom-sheet, floating-box, text-url, app/main, observers

* merge navigation: screen-layout, crypto sub-nav, relogin

* merge chat components: giphy, input, list-area, video, conversation, inbox

* merge infrastructure: push, settings-contacts, fs-platform, storeless-actions, platform-specific, engine

* merge platform constants and utils: platform, init, electron, misc

* merge router and styles — final large platform splits

* merge common-adapters/index and fix styles/globals native stubs

* fix webpack: null-load .native.tsx files; inline useRootKey in router

* fix lodash require: remove incorrect .default on CommonJS exports

* fix useIntersectionObserver require: access .default for default export

* fix iOS crash: replace await import() with require() in _getNative

Metro's dynamic import() calls importAll() which iterates all lazy
getters of a module, including PushNotificationIOS from react-native.
That getter calls NativeEventEmitter before native modules are
registered, causing: "new NativeEventEmitter() requires a non-null
argument".

The original index.native.tsx used static named imports (import
{Linking} from 'react-native') which do not trigger importAll. The
merged file used await import('react-native') which does.

Fix: use require() throughout _getNative to avoid importAll on
react-native and other packages. Also inline the now-synchronous
netInfoSetup and initAudioModes wrappers.

* replace dynamic require() with static imports in app/main and chat message wrappers

* replace dynamic require() with static imports in chat audio/video/giphy/normal components

* replace dynamic require() with static imports in chat list/inbox/input/fullscreen

* replace dynamic require() with static imports in common-adapters

* replace dynamic requires with static imports in batch 5

* add expo-clipboard and expo-image to native-only-modules for webpack

* replace dynamic requires with static imports in batch 6

* replace dynamic requires with static imports in batch 7

* replace dynamic requires with static imports in batch 8

* replace dynamic requires with static imports in batch 9

- router-v2/linking.tsx: static Linking import; keep push require (cycle)
- router-v2/screen-layout.tsx: static react-native-screens/experimental import
- router-v2/router.tsx: static @callstack/liquid-glass, @react-navigation/bottom-tabs, react-native imports
- engine/index.platform.tsx: static KB2, local-debug, platform, react-native-kb imports; keep require('net')
- native-only-modules.js: add @callstack/liquid-glass, react-native-screens/experimental, @react-navigation/bottom-tabs
- webpack.config.mts: sort aliases longest-first so subpath entries (e.g. foo/bar) match before their prefix (foo)

* WIP

* WIP

* plat merge 3 cross cleanup (#29214)

* WIP

* WIP
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