fix: settings window rendering/loading issue#889
Merged
Conversation
f94b5ff to
478adf9
Compare
This commit fixes(I guess?) the issue that the Settings window may not be rendered or loaded, you will see that the whole window is gray in that case. Background, aka, why this issue exists ============================================================= In commit [1], we wrapped all the backend setup routines in a tauri command, so that frontend code can call it before invoking any other backend interfaces to guarantee that these interfaces won't be called until the data/state they rely on is ready. The implementation in [1] had an issue that it didn't work with window reloading. To fix this issue, we made another commit [2]. Commit [2] fixed the refresh issue, but it also caused the settings window issue that this commit tries to fix. The backend setup tauri command needs a state to track whether the setup has completed. In the previous implementation, this was done in the frontend. In this commit, it is moved to the backend. Why didn't you guys move that state to backend in previous commits, e.g., commit [2]? ============================================================= We tried, but failed. In the previous tries, the backend would send an event to the frontend, but the frontend couldn't receive it, for reasons we still don’t understand. And this weird issue still exists, we just happen to find a way to work around it. [1]: f93c527 [2]: 993da9a Co-authored-by: ayang <473033518@qq.com>
478adf9 to
bbf7dcb
Compare
luohoufu
approved these changes
Aug 27, 2025
medcl
approved these changes
Aug 27, 2025
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.
This commit fixes(I guess?) the issue that the Settings window may not be
rendered or loaded, you will see that the whole window is gray in that case.
Background, aka, why this issue exists
In commit 1, we wrapped all the backend setup routines in a tauri command, so
that frontend code can call it before invoking any other backend interfaces to
guarantee that these interfaces won't be called until the data/state they rely
on is ready.
The implementation in 1 had an issue that it didn't work with window reloading.
To fix this issue, we made another commit 2. Commit 2 fixed the refresh
issue, but it also caused the settings window issue that this commit tries to fix.
The backend setup tauri command needs a state to track whether the setup has
completed. In the previous implementation, this was done in the frontend. In
this commit, it is moved to the backend.
Why didn't you guys move that state to backend in previous commits, e.g., commit 2?
We tried, but failed. In the previous tries, the backend would send an event
to the frontend, but the frontend couldn't receive it, for reasons we still
don’t understand. And this weird issue still exists, we just happen to find
a way to work around it.
Standards checklist