Fix/wrong target type after renaming in csolution yaml file#49
Fix/wrong target type after renaming in csolution yaml file#49arneschmid wants to merge 10 commits intomainfrom
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (4)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
There was a problem hiding this comment.
Pull request overview
Fixes Manage Solution UI state becoming stale after external edits (e.g., renamed target-types in *.csolution.yml) by detecting on-disk changes, reloading solution state, and validating/correcting the active target type before publishing context to the webview.
Changes:
- Detect external modifications of
csolution/cmsis.jsonvia file stamps and reload solution data when needed. - Ensure the active target type always resolves to a valid target after reloads/renames.
- Update load-state handling and add/adjust unit tests and factories.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/views/manage-solution/manage-solution-webview-main.ts | Reload/validate flow on solution load-state transitions; adds external-change-triggered reloads. |
| src/views/manage-solution/manage-solution-webview-main.test.ts | Adds coverage for external-change reload ordering; adjusts async timing in existing load-state tests. |
| src/views/manage-solution/manage-solution-controller.ts | Adds external-change detection and active target type correction logic; improves selection fallback. |
| src/solutions/solution-manager.factories.ts | Updates factories for the new activated load-state field. |
| src/generic/text-file.ts | Adds reusable external on-disk change detection to TextFile/ITextFile via mtime/size stamps. |
| src/generic/text-file.test.ts | Adds tests for external change detection behavior. |
| src/generic/text-file.factory.ts | Extends ITextFile test factory with new external-change methods. |
You can also share your feedback on Copilot code review. Take the survey.
…ity and update references in tests
…pdate related tests
…lution-controller tests
…s-solution into fix/wrong-target-type-after-renaming-in-csolution-yaml-file

Fixes stale Target Types remaining in UI after renamed in csolution.yml
This forces a reload of the yml file in the UI if a change on the file was detected, loosing local edits. Parallel editing of file and UI is currently not suppoerted.
Fixes
Changes
Screenshots
Checklist