orcaslicer/tests
SoftFever d42123d2f1
Some checks are pending
Build all / Linux x86_64 (push) Blocked by required conditions
Build all / build_macos_arch (push) Waiting to run
Build all / Look for build script changes (push) Waiting to run
Build all / Windows build script tests (push) Blocked by required conditions
Build all / build_linux (push) Waiting to run
Build all / Build Windows (push) Blocked by required conditions
Build all / Build macOS Universal (push) Blocked by required conditions
Build all / Linux aarch64 (push) Blocked by required conditions
Build all / Windows x64 (push) Blocked by required conditions
Build all / Windows arm64 (push) Blocked by required conditions
Build all / macOS arm64 (push) Blocked by required conditions
Build all / Slice check (Linux aarch64) (push) Blocked by required conditions
Build all / Publish Test Results (push) Blocked by required conditions
Build all / Flatpak (push) Waiting to run
Fix hang when MCP clicks an open printer selector (#17913)
# 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)
2026-11-26 20:51:59 +08:00
..
automation Fix hang when MCP clicks an open printer selector (#17913) 2026-11-26 20:51:59 +08:00
catch2 Fix Windows test linking: use main() instead of wmain() (#12939) 2026-04-24 14:07:24 +08:00
cli Fix CLI crash when filament presets set no diameter (#16911) 2026-11-12 18:45:38 -06:00
compare_analyzer show_temp_plot: add precool zone visualization 2026-07-16 22:43:03 +01:00
data Ask before a plugin calls OrcaSlicer's tools 2026-11-26 02:56:29 +08:00
fff_print Official OrcaSlicer MCP support (#17819) 2026-11-26 11:31:45 +08:00
filament_group Match closer colours and the same filament sub-type in Convenience mode 2026-10-31 14:25:00 +08:00
libnest2d Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced (#16099) 2026-10-05 16:47:17 +08:00
libslic3r Official OrcaSlicer MCP support (#17819) 2026-11-26 11:31:45 +08:00
sla_print Fail tests whose sections assert nothing (#17420) 2026-11-14 10:47:42 -06:00
slic3rutils Fix hang when MCP clicks an open printer selector (#17913) 2026-11-26 20:51:59 +08:00
AGENTS.md List long widget labels whole and keep each MCP fact in one place 2026-11-25 19:10:57 +08:00
CATCH2.md docs(tests): add a layered guide to the test tree (#14628) 2026-07-23 09:19:37 -03:00
CLAUDE.md docs(tests): add a layered guide to the test tree (#14628) 2026-07-23 09:19:37 -03:00
CMakeLists.txt Merge branch 'main' into feature/mcp 2026-11-15 01:01:57 +08:00
README.md docs(tests): add a layered guide to the test tree (#14628) 2026-07-23 09:19:37 -03:00
test_utils.hpp Fix OBJ import on macOS 13.3 to 14.0 when the UI language uses a decimal comma (#17851) 2026-11-25 10:14:39 -06:00
update_catch2.sh Fix tests (#10906) 2025-12-08 22:42:11 +08:00

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:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.