mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-27 07:39:40 -05:00
* feat: keep plugins activated/deactivated based on pre-update state * fix: preserve plugin capability choices across updates Cloud plugin replacement resets the install-state sidecar, which silently re-enabled capabilities the user had disabled. Snapshot the installed sidecar before replacing the package, then write the pre-update capability choices and activation intent back after the install. Permissions stay cleared so the new package must request them again, and the reload now waits until that state is persisted. Add regression tests for updating both an active and a deactivated cloud plugin. * fix: roll back a failed plugin update and keep the old package usable Download the replacement before unloading or deleting the installed package, so a download failure leaves the old package and its sidecar untouched. Refuse to replace a package whose sidecar exists but cannot be read, rather than resetting the user's capability choices and grants. Extract the install-from-package step so the updater can reuse it. When the install fails, restore the previous sidecar (activation intent, capability choices and grants) that the unload step overwrote, and reload the old package if it was active. Keep a stale package from another cloud directory until the new one is committed. In install_plugin, use one rollback helper for every failure path and give backups a "__" prefix so an abandoned backup is never discovered as a plugin. Add regression tests for failed download and failed install. * fix: prevent a plugin load and an update from racing Claim a plugin key for the duration of update_cloud_plugin under m_mutex, and make load_plugin refuse a key that an update owns. An update that starts while a load is still running now fails with a clear error instead of unloading the package underneath the loader; the claim is released before the replacement is reloaded and on every failure path. Keep the dialog's Update button disabled while the selected plugin is loading, so the UI cannot start an update the manager would refuse. Add a JavaScript test for the button state and a C++ test for the load refusal and claim release. * fix: clang-tidy * fix: plugin update safety and simplify state handling * fix: plugin update rollback and error reporting * refactor: simplify plugin update state handling and tests * fix: avoid marking plugins as errored on update conflicts