# Changelog

All notable changes to Network Performance Monitor will be documented in this file.

## [1.2.0] - 2025-07-30

### Added
- Test mode for easier regression testing of scheduled speed tests
  - `--test-mode` flag enables immediate and configurable interval speed tests
  - `--speed-test-interval` flag to set custom intervals (in milliseconds)
- Comprehensive regression test suite for scheduled speed tests
  - `npm run test:scheduled` - Run scheduled speed test regression tests
  - `npm run test:all` - Run all tests including build
- Environment variable `DB_PATH` support for custom database location during testing

### Fixed
- Scheduled speed tests failing with "No output from speedtest-cli" error
  - Now properly ignores Python deprecation warnings and stderr output
  - Uses consistent spawn method for all speed test executions
  - Added PYTHONWARNINGS environment variable to suppress deprecation warnings
- WiFi network detection on macOS
  - Replaced complex detection methods with reliable `ipconfig getsummary`
  - Fixed SSID showing as "<redacted>" instead of actual network name
  - Improved regex pattern to correctly extract SSID (not BSSID)

### Changed
- Simplified macOS network detection code
  - Removed networksetup, airport, and system_profiler methods
  - Now uses single, reliable `ipconfig getsummary` command
- Speed test execution now always uses spawn method for better control over stdout/stderr

### Documentation
- Added TEST_MODE.md with detailed test mode usage instructions
- Updated CLI help with new test mode options

## [1.1.0] - 2025-01-30

### Added
- Enhanced version display in CLI
- Improved error handling for network detection
- Better logging for daemon operations

### Fixed
- Various bug fixes and performance improvements

## [1.0.0] - 2024-01-30

### Added
- Initial release of Network Performance Monitor
- Continuous monitoring daemon with regular tests every 60 seconds
- Multiple test types: DNS, Ping, Website response, Speed tests
- Network-aware testing (tracks WiFi SSID or interface name)
- Web UI dashboard with real-time charts
- Manual speed test trigger button in UI
- Time-range selection (1 hour to all data)
- Network filtering in UI
- Auto-refresh with countdown timer
- Anomaly detection and highlighting
- Average line indicators on charts
- Configurable test intervals via JSON config
- SQLite database for historical data
- Smart logging with local timezone
- npx support for easy execution
- Shorter alias `npm-monitor`

### Features
- No speed test on startup (only scheduled/manual/anomaly-triggered)
- Network detection caching (1-minute cache for UI requests)
- Time-range aware averages (not fixed 30-day)
- Default view set to 1 hour instead of all data
- Four key metrics display: Avg Ping, Avg Website Response, Avg Download/Upload
- Repository link in UI title

### Technical
- TypeScript implementation
- Express.js web server
- Chart.js for visualization
- Winston for logging
- Commander.js for CLI
- Cross-platform support (macOS, Linux, Windows)