feat(desktop): bundled renderer, modules and instance accounts (#3254)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-07 16:48:07 +02:00
1 parent c748c8af4e
commit 7c5fa2180a
1275 files changed
+215074 -81246

No files matched your search

+20 -2
View File
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import '@app/app/BootShell.css';
import {startAppStorage} from '@app/features/platform/state/AppStorageBootstrap';
import {installBrowserStorageAccessProtection} from '@app/features/platform/state/ProtectedWebStorage';
import '@fluxer/fonts/css/fluxer-sans.css';
import '@fluxer/fonts/css/fluxer-mono.css';
@@ -13,22 +15,26 @@ import '@app/features/theme/styles/generated/message-layout.css';
import '@app/features/theme/styles/preflight.css';
import {resolveDomainMigrationSide} from '@app/features/app/domain_migration/DomainMigrationCore';
import {runDomainMigrationPreMount} from '@app/features/app/domain_migration/DomainMigrationPreMount';
import {installRuntimeConfigEffects} from '@app/features/app/state/RuntimeConfigEffects';
import {Logger} from '@app/features/platform/utils/AppLogger';
import {loadLazyModule} from '@app/features/platform/utils/LazyModuleLoader';
import {installUnhandledRejectionReporter} from '@app/features/platform/utils/UnhandledRejectionReporter';
import {PASSKEY_BRIDGE_PATH} from '@fluxer/constants/src/PasskeyConstants';
import {configure} from 'mobx';
const logger = new Logger('index');
installBrowserStorageAccessProtection();
installUnhandledRejectionReporter();
configure({disableErrorBoundaries: true, enforceActions: 'observed'});
function loadAppBootstrap() {
return loadLazyModule(() => import('@app/app/AppBootstrap'));
return loadLazyModule(() => import(/* webpackChunkName: "app-bootstrap" */ '@app/app/AppBootstrap'));
}
async function bootstrap(): Promise<void> {
installRuntimeConfigEffects();
const passkeyBridgeSide =
window.location.pathname === PASSKEY_BRIDGE_PATH ? resolveDomainMigrationSide(window.location.origin) : null;
if (passkeyBridgeSide !== null) {
@@ -39,8 +45,20 @@ async function bootstrap(): Promise<void> {
if (await runDomainMigrationPreMount()) {
return;
}
const storageBootstrap = await startAppStorage();
const {runApp} = await loadAppBootstrap();
await runApp();
await runApp(storageBootstrap);
confirmDesktopLaunch();
}
function confirmDesktopLaunch(): void {
const confirmLaunch = globalThis.window?.electron?.desktopModules?.confirmLaunch;
if (confirmLaunch == null) {
return;
}
confirmLaunch().catch((error: unknown) => {
logger.warn('Failed to confirm the desktop launch:', error);
});
}
async function showBootstrapError(error: unknown): Promise<void> {