Describe the bug
In �rowser.rs, the code obtains a synchronous RwLock write lock on the global state while simultaneously invoking Tauri IPC methods (w.hide(), w.show()). If the main UI thread attempts to read the state during the IPC call, it results in a classic thread deadlock, freezing the entire application.
To Reproduce
Trigger rapid tab switching while background tabs are aggressively loading.
Expected behavior
Global locks should never be held across cross-thread IPC boundaries.
Suggested Solution
Clone the necessary metadata out of the state, drop the RwLock manually, and then execute the Tauri Webview IPC calls outside the critical section.
Describe the bug
In �rowser.rs, the code obtains a synchronous RwLock write lock on the global state while simultaneously invoking Tauri IPC methods (w.hide(), w.show()). If the main UI thread attempts to read the state during the IPC call, it results in a classic thread deadlock, freezing the entire application.
To Reproduce
Trigger rapid tab switching while background tabs are aggressively loading.
Expected behavior
Global locks should never be held across cross-thread IPC boundaries.
Suggested Solution
Clone the necessary metadata out of the state, drop the RwLock manually, and then execute the Tauri Webview IPC calls outside the critical section.