Add centralized escapeHtml() utility and apply it to every dynamic value
inserted via innerHTML/template literals across the frontend. Data from
VRS JSON sources and external CSV files (airline names, countries) flows
through the backend as arbitrary strings that could contain HTML. While
Go's json.Marshal escapes < > &, JavaScript's JSON.parse reverses those
escapes before the values reach innerHTML — enabling script injection.
Affected modules: aircraft-manager, ui-manager, callsign-manager,
map-manager, and the 3D radar labels in app.js.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## Simple and Safe Bandwidth Optimization
### Single Line Change
- Added `EnableCompression: true` to WebSocket upgrader
- Enables automatic deflate compression for all WebSocket messages
- No other code changes required
### Expected Benefits
- 60-90% reduction in WebSocket message size
- Automatic compression/decompression handled by browser and Go
- Particularly effective for JSON data with repeated field names
- No impact on functionality or reliability
### Why This Approach
- Minimal risk - single configuration flag
- Immediate benefits without complex logic
- Built-in browser and Go support
- No client-side changes needed
- Easy to disable if issues arise
This provides significant bandwidth savings with zero complexity,
allowing us to evaluate the impact before considering more advanced
optimizations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds advanced visual feedback system for 3D radar aircraft with real-time signal quality indicators:
Signal Quality Visualization:
- Opacity mapping based on signal strength (-60 to -5 dBFS range)
- Emissive glow intensity reflects signal quality (Excellent/Good/Fair/Poor)
- Multi-source data indicators (small spheres for aircraft with multiple receivers)
- Dynamic signal strength analysis from aircraft sources data
- Real-time updates with changing signal conditions
Enhanced Trail System:
- Gradient coloring with age-based fading (30% to 100% intensity)
- Aircraft type-based trail colors (cyan=helicopter, blue=heavy, yellow=light, teal=medium)
- Signal quality affects trail brightness and visibility
- Custom BufferGeometry with per-vertex colors
- Memory-efficient geometry disposal and rebuilding
Technical Improvements:
- Modular signal data extraction from aircraft sources
- Linear signal strength to opacity mapping
- Quality multiplier system for visual feedback
- Proper Three.js BufferAttribute management
- Dynamic visual updates synchronized with aircraft data
Visual Results:
- Strong signals = bright, opaque aircraft with vivid trails
- Weak signals = dim, transparent aircraft with faded trails
- Multi-source aircraft display small indicator spheres
- Trail colors match aircraft types for consistency
- Smooth gradient effects enhance flight path visualization
Addresses core signal quality and trail enhancement requirements from issue #42.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds comprehensive visual differentiation system for 3D radar aircraft:
Aircraft Type Differentiation:
- Different 3D geometries for aircraft categories (helicopter, heavy, medium, light)
- Color coding: cyan=helicopter, blue=heavy, green=medium, yellow=light
- Size scaling based on aircraft weight class
- Emergency override: red color for emergency squawks and alerts
Movement Indicators:
- Aircraft orientation based on track/heading data
- Climb/descent indicators with 500 fpm threshold
- Green upward arrows for climbing aircraft
- Red downward arrows for descending aircraft
- Dynamic indicator management (add/remove based on vertical rate)
Technical Implementation:
- Modular aircraft geometry creation system
- Visual type detection based on Category field
- Enhanced material system with emissive properties
- Proper cleanup of climb/descent indicators
- Updated selection system to restore original aircraft colors
Addresses core visual enhancement requirements from issue #42.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Extend PositionPoint struct to include altitude field in position history
- Update position history population to store altitude with each position
- Fix 3D aircraft labels to show GroundSpeed instead of undefined Speed field
- Enable true 3D flight trails with proper altitude visualization
- Improve trail accuracy by using historical altitude data per position
Resolves trails showing flat paths and labels showing N/A for speed.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add conditional verbose logging controlled by ?verbose URL param or localStorage
- Reduce frequent WebSocket message logging to verbose mode only
- Minimize aircraft position update logging to prevent console spam
- Make 3D radar initialization logging conditional on verbose flag
- Reduce WebSocket message counter frequency from every 10 to every 500 messages
- Preserve important error messages and connection status logging
Users can enable verbose logging with:
- URL parameter: http://localhost:8080?verbose
- localStorage: localStorage.setItem('skyview-verbose', 'true')
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add Reset View button functionality to reset camera to default position
- Implement Auto Rotate toggle with visual feedback and button text updates
- Add Range slider (10-500km) with real-time aircraft distance filtering
- Use server-provided origin coordinates via /api/origin API endpoint
- Implement Haversine formula for accurate geographic distance calculations
- Add deferred initialization to prevent black screen issue
- Enhanced lighting and ground plane visibility for better 3D orientation
- Add comprehensive debugging and error handling for WebGL/Three.js
- Style 3D radar controls with proper CSS for consistent UI
- Remove construction notice as controls are now fully functional
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
The embedded files debug output was showing on every database page visit,
cluttering the logs with unnecessary information. Made it conditional on
the -verbose flag to reduce noise in production logs.
Changes:
- Added 'debug' field to Server struct
- Updated NewWebServer constructor to accept debug parameter
- Pass verbose flag from main.go to server constructor
- Made debugEmbeddedFiles() conditional on debug flag
Now debug output only appears when -verbose flag is used, keeping
normal operation clean while preserving debugging capability.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
The modernc.org/sqlite package registers its driver as 'sqlite', not 'sqlite3'.
Updated the sql.Open() call to use the correct driver name.
This fixes the database connection error:
'sql: unknown driver "sqlite3" (forgotten import?)'
Verified working:
- Database initialization succeeds
- skyview-data status command works
- Main skyview server starts with database connection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replaced github.com/mattn/go-sqlite3 (CGO-based) with modernc.org/sqlite
(pure Go implementation) to enable CGO-free builds while maintaining
full SQLite functionality.
Benefits:
- ✅ Cross-compilation without C compiler requirements
- ✅ Simplified build environment (no CGO_ENABLED=1)
- ✅ Reduced deployment dependencies
- ✅ Easier container builds and static linking
- ✅ Full SQLite compatibility maintained
Changes:
- Updated go.mod to use modernc.org/sqlite v1.34.4
- Updated database import to use pure Go SQLite driver
- Removed CGO_ENABLED=1 from all Makefile build targets
- Verified all binaries (skyview, beast-dump, skyview-data) build successfully
The modernc.org/sqlite package is a cgo-free port of SQLite that transpiles
the original C code to Go, providing identical functionality without CGO.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added missing icon types (heavy, large, light, medium) to the loadIcons() function.
The icon cache was only loading 6 out of 10 available SVG icons, causing aircraft
with weight-based classifications to display as plain circles instead of proper
aircraft icons.
Fixed icon types now loaded:
- ✅ commercial, helicopter, military, cargo, ga, ground (existing)
- ✅ heavy, large, light, medium (newly added)
This ensures all aircraft with known ADS-B emitter categories display the correct
type-specific icons instead of falling back to generic circle markers.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed CSS class names from 'rssi-*' to 'signal-*' to match the naming
used in JavaScript code (ui-manager.js:187-190). This fixes signal strength
color indicators that were not displaying properly due to the mismatch.
Signal strength colors now work correctly:
- signal-strong: bright green (#00ff88)
- signal-good: yellow (#ffff00)
- signal-weak: orange (#ff8c00)
- signal-poor: red (#ff4444)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced the SkyView logo text visibility against dark backgrounds:
- Changed text gradient from dark gray to bright white/light gray
- Added dark stroke outlines (3px) around text for better contrast
- Used stroke-linejoin="round" for smoother outline appearance
- Text now has white fill with dark outline for maximum visibility
This ensures the logo text is clearly readable on both light and dark
backgrounds commonly used in web applications.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Created comprehensive branding package for SkyView including:
Assets Created:
- SVG logo with animated radar theme for header
- Multi-size favicon set (16px, 32px, 48px)
- High-resolution app icon (512x512) for mobile/desktop
- Aviation-themed radar design with animated aircraft blips
UI Updates:
- Updated HTML with proper favicon links and theme color
- Enhanced header layout to include logo alongside version info
- Added responsive CSS styling for new branding elements
- Logo features animated radar sweep and aircraft tracking theme
Technical Details:
- All assets use SVG format for scalability and crisp display
- Radar theme with cyan/blue color scheme matching app design
- Logo includes animated elements (radar sweep, blinking aircraft)
- Favicons optimized for different display sizes
- Added proper meta tags for mobile app integration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed Sources list and dropdown to sort alphabetically by name instead of
dynamically by last data arrival time. This provides a stable, predictable
order that is less distracting during use.
- Modified updateSourcesLegend() in map-manager.js to sort sources by name
- Modified updateSourceFilter() in ui-manager.js to maintain consistent sorting
- Sources now use localeCompare() for proper alphabetical ordering
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes incorrect time calculations in the interface clocks:
UTC Clock Issues Fixed:
- Remove incorrect timezone offset addition that was causing wrong UTC display
- Use proper getUTCHours() and getUTCMinutes() methods directly on current time
- Ensure UTC clock shows actual UTC time for aviation coordination
Last Update Clock Issues Fixed:
- Stop using UTC methods for local "last update" time display
- Use getHours() and getMinutes() for proper local time representation
- Last update clock now shows meaningful local time when data was received
Technical Changes:
- Add useUTC parameter to updateClock() method for proper time zone handling
- Simplify time calculations by using appropriate Date methods
- Add clear comments explaining clock behavior and timezone usage
Expected Behavior:
- UTC clock displays current UTC time (aviation standard)
- Last update clock displays local time of most recent data update
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Resolves issue #3 where aircraft age field was always showing 0 seconds.
Backend Changes:
- Fix MarshalJSON in merger.go to calculate age dynamically using time.Since(a.LastUpdate)
- Add comprehensive tests for age calculation in merger_test.go
Frontend Changes:
- Add calculateAge() utility method to both aircraft-manager.js and ui-manager.js
- Update popup content and aircraft table to use client-side age calculation
- Implement real-time age updates every second in app.js
- Add updateOpenPopupAges() function to refresh popup displays
Key Benefits:
- Aircraft age now shows actual seconds since last transmission
- Real-time updates in UI without requiring new WebSocket data
- Proper data staleness indicators for aviation tracking
- No additional server load - client-side calculation using last_update timestamp
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Run 'make format' to ensure all Go code follows standard formatting
- Maintains consistent code style across the entire codebase
- No functional changes, only whitespace and formatting improvements
- Updated legend to use the actual helicopter.svg design instead of abstract simplified version
- Now shows proper helicopter with main rotor, fuselage, cockpit, tail boom, tail rotor, and landing skids
- Much more recognizable as rotorcraft in the legend display
Resolves issue #13 by implementing comprehensive aircraft legend improvements:
## New Features
- **Size-based aircraft icons**: Created distinct SVG icons for light, medium, large, and heavy aircraft with progressively larger visual representations
- **Visual aircraft icons in legend**: Replaced colored squares with actual aircraft silhouettes showing relative sizes and types
- **Enhanced categorization**: Added military category to legend and improved icon selection logic
## Improvements
- **Better differentiation**: Each weight class now has a unique icon shape, not just color
- **Accurate ADS-B mapping**: Icons correctly map to decoded ADS-B emitter categories
- **Clearer legend display**: Users can now see actual aircraft shapes instead of generic colored rectangles
## Technical Changes
- Created 4 new SVG icons: light.svg, medium.svg, large.svg, heavy.svg
- Updated legend HTML to embed aircraft SVG icons inline
- Enhanced JavaScript logic to better match categories to appropriate icon types
- Simplified color mapping function for cleaner code
This addresses the original concerns about confusing legend entries and lack of visual differentiation between aircraft types.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive build system documentation with Makefile targets
- Document development workflow and pre-commit checks
- Add security and safety guidelines for process management
- Include container strategy with Podman preferences
- Expand UX guidelines for mobile responsiveness
- Document command line tools (beast-dump, skyview-data)
- Add database integration requirements (CGO, SQLite)
- Enhance release management with version update requirements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Set CGO_ENABLED=1 in Makefile for all build targets
- Set CGO_ENABLED=1 in Debian build script
- Resolves "go-sqlite3 requires cgo to work" runtime error
- Ensures proper SQLite3 database functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix database update service to include config path parameter
- Move ConditionACPower from [Timer] to [Unit] section in timer config
- Add database directory to ReadWritePaths in main service
- Set explicit database path in Debian package config template
- Simplify postinst script to be quiet and use consistent skyview-adsb user
- Update README.Debian with comprehensive systemd service documentation
- Remove confusing dual-user setup in favor of single skyview-adsb user
SystemD Configuration Summary:
- Main service: skyview-adsb.service with database pre-update
- Database service: skyview-database-update.service (oneshot)
- Weekly timer: skyview-database-update.timer (Sunday 3AM with randomization)
- All services use skyview-adsb user consistently
- Database path: /var/lib/skyview-adsb/skyview.db
- Config path: /etc/skyview-adsb/config.json
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Document complete database schema including aircraft history and callsign cache
- Add external data source tables and relationships
- Include optimization and maintenance procedures
- Document indexes, performance considerations, and storage requirements
- Provide examples of database queries and operations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add callsign management module for enhanced aircraft information
- Integrate database status display in web interface
- Update aircraft manager with database-backed callsign resolution
- Enhance user interface with database connectivity indicators
- Add embedded asset management for new database interface components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add unit tests for database operations and optimization
- Test external data source loading and caching
- Add callsign manager functionality tests
- Create test helpers for database testing utilities
- Ensure database reliability and performance validation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add database management commands and optimization examples
- Reference new CONFIGURATION.md documentation
- Update systemd service references to use skyview-adsb
- Enhance skyview-data status command with optimization statistics
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create detailed CONFIGURATION.md covering all SkyView settings
- Document external aviation data sources (OpenFlights, OurAirports)
- Explain origin vs sources distinction for map center vs receivers
- Include privacy controls, database optimization, and validation
- Provide environment-specific configuration examples
- Cover database management commands and troubleshooting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create /database page showing database statistics, size, and location
- Display storage efficiency, page statistics, and optimization info
- Show external data sources with license information and load status
- Include auto-refresh functionality and navigation links
- Implement CSS overrides to fix scrolling issues
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add database file size, path, and modification timestamp to /api/database/status
- Include storage efficiency metrics and page statistics
- Add optimization statistics using database manager
- Import "os" package for file system operations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix SQL queries in ClearExpiredCache() and GetCacheStats() functions
- Resolves "no such column: cache_expires" database error
- Column name now matches schema definition in migrations.go
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change User and Group from 'skyview' to 'skyview-adsb' in service files
- Update ReadWritePaths in database update service accordingly
- Add external data source configuration to example config
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement comprehensive database package with versioned migrations
- Add skyview-data CLI tool for managing aviation reference data
- Integrate database with merger for real-time aircraft history persistence
- Support OurAirports and OpenFlights data sources (runtime loading)
- Add systemd timer for automated database updates
- Fix transaction-based bulk loading for 2400% performance improvement
- Add callsign enhancement system with airline/airport lookups
- Update Debian packaging with database directory and permissions
Database features:
- Aircraft position history with configurable retention
- External aviation data loading (airlines, airports)
- Callsign parsing and enhancement
- API client for external lookups (OpenSky, etc.)
- Privacy mode for complete offline operation
CLI commands:
- skyview-data status: Show database statistics
- skyview-data update: Load aviation reference data
- skyview-data list: Show available data sources
- skyview-data clear: Remove specific data sources
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Resolves#30
- Add comprehensive squawk code lookup database with emergency, standard, military, and special codes
- Implement squawk.Database with 20+ common transponder codes including:
* Emergency codes: 7700 (General Emergency), 7600 (Radio Failure), 7500 (Hijacking)
* Standard codes: 1200/7000 (VFR), operational codes by region
* Special codes: 1277 (SAR), 1255 (Fire Fighting), military codes
- Add SquawkDescription field to Aircraft struct and JSON marshaling
- Integrate squawk database into merger for automatic description population
- Update frontend with color-coded squawk display and tooltips:
* Red for emergency codes with warning symbols
* Orange for special operations
* Gray for military codes
* Green for standard operational codes
- Add comprehensive test coverage for squawk lookup functionality
Features:
- Visual emergency code identification for safety
- Educational descriptions for aviation enthusiasts
- Configurable lookup system for regional variations
- Hover tooltips with full code explanations
- Graceful fallback for unknown codes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
The Beast decoder was not setting PositionValid=true after successfully
decoding aircraft positions, causing position tracking statistics to
show 0 positioned aircraft even when aircraft had valid coordinates.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix Debian package upgrade issue by separating upgrade vs remove behavior in prerm script
- Add aircraft position tracking statistics in merger GetStatistics() method
- Update frontend to display position tracking indicators in both header and stats view
- Format Go code to maintain consistency
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>