fix(web): show retry when Flutter loading fails #12

Merged
morrning merged 1 commit from Seyyed/Seyyed_arc:codex/web-loader-retry into master 2026-10-12 21:03:23 +03:30
2 changed files with 12 additions and 1 deletions

View file

@ -33,5 +33,12 @@
hesabixStartFlutter().catch(function (e) {
console.error('[Hesabix] Flutter bootstrap failed:', e);
var loaderUi = window.__hesabixLoaderUI;
if (loaderUi && typeof loaderUi.markSlowLoad === 'function') {
loaderUi.markSlowLoad();
}
if (loaderUi && typeof loaderUi.showRetry === 'function') {
loaderUi.showRetry();
}
});
})();

View file

@ -363,6 +363,7 @@
setStatus: setStatus,
setStatusKey: setStatusKey,
markSlowLoad: markSlowLoad,
showRetry: showRetry,
hide: hideLoadingScreen,
t: t,
detectLocale: detectLocale,
@ -400,7 +401,10 @@
var screen = document.getElementById('flutter-loading-screen');
if (screen && !screen.classList.contains('hidden') && !appReadySignaled) {
console.warn('[Hesabix] Loader fallback timeout');
hideLoadingScreen();
// Flutter may still be compiling or initializing. Keep the loader visible
// instead of exposing the intentionally empty web loading widget.
markSlowLoad();
showRetry();
}
}, 120000);
})();