Skip to content

Move problems processing to dedicated module#162

Merged
edriouk merged 6 commits intomainfrom
solution-problems
Apr 7, 2026
Merged

Move problems processing to dedicated module#162
edriouk merged 6 commits intomainfrom
solution-problems

Conversation

@edriouk
Copy link
Copy Markdown
Collaborator

@edriouk edriouk commented Apr 7, 2026

Fixes

Changes

  • move diagnostic processing from solution-convertor.ts to solution-problems.ts
  • make solution-convertor.ts and solution-convertor.test.ts cleanup

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).

@edriouk edriouk requested a review from Copilot April 7, 2026 14:40
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Dependency Review

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

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 825edf8.
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 solution conversion diagnostics handling by moving “Problems”/diagnostic processing out of SolutionConverterImpl into a dedicated SolutionProblemsImpl, aligning with the separation requested in #146.

Changes:

  • Introduces SolutionProblemsImpl to enrich tool output and populate VS Code diagnostics on onDidConvertCompleted.
  • Extends ConvertResultData to carry logMessages and optional toolsOutputMessages.
  • Cleans up SolutionConverterImpl and updates/relocates unit tests accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/solutions/solution-problems.ts New module responsible for enriching tool output and updating the VS Code Problems/diagnostics view.
src/solutions/solution-problems.test.ts New unit tests covering diagnostics creation, file mapping, and west-message formatting/enrichment.
src/solutions/solution-event-hub.ts Adds logMessages and toolsOutputMessages to ConvertResultData so downstream consumers can process diagnostics.
src/solutions/solution-event-hub.test.ts Updates tests to include required logMessages in completion events.
src/solutions/solution-converter.ts Removes diagnostic collection logic; now enriches tool output, computes severity, and emits enriched results via the event hub.
src/solutions/solution-converter.test.ts Updates tests to account for diagnostics moving to SolutionProblemsImpl and asserts emitted toolsOutputMessages.
src/solutions/csolution.ts Removes stored logMessages state from CSolution (no longer set by converter).
src/solutions/solution-manager.test.ts Updates ConvertResultData fixture to include required logMessages.
src/desktop/extension.ts Wires up SolutionProblemsImpl activation alongside other extension components.

edriouk and others added 2 commits April 7, 2026 16:46
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 brondani April 7, 2026 15:16
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 9 out of 9 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@qltysh
Copy link
Copy Markdown

qltysh bot commented Apr 7, 2026

Qlty

Coverage Impact

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

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
src/solutions/solution-converter.ts100.0%
New file Coverage rating: A
src/solutions/solution-problems.ts94.7%54, 175, 187...
Total94.9%
🤖 Increase coverage with AI coding...

In the `solution-problems` branch, add test coverage for this new code:

- `src/solutions/solution-problems.ts` -- Lines 54, 175, 187, 285-286, and 292-302

🚦 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.

@edriouk edriouk merged commit 1a4f53f into main Apr 7, 2026
17 of 18 checks passed
@edriouk edriouk deleted the solution-problems branch April 7, 2026 15:45
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