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.
TODO: keep debugging the background guard (backgroundGuard) before turning it back on by default
Decision (John, 2026-09-21): "the default in your latest release should be to have the guard be off. i think you just are too aggressive with it and kicad acts weird when you have it on, so make a todo where we continue to debug it in coming weeks and then maybe we turn it on by default."
From 1.0.50 backgroundGuard defaults to off: the bridge moves no KiCad window at all, and KiCad comes to the front the way it does on its own. Anyone can still turn it on (dashboard: Keep KiCad in the background, or kicad_set_settings {"backgroundGuard": true}); the bridge's focus log records what the guard WOULD have done either way (guard OFF: would have pushed this window), so the two modes can be compared without switching.
This issue is the work before it may be on by default again. Related: #112 (every new KiCad window grabs the foreground for a moment), #113 (taskbar badge, done).
What we learned on 2026-09-21 (AdomLapper, John clicking during live runs)
- Explorer crashed twice (Taskbar.View.dll, 0xc0000005) when the guard forced "the user's previous window" to the front and that window was the taskbar John had just clicked. Fixed in 1.0.40 (never a shell window) and 1.0.48 (the per-verb check asks instead of forcing).
- John's own clicks were yanked back. The old rule guessed "was that the user?" from a 120 ms mouse poll and a timing window. 1.0.41 replaced it: only a window the bridge is opening RIGHT NOW may be pushed; every existing KiCad window is the user's. Still wrong in one case: a window the user clicks during the few seconds it is being created.
- A window opening under the cursor was taken for a click (1.0.46 fix): recent input now only counts with the cursor on the taskbar or Start.
- Two mechanisms, one switch. The per-verb focus check after every window verb ignored the switch until 1.0.48, so the first "guard off" A/B run was not off.
- Refused pushes. A window busy loading refuses the push; 1.0.38 retried and hammered Explorer (reverted in 1.0.39). A retry that touches only the KiCad window is still open.
- KiCad's own setup wizard popped up on every editor start (fixed in 1.0.47), which made the guard look worse than it was.
Before on-by-default again
- A full verb battery with the guard ON and the user actively clicking the KiCad taskbar buttons and Alt-Tabbing: zero yanks of a window the user raised, zero Explorer crashes (check Windows' Application log for
Explorer.EXEfaults). - The same run with a fullscreen video playing: count the moments KiCad covers it (#112).
- A preventive guard instead of push-after-the-fact (#112 options), so the window never reaches the front in the first place.
- John's A/B verdict on his own machine.