feat(batch): add batch workspace analysis action and settings UI#253
Conversation
Add a new "Batch Workspace Analysis Report" action that triggers batch stack analysis on all packages in a JS/TS monorepo or Cargo workspace from the project root. The action validates workspace layout before calling the API and shows a warning dialog for unsupported projects. Includes batch-specific settings (concurrency, continueOnError, metadata) in the settings UI, a dedicated setBatchRequestProperties() method in ApiService, and tests for both the API delegation and settings defaults. Upgrades trustify-da-java-client to 0.0.16-SNAPSHOT for the batch API, Java target to 21 for bytecode compatibility, and Mockito to 5.x for Java 21 support. Implements TC-3865 Assisted-by: Claude Code
Review Summary by QodoAdd batch workspace analysis action with settings UI and Java 21 support
WalkthroughsDescription• Add batch workspace analysis action for JS/TS monorepos and Cargo workspaces • Implement batch-specific settings UI (concurrency, continueOnError, metadata) • Add workspace layout validation with user-friendly warning dialogs • Upgrade Java target to 21, trustify-da-java-client to 0.0.16-SNAPSHOT, Mockito to 5.x Diagramflowchart LR
A["SaBatchAction"] -->|validates workspace| B["isSupportedWorkspace"]
A -->|calls| C["ApiService.getBatchStackAnalysis"]
C -->|sets properties| D["setBatchRequestProperties"]
D -->|reads| E["ApiSettingsState batch settings"]
C -->|delegates to| F["ExhortApi.stackAnalysisBatchHtml"]
F -->|returns| G["HTML Report"]
A -->|displays| H["AnalyticsReportUtils.openCustomEditor"]
I["ApiSettingsComponent"] -->|manages UI| E
J["ApiSettingsConfigurable"] -->|persists| E
File Changes1. src/main/java/org/jboss/tools/intellij/exhort/ApiService.java
|
Code Review by Qodo
1. Java target set to 21
|
| sourceCompatibility = JavaVersion.VERSION_21 | ||
| targetCompatibility = JavaVersion.VERSION_21 |
There was a problem hiding this comment.
1. Java target set to 21 📎 Requirement gap ⚙ Maintainability
The build configuration changes the project source/target compatibility to Java 21, which violates the repository convention requirement to target Java 17.
Agent Prompt
## Issue description
The project is configured to build with Java 21, but the repository convention requires Java 17.
## Issue Context
This PR changed Gradle `sourceCompatibility`/`targetCompatibility` to `VERSION_21`.
## Fix Focus Areas
- build.gradle.kts[17-18]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
This change is required because trustify-da-java-client 0.0.16-SNAPSHOT is compiled with maven.compiler.release=21 (upgraded in guacsec/trustify-da-java-client#390). Building with Java 17 fails with class file has wrong version 65.0, should be 61.0. We need to match the client's Java target to use the batch API.
Replace Messages.showErrorDialog and Messages.showWarningDialog with NotificationGroupManager notifications using the existing "Red Hat Dependency Analytics" notification group, matching the pattern used in ReportFileManager. Implements TC-3865 Assisted-by: Claude Code
Add batch analysis feature and settings documentation to README.md, batch telemetry events to USAGE_DATA.md, and batch analysis quick start entry to plugin.xml description. Implements TC-3865 Assisted-by: Claude Code
ruromero
left a comment
There was a problem hiding this comment.
only one refactoring comment, the rest looks good
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consolidate duplicated property setup logic from setRequestProperties, setBatchRequestProperties, and image.ApiService.setServiceEnvironment into a single setCommonRequestProperties method. Each caller now invokes the common method and only adds its own specific properties on top. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Once you have validated your changes we can release the java-client version so that this PR depends on a published artifact |
ruromero
left a comment
There was a problem hiding this comment.
fix the intellij checks and is good to go
The project source/target compatibility was changed to Java 21 but CI workflows still used Java 17, causing compilation failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|



Summary
Test plan
JAVA_HOME=/usr/lib/jvm/java-21-openjdk ./gradlew build)test-workspace) — report opens with vulnerabilitiestest-plain-java) — shows warning dialog instead of cryptic errortest-no-lockfile) — shows warning dialogImplements TC-3865
🤖 Generated with Claude Code