KiCad - the KiCad Bridge
Public Made by Adomby adom
Drive your own KiCad from an AI, in the background: open every editor, read the whole board as data (the EDA Bridge Standard board model), stack-up, part heights, netlists, place, route, pour, DRC and exports.
kicad_open_* matches a BROWSER tab titled 'KiCad' as the app (title-substring), so it WM_COMMANDs Chrome and never launches KiCad
Symptom. kicad_open_symbol_editor (and probably the other kicad_open_* verbs) fails when KiCad is CLOSED but a browser tab happens to have "KiCad" in its title. It returns:
WM_COMMAND sent to KiCad but Symbol Editor did not appear within 10s. (hint: call screenshot_all for a modal dialog)
...but there is no modal, and KiCad never launches (0 kicad.exe processes before AND after).
Root cause (by elimination). With KiCad fully closed, process_list shows zero kicad/eeschema/pcbnew processes, yet the bridge reports "WM_COMMAND sent to KiCad" - so it found a window it BELIEVES is KiCad and sent it a message instead of launching KiCad. The only window on the machine with "KiCad" in its title was a Chrome-for-Testing tab: "KiCad - the KiCad Bridge - Adom Wiki - Google Chrome for Testing" (the kicad-bridge wiki page, open in pup). The bridge appears to detect "is KiCad running" by a title-substring match on "KiCad", which also matches any browser tab, editor, or doc whose title contains "KiCad". It then takes the "send WM_COMMAND to the running app" path and skips launching, so the Symbol Editor never appears.
Repro. 1) Close KiCad entirely. 2) Open any browser tab whose title contains "KiCad" (e.g. this bridge's own wiki page). 3) Call kicad_open_symbol_editor. It fails as above and never launches KiCad. Close the "KiCad" browser tab and it launches fine.
Fix. Identify KiCad by process (kicad.exe) and/or window CLASS, not by a title substring. A Chrome window is Chrome_WidgetWin_1; the KiCad manager/editor windows have their own wx classes. Match those, or check for a live kicad.exe process, before deciding "KiCad is running" vs "launch it."
This is also a strong argument for the <prefix>_state / correct-window-identity pattern just suggested for bridges (a separate feature-request): a bridge that owns its app's real window identities (by process/class) would never confuse a browser tab for the app.
Environment: Windows 11, Adom Bridge 2.0.37, KiCad 10. Surfaced by the web-control demo's "Open KiCad" recipe.