Commit graph

513 commits

Author SHA1 Message Date
dadfef8a5b
cleanup 2025-07-18 10:41:26 -05:00
8d5bfe127e
add email 2025-07-18 10:15:09 -05:00
8e04916481
vendor update 2025-07-18 08:39:43 -05:00
af4ab270e2
Replace any types with specific TypeScript types
- Add comprehensive type definitions for Leaflet plugins (heatmap, marker clustering, overlapping marker spiderfier)
- Create event payload interfaces for all LiveView events
- Add marker extension types for APRS-specific properties
- Define Chart.js dataset and configuration types
- Replace 74 instances of 'any' type across all TypeScript files
- Improve type safety for event handlers and state management
- Add proper typing for external library integrations

This refactoring enhances type safety throughout the codebase, making it easier to catch errors at compile time and improving IDE support for autocompletion and refactoring.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-17 17:55:27 -05:00
a31d38ec6a
different trail colors 2025-07-16 09:36:49 -05:00
1d1195ae87
js refactor 2025-07-16 09:23:33 -05:00
566198afa7
clean up warnings 2025-07-16 08:55:46 -05:00
46340e008a
update deps 2025-07-16 08:20:20 -05:00
534bd8df8a
clean up status page 2025-07-15 13:56:01 -05:00
400e444eaa
Fix packet_counters table bloat with sequence-based counter
- Add aggressive autovacuum settings for packet_counters table
- Replace table-based counter with PostgreSQL sequence to eliminate bloat
- Sequences are designed for high-frequency counter operations
- Maintains backward compatibility through get_packet_count() function

The packet_counters table was experiencing severe bloat due to 350K+ updates
on a single row. PostgreSQL sequences avoid this issue entirely.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 13:34:15 -05:00
b4fcd4382e
Fix missing socket return in handle_pending_bounds
The function was sending a message but not returning the socket,
causing an ArgumentError when the result was passed to assign/3.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 11:14:48 -05:00
bf1c8a0b05
Fix Access behavior error in DeviceParser
Replace bracket notation (packet_data[key]) with Map.get/2 to avoid
UndefinedFunctionError when processing ParseError structs that don't
implement the Access behavior.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 11:10:50 -05:00
114514bdfe
Fix missing historical_packets in socket assigns
Add missing :historical_packets initialization to prevent KeyError when
HistoricalLoader tries to access it during zoom-based display handling.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 11:07:05 -05:00
e97d1d6e33
Fix duplicate indexes and missing socket assigns
- Remove duplicate received_at indexes (packets_received_at_asc_idx and packets_recent_hour_idx)
  that were consuming 423 MB, keeping only packets_received_at_idx
- Fix KeyError by initializing missing :all_packets and :visible_packets in socket assigns
- All tests now pass successfully

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 11:01:27 -05:00
c431a45b0b
remove duplicate indexes and fix telemetry metrics 2025-07-15 09:17:30 -05:00
53c88d2262
postgres optimization 2025-07-15 09:06:40 -05:00
0298c8ec91
Revert all packet processing optimizations to fix buffer overflow
- Restored original PacketConsumer implementation from before optimizations
- Reverted to fixed batch size of 50 packets (original value)
- Removed SystemMonitor and InsertOptimizer from application startup
- Restored original config with buffer size 1000 and batch timeout 1000ms
- Removed all dynamic batch sizing and optimization logic

The recent performance optimizations were causing packet buffer overflows
because the dynamic batch sizing was actually slowing down processing.
Reverting to the simpler, working implementation that processes packets
consistently without buffer overflows.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 08:44:26 -05:00
f1d16d656b
Fix packet buffer overflow by reverting dynamic batch sizing
- Increased packet buffer size from 1,000 to 10,000 to handle traffic spikes
- Removed InsertOptimizer dynamic batch sizing that was slowing processing
- Reverted to fixed batch size of 200 for consistent performance
- Simplified insert options to use static configuration
- Added telemetry metrics for buffer overflow and utilization monitoring
- Fixed unused variable warning in packet_consumer.ex

The root cause was the recent performance optimizations that introduced
dynamic batch sizing, which actually degraded performance and caused
the producer buffer to overflow when the consumer couldn't keep up.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 08:25:02 -05:00
8811298eed
Fix packet buffer overflow and system load adjustment issues
- Fixed InsertOptimizer returning map instead of keyword list for Ecto
- Increased batch size ranges to handle high load (100-800 packets)
- Improved consumer responsiveness:
  - Reduced batch timeout from 1000ms to 500ms
  - Process batches at 80% capacity for better throughput
  - Reduced adjustment interval from 10s to 5s
- Added comprehensive logging for debugging buffer status
- Created integration tests for packet pipeline
- Coordinated batch sizing between SystemMonitor and InsertOptimizer

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 08:16:11 -05:00
53206978df
improvements 2025-07-14 17:06:39 -05:00
8e507702f7
more performance improvements/cleanup 2025-07-14 16:49:55 -05:00
3730b8c848
performance improvements 2025-07-14 16:35:58 -05:00
342de6a461
fix compile error 2025-07-14 12:44:14 -05:00
389ce8edeb
cleanup worker tweaks 2025-07-14 12:31:47 -05:00
Graham McIntire
9b76a2ca79
Merge pull request #13 from aprsme/improve-aprs-map-features
Improve APRS map with beacon filtering, error handling, and performance optimizations
2025-07-14 12:14:56 -05:00
f26c367b6c
allow reduced historical packet age 2025-07-14 12:14:12 -05:00
e6ccb9662b
major refactor for cleanup 2025-07-14 12:06:10 -05:00
b065404803
Fix credo warnings and ensure clean compilation
- Renamed predicate functions to follow Elixir conventions:
  - is_finite? → finite?
  - is_finite_number? → finite_number?
  - is_finite_float? → finite_float?
- Fixed all function returns to ensure proper nil handling
- Applied mix format to all files
- All tests pass with no compilation warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 10:25:01 -05:00
94f3a62539
Add comprehensive input sanitization for coordinate parsing
Security improvements:
- Added sanitize_numeric_string to remove dangerous characters
- Limited input string length to prevent DoS attacks (20 chars for numbers)
- Added is_finite? checks to prevent infinity/NaN values
- Validate coordinate ranges (lat: -90 to 90, lng: -180 to 180)
- Added safe_parse_coordinate with proper validation
- Updated to_float in EncodingUtils with security validations
- Protected against integer overflow in coordinate conversions
- Added sanitize_path_string for APRS path validation

All coordinate inputs from users are now:
1. Sanitized to remove injection characters
2. Length-limited to prevent resource exhaustion
3. Validated for finite values (no infinity/NaN)
4. Checked against valid geographic ranges
5. Given safe fallback defaults

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 10:20:10 -05:00
1934b8d014
Optimize memory pruning performance for large datasets
- Implemented dual-strategy pruning based on overage size
- Small overages (<10 packets): Only remove exactly what's needed
- Large overages: Batch prune with 20% buffer to reduce frequency
- Used Map.drop for more efficient bulk deletion
- Added Stream for lazy evaluation in small overage case
- Reduces complexity from O(n log n) on every insertion to:
  - O(k log k) for small overages where k << n
  - Amortized O(n log n) for large overages with buffering
- This significantly improves performance when managing thousands of packets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 10:11:53 -05:00
133dd2cc0e
Fix integer overflow risk in duration parsing
- Added validation for trail_duration values (1, 6, 12, 24, 48, 168 hours)
- Added validation for historical_hours values (1, 3, 6, 12, 24 hours)
- Created parse_trail_duration and parse_historical_hours helper functions
- Functions return safe defaults (1 hour) for invalid input
- Prevents potential integer overflow from unchecked String.to_integer calls
- Fixed all compilation warnings by properly grouping handle_event clauses

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 10:08:00 -05:00
6026c0f888
Fix failing tests and improve movement tracking
- Fixed PHG parsing test to match actual parser behavior
- Fixed movement test to properly handle batch loading behavior
- Movement test now sets bounds and uses higher zoom level
- Added helper function to flush events during test setup
- All tests now passing with clean compilation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 10:03:04 -05:00
93c3fe0f19
feat: improve APRS map with beacon filtering, error handling, and performance optimizations
- Filter APRS built-in beacon patterns (WIDE, TRACE, RELAY, etc.) from RF paths
- Add comprehensive error recovery for database query failures
- Implement memory management with packet limits to prevent unbounded growth
- Add loading state indicators with progress tracking
- Increase debounce timing and add generation-based request cancellation
- Refactor code to use pattern matching instead of conditionals
- Add input validation for callsigns
- Fix all credo and compilation warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 09:42:29 -05:00
766a1301e0
fix stations that heard call 2025-07-13 18:55:51 -05:00
610a5b8949
refactor 2025-07-13 16:49:20 -05:00
fa89712587
main map improvements 2025-07-13 14:58:13 -05:00
532a81c0b4
integrate /:call to main page 2025-07-13 10:36:58 -05:00
93b298ab9f
add more info on info page 2025-07-13 10:12:59 -05:00
184ca52a8c
cleanup 2025-07-13 09:35:40 -05:00
8ca4ea2e2b
add link to calls on path 2025-07-13 09:21:26 -05:00
4348d34f62
fix weather 2025-07-12 10:53:11 -05:00
ac415368e8
remove extra line above PHG 2025-07-12 10:26:55 -05:00
c09f9175f4
add PHG parsing 2025-07-12 10:22:43 -05:00
68f0e77f37
add comment on info page 2025-07-12 09:47:09 -05:00
ad88e34ab6
account for gps drift 2025-07-12 09:40:28 -05:00
76c871ff39
make marker come to front view when clicked 2025-07-12 09:24:59 -05:00
15c8aa1d25
more permissive callsign parsing 2025-07-12 09:10:49 -05:00
628495fc76
badpackets formatting 2025-07-12 08:02:51 -05:00
d88adf4293
reduce caching 2025-07-11 14:42:01 -05:00
d75a8e75c6
docker fix for vendored submodule 2025-07-11 14:34:38 -05:00