mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-27 15:49:52 -05:00
# Description When an MCP client clicked the printer selector on the Device or Calibration tab while its printer list was already open, OrcaSlicer froze at full CPU on macOS and Linux and had to be force-quit. A person's mouse can't trigger it, because the open list takes the click and closes before the selector sees it, but an MCP click goes straight to the selector. That click now closes the list, as a person's click does, and Orca's popups no longer hang on macOS and Linux when they are asked to open while already open. The hung call's reply was misleading as well: it said the call had not run and was safe to retry, although its click had run. A call that has already acted now says it may have done some or all of what was asked, and to check with `app_state` before calling it again. **Included:** - **GUI:** the Device and Calibration printer selectors close their open list on a click; `PopupWindow` ignores a second open on macOS and Linux. - **MCP:** "not run, safe to retry" is reported only while no step of the call has run. - **Tests:** an automation test for the MCP reply and a slic3rutils test for the popup. - **Docs:** the MCP server design doc and the orca-wxwidgets skill's popup pages. A person's clicks behave as before on every platform, and Windows popup behaviour is unchanged. # Screenshots/Recordings/Graphs <!-- > UI changes need before and after screenshots, on each platform you tested. > See what each kind of PR needs: https://github.com/OrcaSlicer/OrcaSlicer/blob/main/CONTRIBUTING.md#what-each-kind-of-pr-needs > For other changes, please attach images that can help explain them. --> ## Tests - Reproduced the hang on macOS over MCP with two `widget_click {target:{class:"SideToolsPanel"}}` calls on the Device tab. With the fix, repeated clicks open and close the list, each reply comes back in under 100 ms, and the app stays idle and answers `app_state` afterwards. - New tests: "a call says it was not run only until a step of it has run" (automation) and "a popup never links its event handlers to themselves and a second click on its control closes it" (slic3rutils). With the popup guard disabled, the popup test fails and still runs to the end instead of hanging. - On this branch, macOS arm64 Release: the build passes, the automation suite passes (186 test cases) and the slic3rutils `[Mcp]` tests pass (508 test cases). - Windows and Linux were not built or run; their code paths were checked against wxWidgets' source. <!-- > A guide for users on how to download the artifacts from this PR. --> [How to Download Pull Requests Artifacts for Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: