← Commit history

v0.9.161: THE 'weird' root cause - the park baseline excluded bridge-created windows, so an already-open KiCad got re-parked off-screen on EVERY subsequent verb, for its whole life. Parking is now strictly for windows born DURING a verb

John Lauer ·a89e96e3b9 ·1mo ago ·parent 0fb77d2
5 files changed +22−15
BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.9.160+0.9.161
adom-bridge-kicad-manifest.json+5−5
@@ -1,15 +1,15 @@ {   "manifest_version": 1,   "name": "kicad",-  "version": "0.9.160",-  "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.160/adom-bridge-kicad-v0.9.160.zip",-  "sha256": "0ac61822de115957eb211d363e120502d4e94be6539133a190e22629ac68da56",-  "size": 441328,+  "version": "0.9.161",+  "url": "https://wiki.adom.inc/download/adom/kicad-bridge/0.9.161/adom-bridge-kicad-v0.9.161.zip",+  "sha256": "198c0eee32965ec33e0370bb83aa48a4271587612c7cb993b5af65d69fc6dac2",+  "size": 441539,   "verbPrefixes": [     "kicad_"   ],   "healthEndpoint": "/status",-  "released_at": "2026-08-18T10:33:41Z",+  "released_at": "2026-08-18T10:41:01Z",   "hero": "https://wiki.adom.inc/blob/app/kicad-bridge/kicad-hero.png",   "languages": [     "Python",
adom-bridge-kicad-v0.9.161.zipadded
⋯ 1 unchanged line ⋯
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "kicad",   "displayName": "KiCad EDA",-  "version": "0.9.160",+  "version": "0.9.161",   "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/win_focus.py+15−8
@@ -758,7 +758,6 @@ def _start_park_sweep() -> None:                                 _save_ledger()                             suppress_activation(h)                             _park_offscreen(h)-                            _park_since.setdefault(h, _t.monotonic())                             try:                                 from handlers.win_taskbar import apply_adom_badge                                 apply_adom_badge(h)  # "adom is driving this window"@@ -801,18 +800,25 @@ def _start_park_sweep() -> None:   def begin_gui_verb() -> None:-    """Dispatcher marks a GUI verb in flight; windows existing NOW that the-    bridge did NOT create are the user's (baseline) — anything newer gets-    parked by the 50ms sweep. Bridge-created windows stay bridge-created-    across verbs (rebaselining used to adopt the previous verb's window as-    the user's — the parking no-op of 2026-08-17)."""+    """Dispatcher marks a GUI verb in flight. The baseline is every window that+    ALREADY EXISTS as the verb starts; only windows that appear DURING the verb+    get parked, because parking exists for exactly one purpose: stopping a+    brand-new window from flashing into the user's face while it is created.++    0.9.161 (John: "it is really weird how you open kicad in the background"):+    the baseline used to subtract _bridge_windows, so every window the bridge+    had EVER created stayed permanently 'new' and got re-parked off-screen on+    EVERY subsequent verb - a launched KiCad kept getting yanked off the screen+    for the rest of its life, every time any verb ran. A window that has already+    finished its park/unpark cycle is settled; it belongs in the baseline like+    any of the user's own."""     global _verb_inflight     if _verb_inflight == 0 and _guard_count == 0:         for h in list(_bridge_windows):             if not _user32.IsWindow(h):                 _bridge_windows.discard(h)         _park_baseline.clear()-        _park_baseline.update(_enum_kicad_hwnds() - set(_parked.keys()) - _bridge_windows)+        _park_baseline.update(_enum_kicad_hwnds() - set(_parked.keys()))     _verb_inflight += 1     _start_park_sweep() @@ -899,7 +905,7 @@ def _ensure_window_icon(hwnd) -> None:         pass  -def _park_offscreen(hwnd) -> None:+def _park_offscreen(hwnd) -> None:  # noqa: D401 - clock stamped inside     """Move a window fully off the visible desktop WITHOUT activation.     (Instrumented: attempts + last error surface in focusDebug.)     SetWindowPos silently cannot move a MAXIMIZED window (the -13,-13 no-op,@@ -907,6 +913,7 @@ def _park_offscreen(hwnd) -> None:     normal-size at -32000 with SW_SHOWNOACTIVATE, remembering whether it was     maximized so unpark can honor it."""     global _park_attempts, _park_last_error+    _park_since.setdefault(hwnd, __import__("time").monotonic())     try:         _park_attempts += 1         if not _user32.IsWindow(hwnd):