feat: Add compact view mode and redesign dashboard UI - #24
Merged
Conversation
…ements Backend: - Enforce bytecode evidence with line numbers in LLM prompts - Add strict formatting rules for evidence code snippets - Enhance schema descriptions to guide LLM output quality Frontend: - Add compact view mode with CompactContractCard component - Add ViewModeToggle with localStorage persistence - Add QuickStatsBar for at-a-glance risk distribution - Add RiskScoreGauge component for consistent score display - Add SkeletonCard for improved loading states - Enhance EvidenceBlock with better bytecode extraction patterns - Add staggered animations to AnalyzedContractCard - Support expandable compact cards for detailed view
- Add fixed widths to CompactContractCard elements to prevent layout shifts - Improve alignment and spacing in compact view - Remove duplicate filter buttons from search row (now in QuickStatsBar) - Simplify active filters display to only show search term - Better responsive design for compact cards
- Add Escape key handler to close expanded card - Add click-outside overlay with backdrop blur - Add close button (X) on expanded card - Improve z-index layering for better visual hierarchy
…ic colors - Replace hero stats cards with compact header - Add visual risk breakdown bar showing distribution - Set compact view as default mode - Use dynamic risk-based colors in contract cards - Apply getRiskLevelEmphasis and getRiskLevelSubtle utilities
- Improve card styling and spacing - Enhance animations and transitions - Refine QuickStatsBar visual design - Update compact card layout
|
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 a new compact view mode for contracts, redesigns the dashboard header with a visual risk breakdown, and enhances evidence parsing for better bytecode display.
Key Features
Compact View Mode
Dashboard Redesign
Enhanced Evidence Parsing
LLM Output Quality
UI Components
CompactContractCardcomponent for space-efficient displayViewModeTogglecomponent with localStorage persistenceQuickStatsBarfor risk distribution filteringRiskScoreGaugecomponent for consistent score displaySkeletonCardfor improved loading statesCodeSnippetcomponent for syntax-highlighted codeEvidenceBlockcomponent for formatted evidence textAnalyzedContractCardwith:Files Changed
Backend:
backend/src/lib/langchain-prompts.ts- Enhanced evidence requirementsbackend/src/lib/langchain-schemas.ts- Improved schema descriptionsFrontend Components:
CompactContractCard.tsx,ViewModeToggle.tsx,QuickStatsBar.tsx,RiskScoreGauge.tsx,SkeletonCard.tsx,CodeSnippet.tsx,EvidenceBlock.tsxAnalyzedContractCard.tsx,DeploymentsTable.tsxFrontend Pages:
frontend/app/dashboard/page.tsx- Dashboard redesign with compact mode supportFrontend Utils:
frontend/app/dashboard/risk-utils.ts- Dynamic color utilitiesfrontend/app/components/EvidenceBlock.tsx- Improved parsing logicCommits Included
Test Plan