You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A slow saved-slicer check can undo a slicer saved in Settings #186
If Open in Slicer is still checking the saved slicer when you save a new choice in Settings, the check can undo that save once it finishes. The window is only as long as one native lookup, usually a few milliseconds, so this is unlikely in practice.
onOpenInSlicer in src/hooks/useSlicerChoice.ts captures the current preference, then awaits findSlicerApp(preference.app.path). Nothing checks whether the preference changed while it waited:
If the old slicer is missing: it calls updatePreference(null), which clears the slicer the user just saved in Settings, and opens the chooser.
If the old slicer is found: it opens the model in the old slicer, not the one just saved.
Steps to reproduce
Only reproducible with a delayed lookup, for example by stubbing findSlicerApp in a test:
Save slicer A with Always use this slicer, then make A unavailable.
Click Open in A while the lookup is held.
In Settings, use Change… to save slicer B.
Release the lookup. B is gone from Settings and the chooser asks again.
Expected
A lookup that finishes after the preference changed does nothing to the newer choice.
Possible fix
Before acting on the result, compare the preference the lookup started with against the latest one (through a ref or a request counter), and drop the result if it changed. A small unit test with a deferred findSlicerApp covers it.
Activity
fix: ignore a slow saved-slicer check after Settings changes the slicer
vycdev commentedon Nov 19, 2026
Fixed by #189, merged into
develop.