fix(frontend): guard startup and loading shortcuts

This commit is contained in:
zipg authored and GitHub committed 2026-08-03 16:57:26 +08:00
1 parent 246dfad018
commit 658e3d16ad
17 files changed
+420 -15

No files matched your search

+4
View File
@@ -4,6 +4,7 @@ import VueVirtualScroller from "vue-virtual-scroller";
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
import "./styles/globals.css";
import { installDebugLogCapture } from "@/lib/backend/debugLog";
import { clearStartupPreloadRetry, retryStartupAfterPreloadFailure } from "@/lib/startup/startupPreloadRecovery";
function startupErrorMessage(error: unknown): string {
if (error instanceof Error) {
@@ -13,6 +14,7 @@ function startupErrorMessage(error: unknown): string {
}
function renderStartupError(error: unknown) {
if (retryStartupAfterPreloadFailure(error)) return;
const message = startupErrorMessage(error);
console.error("[STARTUP] bootstrap failed", error);
const root = document.querySelector<HTMLDivElement>("#root");
@@ -84,6 +86,8 @@ async function bootstrap() {
app.use(i18n);
app.use(VueVirtualScroller);
app.mount("#root");
clearStartupPreloadRetry();
window.dispatchEvent(new Event("dbx:startup-ready"));
console.log("[STARTUP] vue mounted");
installGlobalInputAttrs();