[fix] Get rid of risky useEffect in restart onboarding flow#6133
[fix] Get rid of risky useEffect in restart onboarding flow#6133
Conversation
|
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6133 +/- ##
=======================================
Coverage 85.37% 85.37%
=======================================
Files 110 110
Lines 44215 44215
=======================================
Hits 37750 37750
Misses 6465 6465
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jacebrowning
left a comment
There was a problem hiding this comment.
I tested this in the local desktop and Vercel web app, but I wasn't sure if there's a way to restart onboarding in the web app.
pierremtb
left a comment
There was a problem hiding this comment.
Nice! We will have to fix https://github.com/KittyCAD/modeling-app/pull/6133/files#diff-4d755c62c8006e1add270bb5c32f02237af2e98532f4eed3b90542be9f5a6c2bR169 unfortunately before merging. But gtg after that
In certain cases this would cause an infinite loop in the web version of the app. We should eliminate all uses of this "fire and listen with a useEffect" antipattern in the code base, it was a mistake I introduced. This uses the XState `waitFor` function to wait **only once** for the transition to complete, with some error handling in case it fails.
5814852 to
48a3b8f
Compare
…#6133) Get rid of risky useEffect in restart onboarding flow In certain cases this would cause an infinite loop in the web version of the app. We should eliminate all uses of this "fire and listen with a useEffect" antipattern in the code base, it was a mistake I introduced. This uses the XState `waitFor` function to wait **only once** for the transition to complete, with some error handling in case it fails.
* origin/main: (26 commits) attempt to import win-ca on windows (#6136) Upgrade e2e-tests windows runner from 4 cores to 8 (#6166) Follow-up fixes after bearing sample rename (#6164) Add test for #5799: "Only showing axis planes when there are no errors" (#6007) Wait for export button to make test more reliable (#6143) sketching on a mirror2d thats been extruded fixed! (#6149) Bump vite from 5.4.16 to 5.4.17 in /packages/codemirror-lang-kcl in the security group (#6150) Bump vite from 5.4.16 to 5.4.17 in the security group (#6151) Update all KCL-Samples to be more ME friendly (#6132) Shorten feedback cycle for legitimate failures (#6146) Remove the camera projection toggle from the UI (#6077) Use all available CPUs to run tests on CI (#6138) [fix] Get rid of risky useEffect in restart onboarding flow (#6133) Feature: Traditional menu actions in desktop application part II (#6030) [Bug] fix some UI friction from imports (#6139) Use scene fixture to make test more reliable on macOS (#6140) Fix: function composition during playwright setup created a massive page.reload loop (#6137) Alternative way to make appMachine spawned children type safe (#5890) [BUG] mutate ast to keep comments for pipe split ast-mod (#6128) Rename the app to Zoo Design Studio (#5974) ...
In certain cases this would cause an infinite loop in the web version of the app. We should eliminate all uses of this "fire and listen with a useEffect" antipattern in the code base, it was a mistake I introduced. This uses the XState
waitForfunction to wait only once for the transition to complete, with some error handling in case it fails.Fixes #5737 but cc @jacebrowning this is something I wish I could do web+desktop testing for.