fix(desktop): add legacy engine startup compatibility notice

This commit is contained in:
zipg authored and GitHub committed 2026-09-29 12:23:56 +08:00
1 parent cf78eebbc9
commit ff7d817603
8 files changed
+869 -4

No files matched your search

+11 -1
View File
@@ -4,7 +4,7 @@ import "./styles/globals.css";
import { installDebugLogCapture } from "@/lib/backend/debugLog";
import { retryStartupAfterPreloadFailure } from "@/lib/startup/startupPreloadRecovery";
import { markStartupPhase } from "@/lib/startup/startupTiming";
import { applyLegacyWebViewClass } from "@/lib/ui/legacyWebView";
import { applyLegacyWebViewClass, isBlockingCompatFailure } from "@/lib/ui/legacyWebView";
function startupErrorMessage(error: unknown): string {
if (error instanceof Error) {
@@ -77,6 +77,16 @@ function installGlobalInputAttrs() {
async function bootstrap() {
markStartupPhase("bootstrap");
console.log("[STARTUP] frontend bootstrap begin");
// The inline engine probe in index.html has already painted an upgrade notice when this
// engine cannot style the shell; mounting over it would only replace a readable message
// with an unstyled UI. The notice's own button reloads once the user opts to continue.
if (isBlockingCompatFailure()) {
markStartupPhase("compat-blocked");
console.warn("[STARTUP] blocked by engine compatibility notice");
window.dispatchEvent(new Event("dbx:startup-ready"));
return;
}
const [{ default: i18n, loadSavedLocale }, { default: App }] = await Promise.all([import("./i18n"), import("./StartupGate.vue")]);
console.log("[STARTUP] frontend modules loaded");
const localeReady = loadSavedLocale();