fix(anime): harden browser playback and modal lifecycle

- Abort upstream fetches when clients disconnect
- Validate embedded modal readiness before opening
- Centralize browser IPC and window lifecycle
This commit is contained in:
2026-08-16 01:21:07 -07:00
parent 877f350353
commit 4300517da7
11 changed files with 413 additions and 217 deletions
+6 -1
View File
@@ -453,7 +453,12 @@ void (async () => {
renderBridgeState({ stage: 'idle', progress: null, message: null });
// A queue survives the window being closed and reopened, so start from what
// the main process already holds rather than from empty.
void api.getQueue().then((state) => detailPanel.setQueue(state));
void api.getQueue().then(
(state) => detailPanel.setQueue(state),
() => {
// A live queue event can still populate the panel after a failed snapshot request.
},
);
void api.getPlaybackState().then(
(state) => {
if (!receivedPlaybackStateEvent) detailPanel.setPlaybackState(state);