feat: Add realtime updates, static analysis, and UI enhancements - #23
Merged
Conversation
…frastructure - Add static analyzer for pre-LLM deterministic pattern detection - Add cross-module analyzer for capability flow analysis across modules - Add evidence validator to filter LLM hallucinations against bytecode - Add confidence calculator for analysis quality metrics - Add dependency analyzer to track risks from contract dependencies - Add audit trail for analysis metadata, debugging, and cost monitoring - Add migrations for dependency_risks and audit_trail tables - Update langchain analyzer and prompts with new capabilities - Expand risk patterns knowledge base - Extend supabase client with new table operations
…frastructure Backend: - Handle "effect is empty" RPC errors gracefully in sui-client Frontend: - Add ConfidenceBadge component for analysis confidence levels - Add AnalysisQualityCard to display coverage and validation metrics - Add DependencySummaryCard for dependency audit status - Add TechnicalFindingsSection for detailed pattern-matched findings - Extend AnalyzedContractCard to display new analysis metadata - Add type definitions for confidence intervals, quality metrics, and findings - Add utility functions for confidence/severity styling and validation rates
- Add explicit field descriptions to reporter Zod schema - Enforce human-readable pattern names in rug_pull_indicators - Prevent pattern IDs (HIGH-01, SUI-CRITICAL-01) from being used as pattern_name - Clarify intent of each output field for better LLM guidance
- Add CodeSnippet component for syntax-highlighted code display - Add EvidenceBlock component for formatted evidence text - Update AnalyzedContractCard to use EvidenceBlock for risky functions and rug pull indicators - Update TechnicalFindingsSection to use CodeSnippet for evidence display - Improve consistency in evidence presentation across the UI
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
This PR introduces realtime deployment monitoring, enhanced static analysis infrastructure, and improved UI components for displaying contract analysis results.
Key Features
Realtime Deployment Updates
useRealtimeDeployments,useDebouncedValue,useTimeTickErrorBoundarycomponent for graceful error handlingDeploymentCardwith React.memo and useCallbackDeploymentsTablewith debounced search and stats refreshStatic Analysis Infrastructure
ConfidenceBadgecomponent for analysis confidence levelsAnalysisQualityCardto display coverage and validation metricsDependencySummaryCardfor dependency audit statusTechnicalFindingsSectionfor detailed pattern-matched findingsAnalyzedContractCardto display new analysis metadataLLM Output Quality Improvements
UI Component Refactoring
CodeSnippetcomponent for syntax-highlighted code displayEvidenceBlockcomponent for formatted evidence textFiles Changed
Backend:
backend/src/lib/sui-client.ts- RPC error handlingbackend/src/lib/langchain-prompts.ts- Enhanced promptsbackend/src/lib/langchain-schemas.ts- Improved schemasFrontend:
frontend/app/components/- New components: AnalysisQualityCard, ConfidenceBadge, DependencySummaryCard, TechnicalFindingsSection, CodeSnippet, EvidenceBlock, ErrorBoundaryfrontend/app/components/DeploymentCard.tsx- Performance optimizationsfrontend/app/components/DeploymentsTable.tsx- Realtime integrationfrontend/app/components/AnalyzedContractCard.tsx- Enhanced displayfrontend/app/dashboard/types.ts- Extended type definitionsfrontend/app/dashboard/risk-utils.ts- New utility functionsfrontend/lib/- New hooks: useRealtimeDeployments, useDebouncedValue, useTimeTickfrontend/lib/supabase.ts- Supabase clientfrontend/lib/deployments.ts- Enhanced API clientfrontend/.env.example- Supabase configurationTest Plan