fix: if the default engine isn't installed, the app should reset it #4379
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.
Describe Your Changes
There would be an issue where the app wouldn't reset the default engine if the user manually modifies it or updates from a hotfix version. This would break the default settings, and users would have to manually update the engine in the settings. This isn't a good UX, they should have it configured properly on launch.
On launch:
Check default variant -> Get installed variants -> If installed variants are not including default variant it would not work -> Reset default variant to bundled version.
Fixes Issues
Self Checklist
This pull request includes updates to the
extensions/engine-management-extension
to improve version handling and remove unnecessary code. The most important changes include updating the Cortex engine version, modifying the logic for checking installed engines, and removing thecompareVersions
method.Version update:
extensions/engine-management-extension/rolldown.config.mjs
: UpdatedCORTEX_ENGINE_VERSION
from 'v0.1.42' to 'v0.1.43'. [1] [2]Logic improvement:
extensions/engine-management-extension/src/index.ts
: Modified the logic to check if the default engine is installed instead of comparing versions.Code simplification:
extensions/engine-management-extension/src/index.ts
: Removed thecompareVersions
method as it is no longer needed.