← Commit history

Update 40 file(s)

John Lauer ·bc62fcdcc3 ·1mo ago ·parent 15d4549
1 file changed +19−4
server.py+19−4
@@ -667,12 +667,27 @@ def _handle_rescan_libraries(kicad_info: dict, args: dict) -> dict:                 if h and _tree_refresh(h):                     refreshed.append(int(h))             if refreshed:+                # HONEST WORDING (wiki #71, Ray, 2026-09-02). This used to claim+                # "Parts installed before this call are NOW VISIBLE" on the+                # strength of a menu action having been INVOKED. It never+                # verified that the index actually rebuilt, and Ray's transcript+                # shows the sequence install -> rescan(ok) -> show_library FAIL:+                # the refresh reported success and changed nothing, so the ok+                # read as a no-op and sent him hunting in the wrong place.+                #+                # A tree refresh reloads what the editor can already see; it does+                # NOT clear KiCad's PROCESS-WIDE library cache, which is what a+                # newly installed symbol needs. Say what was done, not what we+                # hope it achieved.                 return {"success": True, "method": "tree-refresh",                         "refreshedEditors": refreshed,-                        "_hint": ("Library trees reloaded in place - no restart. Parts "-                                  "installed before this call are now visible. If a show "-                                  "verb still reports library_cache_stale afterwards, call "-                                  "again with force:true for the full restart.")}+                        "verified": False,+                        "_hint": ("Refresh INVOKED on the open editor tree(s) - not verified, "+                                  "and it does not clear KiCad's process-wide library cache. "+                                  "It helps when the library was already indexed and only the "+                                  "tree was stale. If the part was installed after kicad.exe "+                                  "started, this will NOT reveal it: call again with force:true "+                                  "for the process restart that rebuilds the index (~1 min).")}         except Exception:             pass     from handlers.open_footprint_editor import _restart_kicad_for_cache