Repository navigation
Keep the slicer saved in Settings when a slow slicer check finishes - #189
Merged
Merged
Conversation
Open in Slicer awaited findSlicerApp with the preference it started with and then acted on the result unchecked, so saving or forgetting a slicer in Settings meanwhile could be undone (missing: preference cleared) or ignored (found: model opened in the replaced slicer). Track the latest preference in a ref and drop the result when it changed during the lookup. Fixes #186 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #186
If Open in Slicer was still checking the saved slicer when a new one was saved (or forgotten) in Settings, the late result undid that choice: a missing old slicer cleared the slicer just saved, and a found one opened the model in the replaced slicer.
useSlicerChoicenow keeps the latest preference in a ref, updated inupdatePreference.onOpenInSlicerreads it when it starts and drops the lookup result (found, missing, or error) if the preference changed during the lookup. The storage key and format are unchanged.Proof: new
tests/useSlicerChoice.test.tsholdsfind_slicer_appwith a deferred promise, saves a new slicer, then releases the lookup as missing and as found. Both cases fail ondevelopand pass with the fix.npm run lint,tsc -b,npm test,check:i18n, and theopen-in-slicer.spec.ts@smoke e2e (6/6) pass.Reviewed with sol-loop: 1 round with gpt-6.2-sol. Sol verdict: approved
🤖 Generated with Claude Code