Repository navigation
Migrate AI service to API, add scan persistence, improve Settings UI - #139
Merged
Merged
Conversation
Migrate AI and crypto code to the DeepViolet API module, integrate API-level scan persistence, and improve Settings dialog layout consistency across all tabs. AI Service Migration: - AiAnalysisService gutted to thin wrapper retaining only parseAiResponse - All HTTP client code, Provider enum, ChatMessage, AiAnalysisException, default constants moved to com.mps.deepviolet.api.ai - UIBackgroundScanTask, ScanTask, FontPreferences, FontChooserDialog, MainFrm updated to use API types (AiConfig builder, IAiAnalysisService, AiProvider, AiChatMessage) - FontPreferences crypto methods now delegate to API CryptoUtils Scan Persistence Integration: - ScanResult.toSnapshot()/fromSnapshot() bridge DVT model to API model - MainFrm save dialog: three-mode radio panel (Unencrypted JSON, Host locked, Password locked) with password field - MainFrm load: PasswordCallback lambda shows Swing password dialog - ReportExporter delegates save/load to ScanFileIO - CLI: new --password-env and --password-file options for .dvscan files SourceProvenance Removal: - ScanResult.SourceProvenance inner class removed entirely - Replaced with simple String scanId (SHA-256 hex digest) - DeltaScanResult, DeltaScanner, StartCMD, MainFrm updated accordingly Save Warning Dialog: - Unencrypted JSON save shows warning with OK/Cancel - New "General" group on Settings | Application tab with "Suppress Save Scan Warning" checkbox - general.suppressSaveWarning property persisted to preferences Settings UI Left-Justification: - Spacer panels added to 13 sections across all tabs to prevent controls from stretching full-width - Host Detail: Colors, Risk Graph, Risk Priority, Output - Cards: Colors - Engine: Report Sections, Cipher Suite Naming (combo cut to fixed width), Protocol Versions, Scanning Priority - AI: Provider/API Key fields (fixed-width), Terminal Colors - Application: General, Font (combo cut to fixed width), Colors Removals: - ReportExporter inner classes (LoadedRiskScore, LoadedCategoryScore, LoadedDeduction, LoadedCipherSuite) moved to API persist layer - ReportExporter JSON parsing utilities replaced by ScanFileIO - 10 AiAnalysisService tests moved to API test suite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update deepviolet.version from local SNAPSHOT to the JitPack commit hash from the feature/ai-analysis-scan-persistence branch so CI can resolve the dependency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate AI and crypto code to the DeepViolet API module, integrate API-level scan persistence with multi-mode encryption, and improve Settings dialog layout consistency across all tabs.
Improvements
AI Service Migration
AiAnalysisServicegutted to thin wrapper — retains onlyparseAiResponse()(depends on DVT-specificScanNode)Providerenum,ChatMessage,AiAnalysisException, default constants moved tocom.mps.deepviolet.api.aiUIBackgroundScanTaskrewritten to useAiConfigbuilder andIAiAnalysisServiceFontPreferencescrypto methods now delegate to APICryptoUtilsFontChooserDialogAI test button and model fetching use API types (AiProvider,AiConfig,IAiAnalysisService)MainFrmchat feature usesAiChatMessageandAiConfig.builder()Scan Persistence Integration
ScanResult.toSnapshot()/fromSnapshot()bridge DVT model to APIScanSnapshot/HostSnapshotPasswordCallbacklambda shows Swing password dialog for cross-machine filesReportExporterdelegates save/load toScanFileIO--password-envand--password-fileoptions for.dvscantransfer passwordsSave Warning Dialog
general.suppressSaveWarningproperty persisted todeepviolet.propertiesSettings UI Left-Justification
Spacer panels added to 13 sections across all tabs — controls stay at natural width, left-aligned:
Removals
ScanResult.SourceProvenanceinner class removed — replaced with simpleString scanId(SHA-256 hex digest)ReportExporterinner classes (LoadedRiskScore,LoadedCategoryScore,LoadedDeduction,LoadedCipherSuite) removed — logic moved to API persist layerReportExporterJSON parsing utilities (parseScanJsonMap,parseCategoryScores,parseDeductions) replaced byScanFileIOAiAnalysisServicetests moved to DV API test suiteDeltaScanResult,DeltaScanner,StartCMD,MainFrmupdated for scanId replacing SourceProvenanceBuild
pom.xml— DeepViolet API version changed to5.1.18-SNAPSHOT(update to JitPack commit hash before release)Test Plan
mvn compile— clean buildmvn test— all tests pass🤖 Generated with Claude Code