Skip to content

Conversation

@ecapuano
Copy link
Collaborator

Summary

This release brings Progressive Web App support to DetectionForge, along with significant improvements to the backtest functionality and user experience enhancements across the application.

What's New

🚀 Progressive Web App (PWA) Support

  • Install DetectionForge as a standalone application
  • Automatic update notifications
  • Native app-like experience on desktop and mobile

⚙️ Application Settings

  • New persistent settings section on the Configuration page
  • Toggle for including/excluding header text in IaC exports
  • Option to automatically open the first imported rule
  • Settings persist across sessions

🔍 Enhanced Backtest Experience

  • Advanced Options: Target specific sensors with SID field and choose data streams (event/audit/detect)
  • Live Results: View match counts in real-time during parallel execution
  • Improved Help: Comprehensive documentation explaining Event Limit vs Evaluation Limit
  • Better Organization: Results sorted by match count, with color-coded badges

🛠️ Fixes and Improvements

  • Fixed bulk import modal positioning with proper overlay
  • Added real-time progress tracking for bulk imports
  • Standardized all timestamps to UTC format with 'Z' suffix
  • Removed broken stateful processing parameter per LimaCharlie guidance

Contributors

  • @ecapuano - Core features and improvements
  • @Nynir - Application Settings implementation

Test Plan

  • Install PWA and verify functionality
  • Test new Application Settings persistence
  • Run backtest with new SID and stream options
  • Verify bulk import shows progress correctly
  • Confirm all timestamps display in UTC
  • Test IaC export with header toggle
  • Verify match count badges and sorting

ecapuano and others added 13 commits July 27, 2025 17:11
This commit addresses critical issues with the backtest feature and adds significant UX improvements:

## Stateful Processing Fix
- Removed the `isStateful` parameter from backtest API calls per LimaCharlie team guidance
- The LimaCharlie team confirmed there's a bug with stateful processing when explicitly set
- Backend now auto-detects stateful requirements based on rule content (e.g., "with descendant")
- Removed the "Enable stateful processing" toggle from the UI to prevent confusion

## New Backtest Options
- Added optional Sensor ID (SID) field for targeted backtesting of specific sensors
- Added Data Stream selector (event/audit/detect) to choose which telemetry stream to replay
- Implemented Advanced Options section with consistent UI styling

## Live Results During Parallel Execution
- Organizations now show match counts immediately upon completion (e.g., "3 matches" instead of just "Completed")
- Added hover tooltips showing event count and evaluation count for completed orgs
- Results are viewable in real-time without waiting for all organizations to finish
- Added visual indicators: colored left borders for timeout (orange) and cancelled (gray) states

## Enhanced Help Documentation
- Added comprehensive help modals for Event Limit and Evaluation Limit options
- Clarified critical distinction: evaluations ≠ matches (a common source of confusion)
- Provided practical examples and use cases for limit configurations
- Moved "Pro Tips" section to the top for better visibility

## UI/UX Improvements
- Fixed progress display alignment by moving runtime to the left of status badges
- Center-aligned status badge text for cleaner appearance
- Improved placeholder text clarity (e.g., "SID to scan telemetry for - leave blank for org-wide scan")
- Fixed all help modal code block formatting for better readability

## Technical Details
- Updated both parallel and series execution paths to track match/event/eval counts
- Added `backtestLiveResults` reactive array for real-time result updates
- Fixed API payload structure to properly omit is_stateful parameter
- Cleaned up CSS variables usage for consistent theming

These changes significantly improve the backtest experience, especially for long-running parallel tests across multiple organizations, while fixing the core issue with stateful rule processing.
- Update formatTimestamp() to return ISO 8601 format with 'Z' suffix (e.g., 2024-01-15T14:30:00.000Z)
- Update formatDate() to return UTC date in ISO format (YYYY-MM-DD)
- Add UTC indicators to all timestamp displays and input labels
- Update Config.vue formatValue() to display timestamps in UTC
- Ensure consistent timezone handling across the application

All timestamps from LimaCharlie are now displayed in UTC format with clear 'Z' suffix notation to prevent timezone confusion. This aligns with LimaCharlie's UTC storage timezone and provides clarity for users working across different time zones.

Affected components:
- Rules.vue: Backtest timestamps, results display, markdown exports
- Config.vue: Organization detail timestamp displays
- Fixed modal to properly float over content with dark overlay
- Added proper CSS styles for modal-overlay, modal-content, modal-header, and modal-body classes
- Added real-time progress tracking showing X/Y organizations processed
- Added visual progress bar with gradient fill
- Enhanced success count to show context during import (Success: X/Y)
- Dynamic title changes from 'Import Progress' to 'Import Results'
- Styled bulk import textarea with proper theming
- Fixed responsive styles for mobile views

Fixes #14
- Install and configure vite-plugin-pwa
- Update manifest.json with PWA properties
- Add PWA meta tags to index.html
- Implement custom install prompt component
- Configure service worker for static asset caching
- Add icon generation scripts
- Update documentation with PWA benefits and installation instructions
- Clean up debug code for production
- Create UpdateNotifier component that shows when updates are ready
- Display non-intrusive message: 'Update available - will apply on next restart'
- Position in bottom-left corner to avoid interfering with other UI elements
- Auto-detects when service worker has pending updates
- Maintains autoUpdate behavior without interrupting user workflow
- Remove all debug console.log statements from PwaInstallPrompt
- Fix icon configuration to use SVG for all sizes (PWA compatible)
- Remove references to non-existent PNG icons in HTML
- Add robots.txt file referenced in vite config
- Add dev-dist to .gitignore (generated workbox files)
- Ensure manifest.json has proper icon configuration with purpose attributes
- Clean up all development artifacts for production deployment

The PWA implementation is now fully production-ready with:
- Proper icon support using scalable SVG
- No debug code in production
- Clean build output
- All files properly referenced
- Remove commented test logic from UpdateNotifier component
- Component now only contains production code for detecting service worker updates
Major feature release including:
- Progressive Web App (PWA) support with offline capabilities
- New Application Settings section for persistent preferences
- Enhanced backtest UX with live results and advanced options
- Improved bulk import modal with progress tracking
- UTC timestamp standardization across the application

Co-authored-by: Nynir <[email protected]>
- Move eslint-disable comments outside of JSX tags
- Keep v-html warnings as they are mitigated by sanitizeHtml usage
- Removed all v-html directives and sanitizeHtml usage
- Simplified changelog rendering to use plain text
- Keep @Nynir as plain text without link for simplicity
- All lint checks now pass with no errors or warnings
- Add @rollup/rollup-linux-x64-gnu as optional dependency
- Fixes 'Cannot find module' error in GitHub Actions CI
- Maintains cross-platform compatibility for local development
@ecapuano
Copy link
Collaborator Author

Merges changes from #15
Closes #14
Closes #9

@ecapuano ecapuano merged commit 0102154 into main Jul 28, 2025
1 check passed
@ecapuano ecapuano deleted the release/v1.5.0 branch July 28, 2025 02:50
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.

2 participants