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
Publish 1.0.90
4 files changed
+16−14
dashboard/kicad_dashboard.py+1−1@@ -49,7 +49,7 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path from urllib.parse import unquote, urlparse -VERSION = "4.0.1"+VERSION = "4.0.2" AI_THREAD = "kicad-dashboard" DEFAULT_PORT = 8931 UI_DIR = Path(__file__).resolve().parent / "ui"
dashboard/ui/index.html+13−11@@ -579,20 +579,22 @@ $('#btnClose').onclick=async()=>{toast('closing the bridge\u2019s KiCad windows' // everything else: card, grid, table, icons, clipboard, send, toasts, X and // the header toggle. We only tell it our noun and what the demo does. async function buildSay(){- let phrases=[];- try{const r=await act('say');phrases=((r.data||r).phrases)||[];}catch(e){}- if(!phrases.length)return;- // The module is a separate <script src>. If its request raced a server- // restart (or is merely slow), the old guard returned and the page showed NO- // panel at all, silently - which is exactly the "panel with no prompts"- // failure the fleet audit kept finding. Retry briefly instead of bailing.- const mountNow=()=>{+ // Two things can be late at boot: the phrase list (act() rides the selected+ // target, which loadTargets() has not resolved yet on first paint) and the+ // module <script>. Either being late used to leave the page with NO panel,+ // silently - the same "panel with no prompts" shape the fleet audit kept+ // finding on other apps. So poll for both, briefly, instead of returning.+ const attempt=async()=>{ if(!window.AdomNewbiePanel)return false;- try{ doMount(phrases); return true; }catch(e){ console.error('newbie panel mount failed',e); return true; }+ let phrases=[];+ try{const r=await act('say');phrases=((r.data||r).phrases)||[];}catch(e){}+ if(!phrases.length)return false;+ try{ doMount(phrases); }catch(e){ console.error('newbie panel mount failed',e); }+ return true; };- if(mountNow())return;+ if(await attempt())return; let tries=0;- const t=setInterval(()=>{ if(mountNow()||++tries>20)clearInterval(t); },250);+ const t=setInterval(async()=>{ if(await attempt()||++tries>20)clearInterval(t); },400); } function doMount(phrases){ AdomNewbiePanel.mount({
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "kicad-bridge",- "version": "1.0.89",+ "version": "1.0.90", "type": "app", "description": "Skills for your container so your AI knows how to drive the KiCad bridge. The bridge runtime itself is the release zip; Adom Bridge loads that.", "tags": [
page.json+1−1@@ -4,7 +4,7 @@ "slug": "kicad-bridge", "title": "KiCad - the KiCad Bridge", "brief": "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.",- "version": "1.0.89",+ "version": "1.0.90", "tags": [ "kicad", "pcb",