Skip to content

Conversation

gabriela-trutan-sonarsource
Copy link
Contributor

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

SLVS-2522

This targets the PR in which the ReportViewModel was refactored to prevent crowding it with lots of logic.
The logic is mostly a copy-paste from HotspotsControlViewModel and its tests. Nothing new should have been added, just minor UI changes were done.

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.

👍

Base automatically changed from gt/split-reportvm to feature/report-view September 22, 2025 07:57
Copy link

🤖 Pull Request summary

Adds hotspot status management functionality to the security report view.

Test refactoring: Extracted shared test setup with TestInitialize and class-level fields in HotspotViewModelTests
New property: Added ExistsOnServer property to HotspotViewModel to check server availability
Service integration: Updated HotspotsReportViewModel constructor to accept IReviewHotspotsService and IMessageBox dependencies
Status management: Implemented methods for checking allowed statuses, changing hotspot status, and showing hotspots in browser
UI enhancements: Added context menu for hotspots with "Change Status" and "View in Browser" options
Resource addition: Added localized string for "View security hotspot in browser"

Key areas for review:

  • Error handling in the async methods for status changes and permission checks
  • Context menu visibility logic tied to ExistsOnServer property
  • UI removal logic when hotspot status changes to Fixed/Safe

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

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

See analysis details on SonarQube Cloud

@gabriela-trutan-sonarsource gabriela-trutan-sonarsource merged commit 670eff2 into feature/report-view Sep 22, 2025
3 checks passed
@gabriela-trutan-sonarsource gabriela-trutan-sonarsource deleted the gt/hotspots-context-menu branch September 22, 2025 08:09
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