Skip to content

Conversation

gabriela-trutan-sonarsource
Copy link
Contributor

@gabriela-trutan-sonarsource gabriela-trutan-sonarsource commented Sep 19, 2025

SLVS-2573

Part of SLVS-2517

Split ReportViewModel into multiple classes to avoid it from becoming a god class. The class was quite crowded and a lot of functionality is missing, including for taints (and, in the future, for normal issues)

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Split ReportViewModel into multiple classes SLVS-2573 Split ReportViewModel into multiple classes Sep 19, 2025
Copy link

🤖 Pull Request summary

Refactors report view architecture to extract specialized view models for hotspots and dependency risks.

• Extracts DependencyRisksReportViewModel and HotspotsReportViewModel from main ReportViewModel
• Moves dependency risk operations (status change, browser navigation) to dedicated view model
• Removes direct store dependencies from main view model, using specialized view models instead
• Updates test files to reflect the new architecture with comprehensive unit test coverage

Review focus: Verify the new view model interfaces properly encapsulate their responsibilities and that the dependency injection wiring is correct in ReportViewToolWindow.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link
Contributor

@vnaskos-sonar vnaskos-sonar left a comment

Choose a reason for hiding this comment

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

👍

@gabriela-trutan-sonarsource gabriela-trutan-sonarsource merged commit a1ac1b9 into feature/report-view Sep 22, 2025
5 checks passed
@gabriela-trutan-sonarsource gabriela-trutan-sonarsource deleted the gt/split-reportvm branch September 22, 2025 07:57
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.

2 participants