Skip to content

Refactor manage Layers#166

Merged
jthuangarm merged 9 commits into
mainfrom
manage_layers_compiler
Apr 8, 2026
Merged

Refactor manage Layers#166
jthuangarm merged 9 commits into
mainfrom
manage_layers_compiler

Conversation

@edriouk
Copy link
Copy Markdown
Collaborator

@edriouk edriouk commented Apr 8, 2026

Fixes

Changes

This PR removes Configure Solution’s dependency on temporary CSolution state and switches compiler/layer discovery to an explicit event-driven flow. SolutionConverter now publishes configure data through a new SolutionEventHub payload, while ManageLayersWebviewMain consumes that payload directly instead of reading transient selectCompiler and variablesConfigurations fields 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

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 52f863b.
Ensure 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 Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ConfigureSolutionData event to SolutionEventHub and corresponding unit tests.
  • Updated SolutionConverterImpl to emit detected compiler/layer configuration data through the event hub instead of mutating CSolution.
  • Updated ManageLayersWebviewMain to 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.

Comment thread src/views/manage-layers/manage-layers-webview-main.ts
Comment thread src/views/manage-layers/manage-layers-webview-main.ts
Comment thread src/solutions/solution-converter.ts Outdated
@qltysh
Copy link
Copy Markdown

qltysh Bot commented Apr 8, 2026

Qlty

Coverage Impact

⬆️ Merging this pull request will increase total coverage on main by 0.75%.

Modified Files with Diff Coverage (3)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
src/solutions/solution-event-hub.ts100.0%
Coverage rating: F Coverage rating: B
src/views/manage-layers/manage-layers-webview-main.ts88.9%175-176, 214
Coverage rating: A Coverage rating: A
src/solutions/solution-converter.ts100.0%
Total92.5%
🤖 Increase coverage with AI coding...

In the `manage_layers_compiler` branch, add test coverage for this new code:

- `src/views/manage-layers/manage-layers-webview-main.ts` -- Lines 175-176 and 214

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread src/views/manage-layers/manage-layers-webview-main.ts
Comment thread src/views/manage-layers/manage-layers-webview-main.ts Outdated
edriouk and others added 2 commits April 8, 2026 15:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comment thread src/views/manage-layers/manage-layers-webview-main.ts Outdated
Comment thread src/views/manage-layers/manage-layers-webview-main.ts
Comment thread src/views/manage-layers/manage-layers-webview-main.ts
Comment thread src/views/manage-layers/manage-layers-webview-main.ts
edriouk and others added 3 commits April 8, 2026 15:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@edriouk edriouk requested a review from jthuangarm April 8, 2026 13:59
@jthuangarm jthuangarm merged commit 3ab97a1 into main Apr 8, 2026
12 checks passed
@jthuangarm jthuangarm deleted the manage_layers_compiler branch April 8, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants