diff --git a/desktop/src/main/index.ts b/desktop/src/main/index.ts index 42d8043a..347c52b9 100644 --- a/desktop/src/main/index.ts +++ b/desktop/src/main/index.ts @@ -77,7 +77,12 @@ ipcMain.handle('wizard:complete', async (_e, input: WizardInput) => { const b = base() await startStack(b, process.env) await waitHealthy(b) - await runAdminFixture(b, input.adminEmail, input.adminPassword) + const admin = await runAdminFixture(b, input.adminEmail, input.adminPassword) + if (admin.code !== 0) { + throw new Error( + `Could not set up the login: ${admin.stderr.trim() || admin.stdout.trim() || 'admin fixture failed'}` + ) + } saveConfig(cfg) return { ok: true } } catch (err) { diff --git a/desktop/src/renderer/wizard.ts b/desktop/src/renderer/wizard.ts index 90b5071b..20c2a728 100644 --- a/desktop/src/renderer/wizard.ts +++ b/desktop/src/renderer/wizard.ts @@ -1,15 +1,22 @@ /** - * First-run wizard. Secrets are auto-generated (no UI); the user picks inference + admin - * login. On submit the main process generates secrets, writes the .env, starts the stack, - * waits for HEALTHY, and runs the admin fixture. The API key is OPTIONAL — login and chat - * creation work without it, and keys can also be set later in the app's Settings (BYOK); - * the field just seeds the gateway for the simplest first run. + * First-run wizard. Secrets are auto-generated (no UI); the user picks inference + sets a + * password. The backend ships a fixed bootstrap admin (admin@lq.ai) and only a + * reset-admin-password command (no create-user), so the login email is admin@lq.ai — the + * user can change it later in the app's Settings. The API key is OPTIONAL (login/chat work + * without it; keys can also be set later in Settings). */ +const ADMIN_EMAIL = 'admin@lq.ai' + +interface Snapshot { + state: string + services?: { health: string }[] +} + export function renderWizard(root: HTMLElement, onDone: () => void): void { root.innerHTML = `
Donna runs a private legal-AI workspace on your Mac. This one-time setup creates - your login and starts the engine. The first start downloads AI models and can take +
Donna runs a private legal-AI workspace on your Mac. This one-time setup sets your + password and starts the engine. The first start downloads AI models and can take several minutes.
Your login is ${ADMIN_EMAIL} — you can change it later in Settings → Account.
+