app
KiCad - the KiCad Bridge
Public Made by Adomby adom
Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.
← Commit history
v0.9.101: PREVENTION guardian (WS_EX_NOACTIVATE on offenders, cleared on last-guard/bring_to_user/close); quiet_console (CREATE_NO_WINDOW default — no more terminal blips); -NonInteractive on all PS; runner shadowing fix
6 files changed
+43−5
adom-bridge-kicad-manifest.json+3−3@@ -3,13 +3,13 @@ "name": "kicad", "version": "0.9.101", "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.101/adom-bridge-kicad-v0.9.101.zip",- "sha256": "54488db05f7494046db51ae454cf333861dcc2502adc7c44652647fdd7e2027e",- "size": 392971,+ "sha256": "f83d78fbb6d44b93b0c10685cda47ebbda282573105c492d3a088ce07090b21b",+ "size": 393996, "verbPrefixes": [ "kicad_" ], "healthEndpoint": "/status",- "released_at": "2026-08-15T09:53:07Z",+ "released_at": "2026-08-15T09:56:34Z", "hero": "https://wiki.adom.inc/blob/app/kicad-bridge/kicad-hero.png", "languages": [ "Python",
adom-bridge-kicad-v0.9.101.zip⋯ 1 unchanged line ⋯
handlers/open_footprint_editor.py+1−1@@ -368,7 +368,7 @@ def _navigate_to_footprint(fp_hwnd: int, footprint_name: str, load_after: bool = try: subprocess.run( [- "powershell", "-ExecutionPolicy", "Bypass",+ "powershell", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(_NAVIGATE_SCRIPT), "-SymEditorHwnd", str(fp_hwnd), "-SearchEditHwnd", str(search_edit),
handlers/open_symbol_editor.py+1−1@@ -295,7 +295,7 @@ def _navigate_to_symbol(sym_hwnd: int, symbol_name: str) -> dict: try: subprocess.run( [- "powershell", "-ExecutionPolicy", "Bypass",+ "powershell", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(_NAVIGATE_SCRIPT), "-SymEditorHwnd", str(sym_hwnd), "-SearchEditHwnd", str(search_edit),
quiet_console.pyadded+32@@ -0,0 +1,32 @@+"""quiet_console.py — no console window may EVER blip onto the user's screen.++John (2026-08-15): "if you're doing a lot of powershell commands via your bridge+... when you open them, don't make a terminal window come to the foreground and+blip." Root cause: the bridge server runs WITHOUT a console (ab spawns it+CREATE_NO_WINDOW / Start-Process -WindowStyle Hidden), so every CONSOLE child it+launches (powershell.exe, kicad-cli.exe) makes Windows allocate a brand-new+VISIBLE console window — a foreground blip per call. GUI children (kicad.exe,+eeschema, pcbnew) are unaffected by the flag either way.++Fix, centrally: imported ONCE at server boot, this wraps subprocess.Popen (which+subprocess.run/check_output use internally) so CREATE_NO_WINDOW is OR'd into+creationflags by default on Windows. Every current and FUTURE subprocess in the+bridge inherits the fix — no per-call-site discipline required. Explicit+creationflags passed by a caller are preserved (we only OR the bit in).+"""+import subprocess+import sys++if sys.platform == "win32":+ CREATE_NO_WINDOW = 0x08000000+ _orig_init = subprocess.Popen.__init__++ def _quiet_init(self, *args, **kwargs):+ try:+ kwargs["creationflags"] = (kwargs.get("creationflags") or 0) | CREATE_NO_WINDOW+ except Exception:+ pass+ _orig_init(self, *args, **kwargs)++ if getattr(subprocess.Popen.__init__, "__name__", "") != "_quiet_init":+ subprocess.Popen.__init__ = _quiet_init
server.py+6@@ -982,6 +982,12 @@ def main(): if idx + 1 < len(sys.argv): port = int(sys.argv[idx + 1]) + # No console child may ever blip a terminal onto the user's screen (John 2026-08-15).+ try:+ import quiet_console # noqa: F401 (wraps subprocess.Popen with CREATE_NO_WINDOW)+ except Exception:+ pass+ print(f"[KiCad Bridge] starting v{BRIDGE_VERSION} on port {port} (pid {os.getpid()})", flush=True) # ── SINGLE-INSTANCE GUARD ────────────────────────────────────────────────