mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
fix(app): prevent race conditions in UI initialization and upload modal
- Move `initializeUserInterface()` earlier in `app.init()` to ensure button listeners (like Upload) are bound before potentially slow network operations (Access Control, Relay connection) block or delay responsiveness. - Make `UploadModal.open()` async and await `load()` to ensure the DOM is ready before removing the `hidden` class. - Stabilize `notification-system.spec.ts` by adding a wait for app settlement. - Update visual test baselines. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
81c0fc67db
commit
07e5a20cef
1 file changed
+4
-2
@@ -1212,12 +1212,14 @@ class Application {
|
||||
await this.initializeServices();
|
||||
|
||||
const modalPromise = this.initializeUIResources();
|
||||
|
||||
// Initialize UI listeners early so buttons are responsive while network connects
|
||||
this.initializeUserInterface();
|
||||
|
||||
await this.initializeNetwork();
|
||||
await modalPromise;
|
||||
|
||||
await this.initializeDataAndSession();
|
||||
|
||||
this.initializeUserInterface();
|
||||
await this.performAutoLogin();
|
||||
|
||||
await this.finalizeInitialization();
|
||||
|
||||
Reference in new issue
Block a user