Commit graph

862 commits

Author SHA1 Message Date
ae14b120fa
Remove Redis/Cachex dependency, use pure ETS for caching
- Replace Cachex with native ETS (Erlang Term Storage) in Cache module
- Remove Redis-based caching logic from application.ex
- Always initialize ETS tables for device_cache, query_cache, symbol_cache
- Update StatusLive to use Aprsme.Cache instead of Cachex directly
- Fix crash on startup when REDIS_URL was set but Redis not used

This fixes the no_cache error that was causing pods to crash.
2025-10-24 17:12:38 -05:00
18d95b9a1f
fix: add timeout for cluster formation to ensure APRS-IS connection
Previously, when clustering was enabled, the leader election process
would wait indefinitely for the cluster to form. If cluster formation
failed or took too long, no leader would be elected and the APRS-IS
connection would never start, leaving the system disconnected.

Changes:
- Add 30-second timeout for cluster formation
- Force leader election after timeout, even in single-node mode
- Add election_forced flag to prevent duplicate election attempts
- Improve logging to distinguish between cluster and single-node modes

This ensures that at least one node will always connect to APRS-IS,
even if clustering fails completely.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 15:00:43 -05:00
537057ee9a
more redis cleanup 2025-10-22 16:30:04 -05:00
26d93e36c7
fix: remove Exq dependency and Redis job queue
- Remove Exq dependency from mix.exs and application config
- Remove all Exq configuration from config files (config.exs, dev.exs, runtime.exs, test.exs)
- Update CleanupScheduler to run cleanup tasks directly using Task.start instead of queuing jobs
- Update PacketCleanupWorker documentation to remove Exq references
- Cleanup functionality preserved but now runs in supervised Tasks instead of job queue

This resolves the Redis connection error on startup by eliminating the dependency on external job queues.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 16:24:59 -05:00
cc4578653f
cleanup and remove redis 2025-10-22 16:19:17 -05:00
6acc007360
refactor: remove Redis dependency for PubSub, use distributed Erlang
- Remove phoenix_pubsub_redis dependency from mix.exs
- Update PubSub configuration to use Phoenix's native distributed capabilities
- Simplify clustering logic - no longer requires Redis URL for PubSub
- Phoenix PubSub automatically distributes messages across connected Erlang nodes
- Benefits: lower latency, automatic failure handling, simpler deployment
- Redis still available for caching and job processing when needed
- Maintains backward compatibility for both clustered and non-clustered modes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 15:48:00 -05:00
a37b86bf57
update deps 2025-10-22 15:27:50 -05:00
d42824a6ca
fix: remove vendor/aprs local dependency from Dockerfile
Remove references to vendor/aprs directory since the app uses GitHub
dependency {:aprs, github: "aprsme/aprs", branch: "main"} instead.
This was causing build failures when trying to compile non-existent
local vendor code.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 14:58:00 -05:00
439265c2c2
fix: simplify disco.json to use Dockerfile build process
Remove custom build commands and worker service from disco.json to avoid
conflicts with vendor/aprs dependency compilation. Let Disco use the
existing Dockerfile which properly handles the build process.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 14:56:36 -05:00
2fb7016912
add disco.json 2025-10-22 14:36:12 -05:00
6c49980360
add appsignal 2025-10-21 12:29:59 -05:00
5e3f0bc5cf
fix coord bug 2025-10-19 09:06:58 -05:00
1b638cf739
chore: add contributor guide and harden cache/csrf helpers 2025-10-15 11:53:21 -05:00
751b8a5f1b
improve dialyzer 2025-10-13 10:02:15 -05:00
d75896597e
fix: resolve test failures and improve error handling
- Fix duplicate bad packet storage in store_packet function
  - Changed insert_packet to return specific error tuples
  - Handle validation_error and storage_exception separately
  - Prevent double storage of bad packets

- Add try/catch wrapper around insert_packet for exception handling
  - Properly catch and return storage_exception errors
  - Test now correctly expects :storage_exception

- Add helper function for LiveView tests with duplicate IDs
  - Added live_with_warn/2 to ConnCase
  - Suppress duplicate ID warnings in integration tests

- Fix unused variable warning in insert_packet

All packet tests now pass without failures.
2025-10-13 09:26:40 -05:00
95fd9aa443
fix: fix Leaflet polyline error and add coordinate validation
- Fix typo: bindTooltip -> bindTooltip in RF path visualization
- Add coordinate validation before creating polylines
  - Check initial station coordinates are finite numbers
  - Validate each path station's coordinates
  - Skip invalid coordinates with console warning
- Prevents "can't access property 'x', h is undefined" error
2025-10-12 14:58:39 -05:00
62ada761cd
refactor: improve code quality and fix potential issues
- Remove duplicate time formatting function in components.ex
  - Use existing time_ago_in_words from TimeHelpers instead of custom format_time_ago
- Remove unnecessary Float multiplication in format_coordinates
  - Changed Float.round(lat * 1.0, 4) to Float.round(lat, 4)
- Fix TypeScript type safety issues
  - Add pendingMarkers to LiveViewHookContext interface
  - Add initializationTimeout property for proper cleanup
- Add cleanup for map initialization retry timeout
  - Prevent memory leak by clearing timeout in destroyed() method
- Format code with mix format

All changes maintain backward compatibility while improving code quality.
2025-10-12 14:02:27 -05:00
8a70011679
fix: add safety checks for marker cluster removal
- Check if markerClusterGroup is ready before removing markers
- Verify _map and _topClusterLevel exist in cluster group
- Add try-catch blocks to handle removal errors gracefully
- Clean up tracking maps even if layer removal fails
- Prevents 'can't access property "_childClusters"' errors
2025-10-12 12:50:06 -05:00
81d8605dc8
fix: prevent map initialization race condition
- Add marker queuing system for markers that arrive before map is ready
- Check map._container and getZoom to ensure internal structures exist
- Process pending markers after map.whenReady() callback
- Fix typo: bindTooltip -> bindTooltip
2025-10-12 12:44:16 -05:00
06a881d63f
fix: pass required map data attributes to map component
The map component requires data-center and data-zoom attributes
for proper initialization.
2025-10-12 12:36:36 -05:00
ff636f6e5e
fix: use correct APRSMap hook name in map component 2025-10-12 12:17:11 -05:00
5491bafc31
fix: remove invalid empty state from stream container
The phx-update="stream" directive requires all direct children to have IDs.
Removed the conditional empty state message that was causing client-side errors.
2025-10-12 12:16:27 -05:00
1a92b89ca8
fix: correct toggle_button class attribute syntax
Fixed incorrect class attribute syntax in toggle_button that was using tuple notation (hidden: @slideover_open) instead of proper conditional.
2025-10-12 12:09:43 -05:00
533061c261
fix: correct remaining class attribute syntax errors
Fixed another incorrect class attribute syntax in connection_indicator component that was causing Protocol.UndefinedError.
2025-10-12 12:04:39 -05:00
1905c6b41a
fix: correct class attribute syntax in components
Fixed incorrect class attribute syntax that was using tuple notation instead of proper conditional class lists. This was causing Protocol.UndefinedError for String.Chars.
2025-10-12 11:58:16 -05:00
5b874185e9
fix: change streams.packets to packets in template
The template was trying to access @streams.packets but LiveView streams were not implemented. Changed to use @packets which is the correct assign.
2025-10-12 11:51:35 -05:00
72eab2aa91
fix: add missing assigns for LiveView components
The recent refactor removed loading and connection_status assigns which were required by the slideover_panel component, causing the app to crash on startup. This adds back the missing assigns with default values.
2025-10-12 11:47:05 -05:00
070b8870df
refactor 2025-10-12 10:56:49 -05:00
265c58b9ff
Fix aprs-is variables 2025-10-12 10:32:12 -05:00
5dfd682142
fix: exclude APRS-IS paths from RF path visualization
Previously, packets sent via APRS-IS (Internet) would incorrectly show
RF path lines to the uploader's callsign. This fix filters out paths
containing TCPIP, NOGATE, or qA* indicators, which indicate Internet-only
transmission rather than actual RF digipeating.

For example, AE5PL-S packets posted by AE5PL via Internet will no longer
show a misleading RF path line between them.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 16:57:21 -05:00
0528a99f36
fix: remove problematic errorTileUrl to resolve tile loading errors
The errorTileUrl was set to a base64 data URL of a transparent 1x1 PNG,
which caused browsers to fail when trying to use it as a tile replacement.
Removing this option allows Leaflet to handle tile errors with its
default behavior, which is more robust and prevents console errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 16:52:41 -05:00
6761518144
bump phoenix_live_view 2025-10-07 15:37:23 -05:00
93e19ff517
Remove all external dependencies and Sentry integration
- Remove external Leaflet CDN links from info page (now uses vendor bundles)
- Remove all Sentry error tracking integration:
  - Remove sentry dependency from mix.exs
  - Remove Sentry plugs from endpoint.ex
  - Remove Sentry logger handler from application.ex
  - Remove Sentry configs from dev.exs and prod.exs
  - Remove Sentry domains from runtime.exs check_origin
  - Remove Sentry JavaScript initialization
  - Delete sentry_filter.ex module
  - Remove Sentry loader script from root layout

The application now loads all assets locally with no external runtime dependencies.
2025-10-03 12:53:47 -05:00
5ca07bcbe0
Fix info page to show last known position when latest packet has no location data
For stations that send both position and status packets, the info page would show empty location data if the most recent packet was a status packet. This fix ensures the page displays the last known position from the most recent position packet while still showing the latest activity timestamp.
2025-10-03 12:37:45 -05:00
9db39e91f7
update geo 2025-10-03 12:29:40 -05:00
5e5c933b8a
update deps 2025-10-03 12:27:51 -05:00
b93da46e4e
Fix K3s API TLS verification for Tailscale connection
Add insecure-skip-tls-verify flag to kubectl config to bypass certificate
validation when connecting via Tailscale IP. The K3s certificates don't
include the Tailscale IP in their SANs, causing TLS verification to fail.
2025-09-08 09:36:15 -05:00
577d05b4ee
Fix posresolution type error by converting integers to floats
Add posresolution and rain_midnight to the list of float fields in
normalize_numeric_types to ensure integer values are converted to floats
before database insertion. This fixes the Ecto.ChangeError that was
preventing many APRS packets from being stored in the database.
2025-09-08 09:20:40 -05:00
130f9a39d2
updates 2025-09-06 11:12:06 -05:00
bc9341387e
parser update 2025-08-13 09:40:22 -05:00
c2fcf534dd
update and format 2025-08-13 09:39:39 -05:00
a95fca7dd1
update claude readme 2025-08-11 13:03:11 -05:00
42b8c144f4
update deps and wx charts 2025-08-09 17:22:25 -04:00
282948db98
fix: resolve Chart.js date adapter error for weather charts
- Combine Chart.js and date adapter into single bundle to ensure proper loading order
- Add validation to skip chart rendering when insufficient weather data (< 2 points)
- Update vendor loader to not load date adapter separately
- Prevents date adapter errors when weather stations have limited data
2025-08-09 17:20:27 -04:00
706721b06f
fix: resolve VARCHAR(255) database errors by migrating to TEXT fields
- Create migration to change string fields from VARCHAR(255) to TEXT type
- Add PacketSanitizer module for UTF-8 safe string truncation
- Update PacketConsumer to sanitize data before database insertion
- Prevents database errors from overly long packet data fields
2025-08-09 16:54:38 -04:00
a636410171
add safe config file 2025-08-06 09:10:52 -05:00
ea4992d2a1
parser update 2025-08-06 08:31:55 -05:00
8bc5d35e2e
fix: move sendMapReadyEvents definition before whenReady callback
The function was being called before it was defined, causing a runtime error.
Moving the function definition before the whenReady callback ensures it's
available when the callback executes.
2025-08-05 13:59:24 -05:00
44bc802f9d
refactor: simplify map.ts code with helper functions
- Add isValidCoordinate() helper to reduce duplicate coordinate validation
- Add createDivIcon() helper to standardize marker icon creation
- Simplify map ready event handling with sendMapReadyEvents() helper
- Fix typo: bindTooltip -> bindTooltip
- Reduce code duplication throughout the file
2025-08-05 13:51:33 -05:00
537ddec4d6
fix: improve RF path line cleanup to prevent persistent lines
- Add clearRfPathLines() method for centralized cleanup logic
- Clear RF paths when clearing all markers
- Clear RF paths in destroyed() lifecycle hook
- Add error handling to prevent failures during cleanup
- Fix issue where path lines could persist after hover ends
2025-08-05 13:43:46 -05:00