fix(tauri): prevent ios blank screen#2240
Merged
peterchinman merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughThe Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
d0101b6 to
96331f8
Compare
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/app/packages/queries/soup/normalized-cache/operations.test.ts`:
- Around line 226-237: The test uses unsafe casts ((filter as
any)[filterKey][idKey] and (filter as any)[key]) which violates the no-any rule;
replace these casts by defining a local typed interface for the ID filter map
(e.g. type IdFilterMap = Record<string, Record<string, string[]>>) or a more
specific shape that matches `filter` and use it to assert values, then access
properties as (filterTyped[filterKey][idKey]) and (filterTyped[key]) where
filterTyped is the typed variable; update the test to import or declare the type
near the test and remove both any casts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 86b1b291-28b8-4022-a7cb-1ef011af0fa0
📒 Files selected for processing (6)
js/app/packages/app/component/Root.tsxjs/app/packages/core/service.tsjs/app/packages/core/util/maybeResult.tsjs/app/packages/notifications/components/PlatformNotificationProvider.tsxjs/app/packages/queries/soup/normalized-cache/operations.test.tsjs/app/packages/tauri/src/TauriProvider.tsx
💤 Files with no reviewable changes (1)
- js/app/packages/notifications/components/PlatformNotificationProvider.tsx
js/app/packages/queries/soup/normalized-cache/operations.test.ts
Outdated
Show resolved
Hide resolved
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.
Fixes issue introduced in #2228
Tauri/iOS, MaybePushNotificationRegistration renders PlatformNotificationProvider
outside UserContextProvider (it wraps the entire app tree). When that provider
rendered BrowserNotificationModal, the modal called useIsAuthenticated()
unconditionally — which throws "UserContext must be used within " since UserContextProvider hadn't been entered yet. This uncaught error caused the
blank screen.
On iOS, createDefaultBrowserInterface checks Notification in window — if it's present
(iOS 16.4+), it calls createTabLeaderSignal → new Tab() →
navigator.locks.request(...), which may not exist on older iOS WKWebView. This also
silently shadowed the correct Tauri push notification provider.