-
Notifications
You must be signed in to change notification settings - Fork 450
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
feat(desktop): add database reset page to fix blank screen from corrupted file #1627
Conversation
@ysfscream Do you think it is necessary to add a second confirmation popup and button loading? |
@Red-Asuka Of course, this is an operation that requires user consent and a secondary confirmation. it's a good suggesion. However, I'm suddenly wondering if it's possible to recover some data from the damaged database before rebuilding the database file? @DM1-1 |
When displaying this page, the database has been unable to connect successfully. I am uncertain whether it is possible to retrieve information from the database and filter out the data that caused the connection failure. |
@DM1-1 YES, i think so. I mean, we can minimize the loss of user data as much as possible. So, maybe we can do some more technical research? What do you think? Even if we can't recover all the data, we could discard the messages but keep some simple information that can be appropriately located, including connection details. For example, we could directly read the database file, or look online for other methods. If it's completely damaged and unreadable, this method won't work, and we can display this page as is. |
PR Checklist
If you have any questions, you can refer to the Contributing Guide
What is the current behavior?
The current behavior is that the application displays a blank screen when the database file is corrupted, preventing users from interacting with the application.
Issue Number
#1370
What is the new behavior?
The new behavior is that upon detecting a database corruption, the application will redirect the user to an error page where they can initiate a database reset. This resolves the white screen issue and allows the user to restore the application to a working state.
Does this PR introduce a breaking change?
Specific Instructions
If you wish to conduct testing, you can do so by altering the fields within the
MQTTX.db
file in the application data to make them non-conforming to the schema.Other information
The UI and UX for the error page and database reset feature are still a work in progress and will be refined in future updates.
This change has been tested on macOS and Windows platforms to confirm that it resolves the white screen issue caused by database corruption.