- Better Arrow Visibility: Larger, more prominent arrows with proper markers
- Dynamic Arrow Colors:
- 🟢 Green: Successful flow progression
- 🔴 Red: Failed requests (with dashed lines)
- 🔵 Blue: Currently processing (animated)
- ⚫ Gray: Idle/not reached components
- Labeled Arrows: Each arrow shows what's happening:
🔐 JWT + Query(User → Agent)🔍 Verify & Route(Agent → Middleware)⚖️ Authorize(Middleware → OPA)📊 Execute Query(OPA → Database)
- Pinpoint Failures: Only the failing component turns red and pulses
- Failure Detection: Shows exactly where in the flow the failure occurred
- Failure Indicator: Red alert banner shows which component failed
- Proper Flow Termination: Components after failure point remain idle (gray)
- Better Icons: More descriptive icons for each component
- Status Indicators: Each component shows both icon and status text
- Improved Styling: Better gradients, shadows, and hover effects
- Responsive Design: Larger visualization area for better visibility
- Flow visualization shows authentication → authorization → database access
- Proper failure handling for different error types:
- 401 Errors: Agent failure (authentication)
- 403 Errors: OPA failure (authorization denied)
- 500+ Errors: Database failure
- Network Errors: Agent failure (connection issues)
- Same zero trust flow for MCP tool calls
- Shows how MCP tools go through the same security pipeline
- Proper error categorization for MCP-specific failures
- Original enhanced visualization with all new features
- Complete flow tracking for all operations
// Start a new flow sequence
startFlow()
// Progress through components
progressFlow(currentComponent, nextComponent, success)
// Handle failures (only failing component turns red)
failFlow(failingComponent, errorMessage)
// Complete successful flows
completeFlow(result)- Authentication Failures: Highlighted at Agent level
- Authorization Failures: Highlighted at OPA Policy level
- Database Failures: Highlighted at Database level
- Network Failures: Highlighted at Agent level
- Success: Green gradient with success checkmark
- Processing: Blue gradient with animated pulse and hourglass
- Error: Red gradient with error X and pulse animation
- Idle: Gray gradient with neutral circle
- Thicker Lines: 4px width for better visibility
- Proper Arrowheads: Large, clear arrow markers
- Color Coding: Matches component states
- Animation: Flows animate during processing
- Dashed Lines: Error states show dashed red lines
- Larger Canvas: Increased height to 320px for better visibility
- Better Spacing: Components positioned for optimal arrow flow
- Responsive Grid: Side-by-side with results on larger screens
- Failure Banner: Clear indication when failures occur
- Agent Processing: 500ms simulation
- Middleware Processing: 500ms simulation
- OPA Authorization: 300ms simulation
- Database Query: 500ms simulation
- Each component updates in real-time as the request flows through
- Users can see exactly where their request is in the pipeline
- Failures immediately highlight the problematic component
- 401 Unauthorized → Agent failure (JWT issues)
- 403 Forbidden → OPA failure (policy denial)
- 500+ Server Errors → Database failure (query issues)
- Network Errors → Agent failure (connectivity)
- User: Always successful (user initiated the request)
- Agent: Authentication, token validation, network issues
- Middleware: Request processing, routing failures
- OPA: Authorization policy denials, policy evaluation errors
- Database: Query execution, connection issues, data errors
All three pages now have:
- ✅ Identical Flow Visualization: Same components, same styling
- ✅ Consistent Error Handling: Same failure detection logic
- ✅ Unified State Management: Shared flow store across pages
- ✅ Same Visual Language: Icons, colors, and animations match
- Clear Debugging: See exactly where requests fail
- Visual Feedback: Immediate understanding of system state
- Error Categorization: Know which component to investigate
- Professional Appearance: Polished, animated visualizations
- Educational Value: Shows zero trust principles in action
- Interactive Learning: Users see security in real-time
- Audit Visualization: See the security pipeline in action
- Policy Validation: Watch OPA decisions happen live
- Failure Analysis: Pinpoint security control failures
- Custom node components with dynamic styling
- Enhanced edge styling with proper arrows
- Real-time updates with animation keys
- Responsive layout with proper viewport
- Zustand store for flow state
- Progressive flow updates
- Failure isolation logic
- Cross-component communication
- HTTP status code analysis
- Component-specific failure mapping
- Visual feedback for all error types
- Graceful degradation
The zero trust visualization is now enhanced across all three pages with:
- 🎯 Clear Arrows: Prominent, labeled, color-coded flow indicators
- 🚨 Smart Failures: Only failing components turn red
- 🎨 Better Visuals: Improved styling, animations, and layout
- 🌐 Universal Coverage: Consistent across Patient Portal, MCP Demo, and Main Demo
Ready for testing and demonstration! 🚀