Skip to content

fix(ios): create the root host without importing the UI stack - #23

Merged
farfromrefug merged 1 commit into
mainfrom
fix/ios-lazy-content-view
Nov 30, 2026
Merged

farfromrefug merged 1 commit into
mainfrom
fix/ios-lazy-content-view

Conversation

@farfromrefug

Copy link
Copy Markdown

application.ios.ts imported ContentView at module level, which pulled the whole UI stack in with the application module and broke its load order (workers must not load the UI).

ContentView now registers a factory (setContentViewFactory) when it is imported, and the application creates its root host through createContentView().

Risk: createContentView() throws if ui/content-view was never imported. A root made only of a Frame (no Page, no ContentView import anywhere) would hit it.

Testing: in a bare vitest config, 9 of 12 application/frame/page spec files failed to load on main (circular import) and 4 fail with this change. The remaining failures read native iOS globals (_getSystemAppearance) that this config does not mock. Not verified with the full nx test setup or on a device.

🤖 Generated with Claude Code

application.ios imported ContentView at module level, which pulled the
whole UI stack in with the application module and broke its load order
(workers must not load the UI at all). ContentView now registers a
factory when it is imported, and the application creates its root host
through it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug merged commit 8c405f6 into main Nov 30, 2026
0 of 2 checks passed
@farfromrefug
farfromrefug deleted the fix/ios-lazy-content-view branch November 30, 2026 16:09
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