Skip to content

feat: Host-centric compliance scan interface with enhanced UX#47

Merged
remyluslosius merged 1 commit into
mainfrom
feature/host-compliance-scan
Sep 12, 2025
Merged

feat: Host-centric compliance scan interface with enhanced UX#47
remyluslosius merged 1 commit into
mainfrom
feature/host-compliance-scan

Conversation

@remyluslosius
Copy link
Copy Markdown
Contributor

Summary

  • Transform /scans page from scan-centric to host-centric accordion view
  • Integrate real-time host status monitoring with existing StatusChip system
  • Implement comprehensive scan-host association validation and data integrity
  • Align ComplianceScans page design with application-wide UI patterns

Major Features

🖥️ Host-Centric Accordion Interface

  • Replace flat scan table with collapsible host sections
  • Display success ratio (5/10 format) prominently in host headers
  • Sort hosts by most recent scan date with 30-day filtering
  • Expandable sections revealing individual scan details per host

📊 Enhanced Host Status Integration

  • Real-time host status display using existing StatusChip component
  • Support for comprehensive status types: online/offline/reachable/ping_only/scanning/error
  • Extract host status and IP address from backend scan data
  • Visual status indicators with proper icons and color coding

🔧 Host-Level Actions

  • One-click rescan using most recent scan configuration
  • Navigate to detailed host information pages
  • Export host scan reports (all/completed/failed) as CSV
  • Individual scan actions: View Results, Download Reports

🛡️ Robust Data Validation

  • Comprehensive scan-host association validation with detailed logging
  • Transform backend nested host data to frontend expected format
  • Filter invalid scans with user-friendly error messages
  • Host ID collision detection and data integrity checks

🎨 Design Consistency Updates

  • Align ComplianceScans page with Dashboard/Hosts/Users design patterns
  • Use standard Container maxWidth="xl" for full-width utilization
  • Apply consistent Paper/Card wrapping with proper shadows and spacing
  • Standardize typography hierarchy and section spacing

Technical Improvements

Data Architecture

  • Add BackendScan interface for proper API response typing
  • Create hostStatusMap for efficient status data management
  • Implement 30-day scan filtering with date-based sorting
  • Add comprehensive error handling and user feedback

User Experience

  • Eliminate excessive whitespace with proper container utilization
  • Clean accordion interface with host metrics in headers
  • Success ratio prominently displayed for quick compliance overview
  • Consistent status visualization across host and scan levels

Performance & Reliability

  • Fix infinite re-render loop with proper useEffect dependencies
  • Maintain periodic refresh for running scans without performance impact
  • Preserve backward compatibility with existing API endpoints
  • Ensure all scans have required host_id foreign key association

Test Plan

  • Verify host-centric accordion display with proper grouping
  • Test host status integration shows correct online/offline states
  • Confirm periodic refresh works for running scans without flickering
  • Validate scan-host associations are properly maintained
  • Check design consistency matches other application pages
  • Test host-level actions (rescan, view details, export)
  • Verify CSV export functionality works for different filter types
  • Confirm navigation to detailed scan pages (/scans/{uuid})

🤖 Generated with Claude Code

## Design Consistency Improvements
- Change Container maxWidth from "lg" to "xl" for full-width utilization
- Add standard header structure with page title and descriptive subtitle
- Wrap stepper in Paper container with consistent padding (p: 3, mb: 3)
- Wrap main content in Card with CardContent for proper visual hierarchy
- Wrap navigation actions in Paper container matching other pages

## Typography and Spacing Updates
- Update section headers from h6 to h5 with component="h2" for proper hierarchy
- Change description text from body2 to body1 for better readability
- Standardize spacing: mb: 4 for major sections, mb: 3 for cards/papers
- Apply consistent content padding (p: 3) across all container components

## Visual Hierarchy Alignment
- Match header pattern used in Dashboard, Hosts, and Users pages
- Implement proper Paper/Card wrapping strategy for visual consistency
- Eliminate excessive blank space by utilizing full container width
- Ensure consistent shadow elevation and border styling

## User Experience Enhancement
- Remove centered layout that left too much whitespace on sides
- Create visual consistency across the entire application interface
- Maintain existing functionality while improving visual presentation
- Preserve responsive behavior and accessibility features

This update ensures the compliance scanning workflow integrates seamlessly
with the overall OpenWatch application design language and user experience.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@remyluslosius remyluslosius merged commit 09d7faf into main Sep 12, 2025
6 of 18 checks passed
@remyluslosius remyluslosius deleted the feature/host-compliance-scan branch September 12, 2025 16:19
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant