← Commit history

0.9.254: bundle install leaves the Symbol Editor open on the new library (capture proof no longer closes it; closeEditor:true restores)

Colby Knox ·eb26d2d21c ·1mo ago ·parent 0e97f77
5 files changed +27−20
BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.9.253\ No newline at end of file+0.9.254\ No newline at end of file
adom-bridge-kicad-manifest.json+5−5
@@ -1,15 +1,15 @@ {   "manifest_version": 1,   "name": "kicad",-  "version": "0.9.253",-  "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.253/adom-bridge-kicad-v0.9.253.zip",-  "sha256": "38149498618f100760933e128d83265afe79c90359a817f6d36b82037f4f58c0",-  "size": 453215,+  "version": "0.9.254",+  "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.254/adom-bridge-kicad-v0.9.254.zip",+  "sha256": "c145f2bd6889ce8fd0238eba175213699c87d6ad222ecb7eba132424a64d752c",+  "size": 453466,   "verbPrefixes": [     "kicad_"   ],   "healthEndpoint": "/status",-  "released_at": "2026-08-26T21:24:52Z",+  "released_at": "2026-08-27T21:10:30Z",   "hero": "https://wiki.adom.inc/blob/app/kicad-bridge/kicad-hero.png",   "languages": [     "Python",
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "kicad",   "displayName": "KiCad EDA",-  "version": "0.9.253",+  "version": "0.9.254",   "description": "Reverse bridge for KiCad \u2014 board/schematic introspection, lint via kicad-cli, plugin install, multi-instance probe, in-process DRC.",   "homepage": "https://wiki.adom.inc/adom/adom-bridge",   "author": "Adom Inc.",
handlers/install_library_bundle.py+19−12
@@ -81,9 +81,13 @@ def _top_symbol_names(sym_path: Path) -> list:  def _capture_proof(kicad_info: dict, args: dict, lib_name: str, first_symbol: str, result: dict):     """Proof frame for the browser caller: open the Symbol Editor on the-    freshly installed library IN THE BACKGROUND (the show path's contract),-    grab the shot, then close the editor we opened. Best effort: any failure-    lands in proofSkipped, never in the install's success."""+    freshly installed library IN THE BACKGROUND (the show path's contract)+    and grab the shot. The editor is LEFT OPEN, loaded on the new library+    with the tree filtered to its name, so the user who surfaces KiCad sees+    their list immediately (Colby, 2026-08-27: closing it made the install+    feel unverified). It stays BEHIND the user's windows, never foregrounded.+    Pass closeEditor:true for the old close-after behavior. Best effort: any+    failure lands in proofSkipped, never in the install's success."""     try:         from handlers.show import handle_show_symbol         show = handle_show_symbol(kicad_info, {@@ -96,14 +100,15 @@ def _capture_proof(kicad_info: dict, args: dict, lib_name: str, first_symbol: st             result["shot"] = show["shot"]         else:             result["proofSkipped"] = show.get("error") or show.get("shotUnavailable") or "no frame captured"-        # Close only an editor this call cold-opened; a reused window belongs-        # to whoever opened it.-        if not show.get("reused"):-            try:-                from handlers.close_windows import handle_close_symbol_editor-                handle_close_symbol_editor(kicad_info, {})-            except Exception:-                pass+        if args.get("closeEditor"):+            if not show.get("reused"):+                try:+                    from handlers.close_windows import handle_close_symbol_editor+                    handle_close_symbol_editor(kicad_info, {})+                except Exception:+                    pass+        else:+            result["editorLeftOpen"] = True     except Exception as e:         result["proofSkipped"] = str(e) @@ -204,7 +209,9 @@ def handle_install_library_bundle(kicad_info: dict, args: dict) -> dict:                 + ("KiCad was RUNNING during the install: it reads sym-/fp-lib-table at startup only, "                    "so the user must restart KiCad before the library appears. Never close their KiCad for them."                    if kicad_running else-                   "KiCad was not running; the library appears on next launch.")+                   "KiCad was not running; the library appears on next launch. With capture:true the "+                   "Symbol Editor is left open IN THE BACKGROUND on the new library (tree filtered to "+                   "its name), so the user sees their parts the moment they surface KiCad.")             ),         }         # Proof frame (capture:true): only when KiCad was NOT already running.
server.py+1−1
@@ -359,7 +359,7 @@ _VERB_CATALOG = {         "related": ["kicad_install_symbol", "kicad_install_footprint", "kicad_list_versions"],         "pitfalls": ["each KiCad version has its OWN lib tables — install under every version the user needs", "restart/reload KiCad to see a newly-added library", "model-ref rewriting touches only the INSTALLED copy, never the source, and only refs whose basename matches an installed model (stock ${KICAD*_3DMODEL_DIR} refs stay)"]},     "install_library_bundle": {"summary": "Install an Adom wiki Cloud Library bundle zip (symbols + footprints + 3D models) in one call.", "long": False,-        "hint": "Pass zipPath (staged on THIS machine via write_file / write_file_chunk) and optionally libraryName (defaults to the zip stem). Unpacks the bundle (<Lib>.kicad_sym + <Lib>.pretty/ + 3dmodels/), installs symbols and footprints, carries the 3D models with ref rewriting, and registers both lib tables. Returns {symbols, footprints, modelsInstalled, kicadRunning, restartNeeded}. capture:true additionally opens a BACKGROUND Symbol Editor on the new library, returns the `shot` frame (thumbnailDataUrl for browsers), and closes the editor it opened; skipped with proofSkipped when KiCad was already running (its tables predate the install).",+        "hint": "Pass zipPath (staged on THIS machine via write_file / write_file_chunk) and optionally libraryName (defaults to the zip stem). Unpacks the bundle (<Lib>.kicad_sym + <Lib>.pretty/ + 3dmodels/), installs symbols and footprints, carries the 3D models with ref rewriting, and registers both lib tables. Returns {symbols, footprints, modelsInstalled, kicadRunning, restartNeeded}. capture:true additionally opens a BACKGROUND Symbol Editor on the new library, returns the `shot` frame (thumbnailDataUrl for browsers), and LEAVES the editor open on the library (tree filtered to its name, still behind the user's windows; closeEditor:true restores close-after); skipped with proofSkipped when KiCad was already running (its tables predate the install).",         "related": ["kicad_install_library", "kicad_lint_library", "kicad_open_symbol_editor"],         "pitfalls": ["a RUNNING KiCad reads lib tables at startup only — when kicadRunning is true the user must restart KiCad themselves (never close it for them)", "zip entries with .. or absolute paths are refused"]},     "install_symbol": {"summary": "Install a .kicad_sym into the user's sym-lib-table.", "long": False,