← Commit history

0.2.54 source (not yet released, needs signing): altium_routing_state answers no_current_board when a schematic is in front

Colby Knox ·cf04598b82 ·1d ago ·parent afd3267
2 files changed +5−1
CHANGELOG.md+1
@@ -2,6 +2,7 @@  ## 0.2.54 (2026-10-20) - **An Altium board's STEP anchors as a molecule.** Altium's STEP export names each component's PRODUCT after its designator but leaves every assembly occurrence unnamed, where KiCad names the occurrence (`MP1`). `step2glb convert --molecule` finds the four machine pins by occurrence name, so an Altium molecule board converted `molecule_anchored: false` (0 MP markers) and its GLB was unanchored. `altium_export_step` now names each board component's occurrence after its designator (both lanes; `occurrences.named` in the reply, `nameOccurrences: false` to keep Altium's file as written). Nested model occurrences and occurrences Altium already named are left alone.+- `altium_routing_state` answers `errorCode: "no_current_board"` and the agent's message when another document (a schematic) is in front, instead of an empty error. - Verified: the TPS54202 molecule board's Altium STEP (34 components) converts `molecule_anchored: true` after the pass; a unit test covers the root/nested/escaped-quote cases.  ## 0.2.53 (2026-10-20)
bridge-rs/src/routing.rs+4−1
@@ -238,8 +238,11 @@ pub fn routing_state(args: &Value) -> Value {     let data = match r.get("data") {         Some(d) if d.get("ok").and_then(|v| v.as_bool()) == Some(true) => d.clone(),         Some(d) => {-            let err = d.get("error").and_then(|e| e.as_str()).unwrap_or("");+            let err = d.get("error").and_then(|e| e.as_str()).unwrap_or("").to_string();             if err.contains("no current PCB board") {+                // another document (the schematic) is in front: say so, not an empty error+                r["errorCode"] = json!("no_current_board");+                r["error"] = json!(err);                 r["_hint"] = json!("Open the board first (altium_show_2d_board {filePath}), then retry.");             }             return r;