← Commit history

v1.6.36: codify background-launch + ctypes-handle rules in dev skill

John Lauer ·6cbbcf9200 ·3mo ago ·parent 4343ce6
5 files changed +28−7
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.6.35\ No newline at end of file+1.6.36\ No newline at end of file
CHANGELOG.md+8
@@ -3,6 +3,14 @@ All notable changes to the Adom Desktop Fusion 360 bridge, newest first. Canonical: https://wiki.adom.inc/adom/adom-desktop-fusion-bridge · GitHub backup: `adom-inc/adom-desktop-fusion-bridge` +## 1.6.36 - 2026-07-06++- **Codified the background-launch rules in the `fusion-bridge-dev` skill** (John's request): the+  ctypes handle-truncation gotcha (the silent killer behind 1.6.33/1.6.34), how to VERIFY the guard by+  objective `GetWindowPlacement().showCmd == 2` state rather than by eye, and that the guard only fires+  on a FRESH launch (kill first for a clean background state). Verified live on the laptop: a clean+  `fusion_start` leaves `Fusion360 showCmd=2` (minimized) - the window never sits in the foreground.+ ## 1.6.35 - 2026-07-06  - **Fixed the focus-guard doing NOTHING due to a ctypes handle-truncation bug** (the real reason
adom-bridge-fusion-manifest.json+5−5
@@ -1,13 +1,13 @@ {   "manifest_version": 1,   "name": "fusion360",-  "version": "1.6.35",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.35/adom-bridge-fusion-v1.6.35.zip",-  "sha256": "1c6c5e151b651dbb964e5b88e42bcca8ae2ab32f0daf2a8e6d15fe66b8817952",-  "size": 335516,+  "version": "1.6.36",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.36/adom-bridge-fusion-v1.6.36.zip",+  "sha256": "d5e0a7eeb9bb7d0229137d77241bdc8c612f4288df75da661af8466480427ced",+  "size": 336248,   "verbPrefixes": [     "fusion_"   ],   "healthEndpoint": "/status",-  "released_at": "2026-07-06T11:28:28Z"+  "released_at": "2026-07-06T11:34:07Z" }
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.6.35",+  "version": "1.6.36",   "description": "Drive Autodesk Fusion 360 from the cloud: launch Fusion, electronics board layout, design rules, exports (STEP/IGES/STL/3MF/USDZ/OBJ/DXF/DWG/Gerbers/BOM/CPL), fast APS server-indexed cloud search plus browse/recent/file-info/versions, cloud file download/upload and folder creation, and in-app parametric modeling (fusion_run_modeling_script). Never-charge: APS calls are capped to the free tier.",   "homepage": "https://wiki.adom.inc/adom/adom-desktop-fusion-bridge",   "author": "Adom Inc.",
skills/fusion-bridge-dev/SKILL.md+13
@@ -26,6 +26,19 @@ opening path you add MUST follow it:   family (`_FUSION_FAMILY_IMAGES` = Fusion360 / FusionLauncher / AdskIdentityManager / …, matched by   process image via `_fusion_family_pids()`). It acts ONLY on focus-theft, so it never fights a user   who deliberately foregrounds Fusion. Any window-family you add MUST be in that set.+- **⚠️ ctypes HANDLE TRUNCATION — the silent killer (this bit us 2026-07-06).** Any Win32 call that+  RETURNS or ACCEPTS a handle (`HWND`, `HANDLE`) MUST have its `restype`/`argtypes` set, or ctypes+  defaults to `c_int` (32-bit) and **TRUNCATES the handle on 64-bit Windows**. `GetForegroundWindow()`+  with no `restype` handed back a garbage HWND, so `ShowWindowAsync` silently no-op'd and the focus+  guard minimized NOTHING for two releases (1.6.33/1.6.34) while looking correct — the user still had+  to alt-tab back themselves. Always: `user32.GetForegroundWindow.restype = wintypes.HWND`,+  `ShowWindowAsync.argtypes = [wintypes.HWND, c_int]`, etc. VERIFY by objective window state, not by+  eye or by sampling the foreground (a 0.1s-poll guard minimizes too fast to catch in a snapshot):+  `GetWindowPlacement(...).showCmd == 2` (SW_SHOWMINIMIZED) on the family window == guard is working.+- **The guard only runs on a FRESH launch.** `ensure_fusion_running()` starts it after it spawns the+  process; if Fusion is ALREADY running, `fusion_start` returns early and the guard never fires, so an+  already-foreground Fusion stays put. When you need a clean background state, `fusion_kill` first,+  confirm the process is gone, THEN launch. - **Seat conflict ("Active Sessions Exceeded") = AUTO-RECLAIM, never ask.** John (2026-07-06): "just   grab the license back… the user can always grab it back on the other machine, so there's no harm."   The dialog is a CEF modal that ignores background `SendInput`, so do NOT try to click it. Instead