-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: ota update modal #24175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: ota update modal #24175
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…mobile into wsun/ota-update-modal
…mobile into wsun/ota-update-modal
| return { | ||
| isCheckingUpdates, | ||
| }; | ||
| }, [navigation, otaUpdatesEnabled]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing cleanup for InteractionManager callback on unmount
The useEffect in useOTAUpdates schedules a navigation callback via InteractionManager.runAfterInteractions but doesn't return a cleanup function to cancel it. If the Main component unmounts (e.g., user logs out) while the callback is pending, the navigation to OTAUpdatesModal will still be attempted against a potentially stale navigation context. The runAfterInteractions returns a cancellable handle that could be stored and cancelled in a cleanup function returned from the effect.
…mobile into wsun/ota-update-modal
| return { | ||
| isCheckingUpdates, | ||
| }; | ||
| }, [navigation, otaUpdatesEnabled]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Effect may run multiple times despite documentation
The hook's documentation states it "Runs once when the app initially opens," but the useEffect includes navigation in its dependency array. The navigation object from useNavigation() may change identity between renders, causing the effect to re-run. Without a guard (like a useRef to track if the check already ran), this could trigger multiple checkForUpdateAsync calls and multiple navigations to the OTA modal when the navigation object changes.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR introduces a new OTA Updates Modal feature that displays when an over-the-air update is available. The changes include:
Risk Assessment:
Tag Selection Rationale:
No other tags are needed because:
|
|



Description
Implement OTA Update modal
Changelog
CHANGELOG entry: Added OTA updates modal
Related issues
Fixes: #24110
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Introduces an OTA Updates modal and refactors the OTA update flow to navigate to this modal when a new update is fetched, adding routes, analytics events, and tests.
OTAUpdatesModalbottom sheet (app/components/UI/OTAUpdatesModal/*) with Reload action (callsexpo-updates.reloadAsync).useOTAUpdatesto check/fetch on app start and navigate toOTAUpdatesModalwhenfetchUpdateAsync().isNewis true; removes blocking FoxLoader flow inApp.Routes.MODAL.OTA_UPDATES_MODALand screen inRootModalFlow(app/components/Nav/App/App.tsx,app/constants/navigation/Routes.ts).OTA_UPDATES_MODAL_VIEWEDandOTA_UPDATES_MODAL_PRIMARY_ACTION_CLICKED(app/core/Analytics/MetaMetrics.events.ts).ota_update_modal(locales/languages/en.json).OTAUpdatesModalanduseOTAUpdatesbehavior.Apptests to mockuseOTAUpdatesand remove FoxLoader/OTA gating test.Written by Cursor Bugbot for commit b7c04fc. This will update automatically on new commits. Configure here.