← Commit history

1.9.145: native dismiss_blocking_dialogs

John Lauer ·5e47fa6360 ·1mo ago ·parent 9d01a14
6 files changed +61−14
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.144\ No newline at end of file+1.9.145\ No newline at end of file
adom-bridge-fusion-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "fusion360",-  "version": "1.9.144",-  "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.144/adom-bridge-fusion-v1.9.144.zip",-  "sha256": "a837068a86331208532d08ac2e286afac8908fdccd99a4fecfd3aef75edde888",-  "size": 477909,+  "version": "1.9.145",+  "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.145/adom-bridge-fusion-v1.9.145.zip",+  "sha256": "3d373afda2fc7e0a031e20d65cda0c0110021ad3252fe4ecbfcb61185f860896",+  "size": 478774,   "verbPrefixes": [     "fusion_"   ],
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.9.144",+  "version": "1.9.145",   "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/fusion-bridge",   "author": "Adom Inc.",
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "fusion-bridge",-  "version": "1.9.166",+  "version": "1.9.167",   "type": "app",   "description": "This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.",   "dependencies": {
page.json+10−7
@@ -1,6 +1,6 @@ {   "slug": "fusion-bridge",-  "version": "1.9.166",+  "version": "1.9.167",   "type": "app",   "description": "This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.",   "dependencies": {@@ -11,6 +11,10 @@     "uninstall": "./uninstall.sh"   },   "tags": [+    "ab",+    "bridge",+    "fusion",+    "desktop-app",     "fusion360",     "autodesk",     "cad",@@ -75,7 +79,10 @@     "build a basic parts library",     "add a 3d model to a component",     "make a fusion 360 library with 3d",-    "set up the fusion bridge"+    "set up the fusion bridge",+    "fusion dashboard",+    "fusion status page",+    "open the fusion launch page"   ],   "discovery_pitch": "Use the Adom Bridge Fusion 360 bridge when the user wants to DRIVE Autodesk Fusion 360 from the cloud: open/search their team's Fusion cloud designs, lay out a PCB or do electronics, export STEP/IGES/STL/Gerbers/BOM, or build a component library with real rendering 3D. It runs Fusion on the user's own machine via Adom Bridge. NOT for web/browser/login/form-filling (that's the native-browser extension) and NOT for KiCad (that's the kicad bridge).",   "brief": "Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.",@@ -104,9 +111,5 @@       "label": "Part volume",       "prompt": "How much material does each printed part in this assembly use?"     }-  ],-  "author": {-    "name": "John Lauer",-    "email": "[email protected]"-  }+  ] }\ No newline at end of file
server.py+44
@@ -2371,6 +2371,7 @@ COMMAND_HANDLERS = {     "launch": _handle_launch,     "start": _handle_launch,  # alias — CLI's fusion_start delegates here on Docker     "dismiss_recovery": _handle_dismiss_recovery,+    "dismiss_blocking_dialogs": _handle_dismiss_blocking_dialogs,     "relocate_recovery": _handle_relocate_recovery,     "open_cloud_file": _handle_open_cloud_file,     # Import a legacy EAGLE .sch (+ .brd) into a NEW populated Fusion electronics design via@@ -4038,6 +4039,49 @@ def _dismiss_dialogs_bg() -> list:         return []  +def _handle_dismiss_blocking_dialogs(fusion_info: dict, args: dict) -> dict:+    """NATIVE fusion_dismiss_blocking_dialogs (John, 2026-08-23: he hates seeing Fusion+    dialogs while the bridge drives, and the verb was falling to ab's BLIND WM_CLOSE+    fallback - adom-bridge#86 - which bypasses this bridge's classifier and cannot tell a+    harmless nag from a DATA-LOSS 'packages are uploading, sure you want to close?' prompt).++    This routes every open dialog through classify_blocking_dialogs() and answers each SAFELY+    in the BACKGROUND (WM_CLOSE = Cancel/No, never SetForegroundWindow, never Yes/close):+      - upload_in_progress: WM_CLOSE == 'No' == do NOT close == the upload keeps draining. We+        flag it so the caller polls hasActiveJobs before any retry (closing now still loses it).+      - everything else: WM_CLOSE == Cancel/No, the safe answer for every Fusion confirm.+    Returns what each dialog WAS (category) and how it was answered - so the caller never has to+    guess, and never gets a stray Yes.+    """+    classified = classify_blocking_dialogs()+    if not classified:+        return {"success": True, "dismissed": [], "count": 0,+                "_hint": "No blocking Fusion dialog is open."}+    answered, upload_active = [], False+    for d in classified:+        hwnd, cat = d.get("hwnd"), d.get("category")+        safe = "No/Cancel (WM_CLOSE, background)"+        if cat == "upload_in_progress":+            upload_active = True+            safe = "No - declined close, Hub upload left to drain (NEVER Yes)"+        ok = False+        try:+            ok = bool(close_dialog_bg(hwnd))+        except Exception:+            ok = False+        answered.append({"title": d.get("title"), "category": cat,+                         "answeredWith": safe, "closed": ok,+                         "resolution": d.get("resolution")})+    hint = ("Answered %d blocking dialog(s) in the background (No/Cancel - never Yes, never "+            "focus-stolen)." % len(answered))+    if upload_active:+        hint += (" One was a Hub-UPLOAD 'lose these changes?' prompt: it was declined (No), but "+                 "the upload is STILL in flight - poll app.hasActiveJobs (fusion_state) until it "+                 "drains before any close/saveAs, or you WILL lose the 3D package.")+    return {"success": True, "count": len(answered), "dismissed": answered,+            "uploadStillActive": upload_active, "_hint": hint}++ def _orchestrate_capture_library_views(args: dict) -> dict:     """Capture the LIBRARY-EDITOR views that make EEs trust a part: the schematic SYMBOL, the     FOOTPRINT (pads + layer stack), and the COMPONENT/device view (Content Manager: the symbol +