Refactor manage Layers#166
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR refactors the “Configure Solution / Manage Layers” flow to remove reliance on transient state stored on CSolution, replacing it with an explicit event-driven payload published by SolutionConverter via SolutionEventHub and consumed by ManageLayersWebviewMain.
Changes:
- Added a new
ConfigureSolutionDataevent toSolutionEventHuband corresponding unit tests. - Updated
SolutionConverterImplto emit detected compiler/layer configuration data through the event hub instead of mutatingCSolution. - Updated
ManageLayersWebviewMainto consume the emitted configure payload (and removed legacy cbuild-based layer error handling).
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-layers/manage-layers-webview-main.ts | Switches Manage Layers to consume configure data via SolutionEventHub and removes legacy cbuild error parsing. |
| src/solutions/solution-event-hub.ts | Adds a new ConfigureSolutionData payload and corresponding event API. |
| src/solutions/solution-event-hub.test.ts | Extends tests to cover the new configure-data event and emitter registration. |
| src/solutions/solution-converter.ts | Emits configure-data events based on convert/discover results; removes dependency on SolutionManager. |
| src/solutions/solution-converter.test.ts | Updates converter tests to assert configure-data emission. |
| src/solutions/csolution.ts | Removes transient selectCompiler / variablesConfigurations state and setters. |
| src/desktop/extension.ts | Updates DI wiring for the updated converter and Manage Layers constructor signature. |
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (3)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Fixes
Changes
This PR removes Configure Solution’s dependency on temporary
CSolutionstate and switches compiler/layer discovery to an explicit event-driven flow.SolutionConverternow publishes configure data through a newSolutionEventHubpayload, whileManageLayersWebviewMainconsumes that payload directly instead of reading transientselectCompilerandvariablesConfigurationsfields from the solution model.As part of the cleanup, the temporary fields were removed from
CSolution, obsolete cbuild-based layer error handling was dropped from Manage Layers, and the related unit tests were updated. The affected solution event hub and converter tests are passing.Checklist