From c77fed2ef1686416612f6269a616fd89c8c4247d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20T=C3=B6rcsv=C3=A1ri?= Date: Tue, 2 Jun 2026 17:22:51 +0200 Subject: [PATCH] fix(web): seed KiCad config for all tools to skip the first-run wizard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every standalone tool (eeschema, pcbnew, calculator) boots through common/single_top.cpp, which runs STARTWIZARD::CheckAndRun() — the first-run "KiCad Setup" wizard. It shows whenever any provider (SETTINGS / LIBRARIES / PRIVACY) reports NeedsUserInput(), which is always true on our ephemeral MEMFS with no config, and its modal loop crashes Asyncify. Only eeschema was seeding config, so pcbnew and the calculator hit the wizard. Flip TOOL_NEEDS_CONFIG_SEED to true for pcbnew and calculator so seedKicadConfig runs in preRun for all three (it writes the kicad_common.json privacy flags and the sym/fp/design-block lib-tables the providers check), making NeedsUserInput() false and skipping the wizard. Verified in-browser: pcbnew renders a board at /p/mytest/pcbnew/bottom.kicad_pcb and the calculator loads, both wizard-free. Co-Authored-By: Claude Opus 4.8 (1M context) --- kicad | 2 +- web/apps/frontend/src/wasm/constants.ts | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/kicad b/kicad index d701b23..3ced43c 160000 --- a/kicad +++ b/kicad @@ -1 +1 @@ -Subproject commit d701b2365aeb327b9737d97b72aafa1da4d07dc2 +Subproject commit 3ced43c0b471b607ce263f78216f7e6cf4e834ed diff --git a/web/apps/frontend/src/wasm/constants.ts b/web/apps/frontend/src/wasm/constants.ts index a4c645c..2ddda4e 100644 --- a/web/apps/frontend/src/wasm/constants.ts +++ b/web/apps/frontend/src/wasm/constants.ts @@ -27,15 +27,18 @@ export const TOOL_ARGV0: Record = { }; /** - * Tools whose standalone entry (single_top.cpp) runs the first-run setup wizard - * on launch. That wizard's modal loop crashes Asyncify in our ephemeral MEMFS, - * so for these we seed a default KiCad config before main() to suppress it. - * Mirrors which harness HTMLs include `seedKicadConfig` in preRun (eeschema only). + * Every standalone tool here boots through common/single_top.cpp, which runs + * STARTWIZARD::CheckAndRun() — the first-run "KiCad Setup" wizard. It shows + * whenever any provider (SETTINGS / LIBRARIES / PRIVACY) reports + * NeedsUserInput(), which is always true on our ephemeral MEMFS with no config, + * and its modal loop crashes Asyncify. So for all of them we seed a default + * KiCad config before main() (kicad_common.json privacy flags + the lib-tables + * the providers check) so NeedsUserInput() is false and the wizard is skipped. */ export const TOOL_NEEDS_CONFIG_SEED: Record = { - pcbnew: false, + pcbnew: true, eeschema: true, - calculator: false, + calculator: true, }; /** KiCad user settings dir for this build (PATHS::GetUserSettingsPath()). */