forked from tari-project/universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: setup flow listeners | progress getting stuck (tari-project#1402)
Description --- - ~~moved gl app logic out of `index.html` (-> `visuals.ts`) & actually remove canvas entirely when toggling visual mode, instead of just hiding it~~ moving to separate PR - moved the Visual Mode toggle out of 'Experimental' Settings to General Settings - removed the listener for `frontend_ready` from RunEvent:Ready and used `.on_page_load` instead, including the tauri state value of `is_setup_finished` so we can skip the setup screens on the frontend if that's already done and the `setup_message` events won't be emitted again - also added `ProgressTracker`'s `.send_last_action` in there so if it _is_ still setting up, we can continue on and show the actual progress on the FE where it was before the restart/refresh - adjusted `useAppStateStore` a bit so we don't start with a truly value for the setup check (most of the file changes were amending the uses of `isSettingUp` after changing that around, sorry!) Main files with actual changes --- - ~~items moved from [`index.html`](https://github.com/tari-project/universe/pull/1402/files#diff-0eb547304658805aad788d320f10bf1f292797b5e6d745a3bf617584da017051) to [`src/visuals.ts`](https://github.com/tari-project/universe/pull/1402/files#diff-5f2854a948facaeb956b06299de2f47fd38733eb7cd85f5b6ed8edee49bf1fbb) (minor additions in `src/visuals.ts`~~ moving to separate PR - [`src-tauri/main.rs`](https://github.com/tari-project/universe/pull/1402/files#diff-2f5e0a90d4195e9986f5e24928dce16b59a80a2cf30f7059b38d55bd7d1eff69) - setup progress addition to [`src/hooks/app/isAppReady.ts`](https://github.com/tari-project/universe/pull/1402/files#diff-95c4d89aef2e2cee2be8a93864b2975ff76cc54eacadb0a0ee8238ed54bca36a) - ~~cleanups + preload animation in [`src/hooks/app/useSetUp.ts`](https://github.com/tari-project/universe/pull/1402/files#diff-818735307e6ef43bcc35e6609d72a1580524718a151bf5cf8d4d192c46ef5a41)~~ moving to separate PR - neatening and moved some actions out of the main store in [`src/store/appStateStore.ts`](https://github.com/tari-project/universe/pull/1402/files#diff-0d2e757ebac18751f8a38695036dc9f6a8e005c6a2cd7915dc7cafe49a05c5f2) so they can be used outside of hooks/don't need to be added as deps Motivation and Context --- tari-project#1400 + the issue of setup getting stuck either at 0% or 100% How Has This Been Tested? --- locally doesn't get stuck on zero if there's a refresh for whatever reason (likely crash + restarts in prod builds/auto update), and `setup_inner` isn't triggered again because `is_setup_finished` is already true: https://github.com/user-attachments/assets/bf812724-4742-4526-924e-94403f9cc597 refreshing/a reload after setup is complete goes straight to the main view + ~~canvas is completely removed on visual mode toggle~~ (moving to separate PR): https://github.com/user-attachments/assets/52d00998-6069-4a2a-975b-eb4cf809e99d
- Loading branch information
1 parent
1b79664
commit 086a6fb
Showing
25 changed files
with
132 additions
and
125 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.