-
Notifications
You must be signed in to change notification settings - Fork 56
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
Bugfix: wait for settings loading before onboarding redirect check #5470
base: main
Are you sure you want to change the base?
Bugfix: wait for settings loading before onboarding redirect check #5470
Conversation
If you refresh the app while viewing a file, the settingsActor could not have loaded the user settings before checking the onboardingStatus setting. This uses a subscription on the settingsActor to await the "init" state, after the user settings have loaded.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5470 +/- ##
=======================================
Coverage 86.02% 86.02%
=======================================
Files 95 95
Lines 35754 35754
=======================================
Hits 30757 30757
Misses 4997 4997
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@pierremtb pointed out some major flaws with the current approach, and upon reflection this is not at all the way to do this. The function for the loader will have already returned with |
16b9b78
to
4356b2b
Compare
If you refresh the app while viewing a file, the settingsActor could not have loaded the user settings before checking the onboardingStatus setting. This uses a
useEffect
to subscribe to navigation events and trigger navigation to the onboarding if necessary. It adds aTODO
comment with the approach that should be taken once router data and methods can be slotted into theappMachine
and the navigation can occur after the user settings are loaded, without needing to touch React.