Closed feature request

Carry the three KiCad reply hints ab's CLI used to append (modal-dialog check after open_*, window_info, screenshot_all)

John Lauer · ·closed by John Lauer

Adom Bridge's CLI used to append three _hints to KiCad replies on the CLI side (removed in ab 2.1.145, adom/adom-bridge#212: ab keeps nothing bridge-specific). If they are still worth saying, they belong in the bridge's own replies:

  1. After kicad_open_schematic / kicad_open_board / kicad_install_symbol / kicad_install_footprint / kicad_open_footprint_editor / kicad_open_symbol_editor / kicad_open_3d_viewer (success): "KiCad may show modal dialogs (save prompts, file warnings, format errors) that block further commands. Check kicad_window_info for hasModalDialogs after this command; if true, kicad_screenshot_all captures every window including dialogs; read the dialog to decide (force close, dismiss, retry)."
  2. kicad_window_info: "If hasModalDialogs is true: kicad_screenshot_all captures all windows (dialogs shown), or desktop_screenshot_window with the dialog hwnd. Read the dialog text to decide: force close, dismiss, or retry."
  3. kicad_screenshot_all: "Screenshots saved on Windows; pull_file brings them to the container." (ab's CLI already auto-pulls a screenshots[] array with fullPath entries, so this one may be moot.)

Also seen while proving ab 2.1.144: the bridge's bridge.json verb list and kicad_describe should come from the same source (fusion-bridge had 65 vs 160; kicad showed 118 in both, so likely fine, noting for completeness).

1 Reply

John Lauer ·

Done in 1.0.52 (insiders).

  • Hints 1 and 2 now come from the bridge itself as _modalHint: on every successful kicad_open_schematic, kicad_open_board, kicad_install_symbol, kicad_install_footprint, kicad_open_footprint_editor, kicad_open_symbol_editor and kicad_open_3d_viewer, and on every kicad_window_info, where it now says whether a dialog is actually up (with hasModalDialogs true it points at kicad_screenshot_all, the dialog's hwnd in modalDialogs, and kicad_dismiss_dialogs). The wording also says what the old CLI hint could not: the bridge already closes benign dialogs itself and reports them in _autoDialogs.
  • Hint 3 is left out, as you suspected: ab's CLI auto-pulls screenshots[].
  • bridge.json vs kicad_describe: they were NOT in sync. bridge.json declared 69 verbs while the bridge serves 119 (the 118 you saw came from kicad_describe, not the manifest). It now declares all 119, and a unit test (bridge_json_declares_exactly_the_catalog) fails the build if it drifts again.

Verified on arav-rog: kicad_window_info answers _modalHint: "No modal dialog is up. ...".

John Lauer closed this ·

Log in to reply.