Commit graph

1078 commits

Author SHA1 Message Date
CI
03e2cf3403 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771628981-4481888 [skip ci] 2026-02-20 23:11:16 +00:00
4481888976
Fix settings page showing validation errors on initial load
The email and callsign changesets add "did not change" errors when
created with empty attrs (on mount). Guard all field error displays
on changeset.action being set so errors only appear after user
interaction.
2026-02-20 17:09:18 -06:00
CI
e2966e0a21 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771618361-f803c46 [skip ci] 2026-02-20 20:14:14 +00:00
f803c46b92
Fix KeyError on :data when rendering raw broadcast packets in callsign view
Raw APRS broadcast payloads don't have a :data key (only %Packet{}
structs do). Use Map.get/3 instead of dot-access to handle both cases.
2026-02-20 14:12:21 -06:00
CI
4f5483de19 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771617231-e917a6b [skip ci] 2026-02-20 19:54:00 +00:00
e917a6b718
Add test coverage for conversion, geometry, PHG, and encoding modules
Cover to_float, to_decimal, normalize_data_type, weather_fields,
sanitize_packet_strings, to_float_safe, has_weather_data, create_point,
extract_coordinates, lat/lon helpers, PHG extraction, and altitude
extraction with 79 new tests across 4 test files.
2026-02-20 13:53:26 -06:00
CI
918af2069a chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771616615-bcb0080 [skip ci] 2026-02-20 19:45:12 +00:00
bcb00801ee
Remove noisy leader election log
The "Not elected as leader" info log was being emitted every 5 seconds
by non-leader nodes, filling up logs unnecessarily in clustered deployments.
2026-02-20 13:43:13 -06:00
CI
50a54ef0aa chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771616369-50544c8 [skip ci] 2026-02-20 19:41:09 +00:00
50544c8354
Remove dead PostGIS code, deduplicate utilities, and simplify module hierarchy
- Delete ~170 lines of commented-out PostGIS spatial query functions
- Consolidate coordinate validation into CoordinateUtils
- Replace private normalize_data_type with EncodingUtils delegation
- Inline to_float/to_decimal wrappers at call sites
- Fix has_weather_data? missing wind_gust field
- Remove BoundsManager passthrough delegation module
- Simplify MapLive.PacketUtils by removing pure-passthrough delegations
2026-02-20 13:39:07 -06:00
CI
bb494bce65 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771615067-673eb55 [skip ci] 2026-02-20 19:19:24 +00:00
673eb55e97
Add test coverage for comment cleaning edge cases
Cover weather data with spaces/dots for missing values, negative
temperatures, negative altitudes, combined PHG+altitude+RNG
stripping, nil comments, comments that become empty after cleaning,
and false-match protection for comments starting with P or h. Also
fix strip_weather_data to require at least one weather field after
the preamble to avoid false-matching course/speed in non-weather
comments.
2026-02-20 13:17:27 -06:00
CI
f6a56d2f65 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771614941-ddf26a9 [skip ci] 2026-02-20 19:17:19 +00:00
ddf26a99ce
Strip weather data, RNG, and negative altitudes from packet comments
Weather packets had raw data strings (e.g. 007/000g000t054...)
stored as the comment instead of the trailing human-readable text.
Now iteratively strips fixed-width APRS weather fields in any order,
handling both position-included (XXX/XXX) and positionless (cXXXsXXX)
formats. Also strips RNG data and fixes altitude regex to handle
negative values. Empty comments after cleaning return nil.
2026-02-20 13:15:19 -06:00
CI
2305635a30 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771614193-34599d4 [skip ci] 2026-02-20 19:04:51 +00:00
34599d404c
Add Renovate configuration for dependency updates 2026-02-20 13:02:48 -06:00
ca05b497b9
Consolidate 24 packet columns into JSONB data field
Drop 10 dead parser-compat columns (srccallsign, dstcallsign,
origpacket, body, header, alive, posambiguity, symboltable,
symbolcode, messaging) and move 14 display-only columns into a
single `data` JSONB column (PHG, telemetry, radiorange,
information_field, format, posresolution, position_ambiguity,
luminosity, rain_midnight).

Reduces row width from ~70 to ~48 columns. Table is ephemeral
so migration uses DROP/recreate. Also fixes snow_24h -> snow bug
in weather check query and adds null byte stripping for JSONB
string sanitization.
2026-02-20 13:02:47 -06:00
CI
0e53bc475d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771612042-13bc58e [skip ci] 2026-02-20 18:31:18 +00:00
13bc58e650
Convert JS hooks to TypeScript and update esbuild to 0.25.4
Convert app.js, info_map.js, error_boundary.js, and time_ago_hook.js
to TypeScript with proper typing for Phoenix hooks, Leaflet, DOM
interactions, and timer management. Update esbuild hex package to
~> 0.10 and binary to 0.25.4. Entry point changed to app.ts.
2026-02-20 12:27:00 -06:00
CI
b562c23589 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771608339-b08eba2 [skip ci] 2026-02-20 17:29:33 +00:00
b08eba2c6b
Partition packets table by day and simplify cleanup
Convert the packets table to a time-partitioned table with daily
partitions (PARTITION BY RANGE on received_at). This replaces the
expensive CTE-based batch DELETE cleanup with instant DROP TABLE
partition drops — no dead tuples, no WAL pressure, no VACUUM needed.

- Add PartitionManager GenServer to create/drop daily partitions
- Simplify PacketCleanupWorker to delegate to PartitionManager
- Replace gridsquare/geocalc deps with local Maidenhead module
- Remove gettext_pseudolocalize dependency
- Fix Decimal comparison in packet consumer test
2026-02-20 11:25:16 -06:00
CI
d5a1f3fe1e chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771604468-f1ead99 [skip ci] 2026-02-20 16:25:49 +00:00
f1ead99e24
Split Dockerfile build steps for better layer caching 2026-02-20 10:18:48 -06:00
84e883701d
Suppress debconf frontend warnings in Dockerfile 2026-02-20 10:17:12 -06:00
2e3fc1234b
Fix Dockerfile: use libncurses6 for Debian trixie 2026-02-20 10:15:38 -06:00
92351ef1d4
Bump Elixir 1.19.5/OTP 28.3/Debian trixie in Dockerfile and .tool-versions 2026-02-20 10:14:28 -06:00
CI
e11d8fb414 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771602978-d09e015 [skip ci] 2026-02-20 15:57:54 +00:00
d09e015857
Fix Credo issues and telemetry Decimal coercion
- Extract prepare_markers_for_push/2 to reduce nesting depth in
  handle_info
- Split detect_item_or_object into smaller predicate and application
  functions to reduce cyclomatic complexity
- Coerce Decimal/nil values to native numbers in telemetry metrics
  (PostgreSQL sum() returns numeric type mapped to Decimal by Postgrex)
- Align locate button horizontally with zoom controls
2026-02-20 09:55:56 -06:00
CI
8dbf8d3c20 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771602427-b8d2095 [skip ci] 2026-02-20 15:48:41 +00:00
b8d2095346
Fix UI issues: popup positioning, trail/cluster sync, CSS cleanup
- Remove CSS `bottom: 50px !important` on popups that pushed them too
  high above markers
- Hide trails when markers are clustered (zoom < 11) so trails don't
  point to invisible markers inside cluster bubbles
- Fix locate button overlap with zoom controls and keep it always
  light mode
- Remove duplicate slideover/toggle CSS from layout files (single
  source of truth in component)
- Remove dead CSS classes and standardize breakpoints to 1024px
- Add isDestroyed guards on async callbacks to prevent race conditions
- Escape callsigns in marker HTML to prevent XSS
- Replace Leaflet _container private API with getContainer()
- Clean up about page placeholder text
2026-02-20 09:46:45 -06:00
CI
e147a19043 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771600553-4558f69 [skip ci] 2026-02-20 15:17:30 +00:00
4558f694f4
Improve trail color distinctness and road contrast
Replace trail color palette with bold, high-saturation colors that avoid
yellows, oranges, and grays (common road colors on map tiles). Interleave
warm/cool tones so consecutive color assignments are maximally distinct.

Change color assignment to prefer globally unique colors first, falling
back to proximity-based deconfliction only when all 15 colors are in use.
2026-02-20 09:15:31 -06:00
CI
52d182e25e chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771600029-a800910 [skip ci] 2026-02-20 15:07:17 +00:00
a800910dfa
Remove completed items from TODO.md 2026-02-20 09:06:49 -06:00
CI
f6823a70e0 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771599888-84e6523 [skip ci] 2026-02-20 15:06:20 +00:00
84e65232e5
Batch RF path queries, batch marker removals, and JS callsign index
- Replace N+1 get_latest_packet_for_callsign calls in RF path loading
  with single get_latest_packets_for_callsigns batch query (DISTINCT ON)
- Change batch packet processing to collect marker removal IDs and push
  one remove_markers_batch event instead of individual remove_marker calls
- Add callsignIndex reverse map (callsign_group → Set<markerID>) for O(1)
  lookup in new_packet/new_packets handlers instead of scanning all markers
2026-02-20 09:04:22 -06:00
CI
4c8023f1f1 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771599420-6c8df98 [skip ci] 2026-02-20 14:57:10 +00:00
6c8df98fdd
Update TODO.md with JS reverse index optimization note 2026-02-20 08:55:28 -06:00
b4bbfda620
Move client-side logic to server-side LiveView
- Server tracks callsign replacements in prepare_packet_state, sends
  convert_to_historical list so JS skips full markerStates scan
- Historical packets get red dot HTML server-side in build_minimal_packet_data
  instead of JS createMarkerIcon generating it
- Add callsign_group field to all packet data output; server pre-sorts
  by group with chronological order so JS iterates directly
- Normalize heat map intensity in Clustering.cluster_packets (min/50, cap 1.0)
  instead of JS doing it per-point
- Remove buildPopupContent JS fallback and unused escapeHtml import;
  server already provides popup in all data paths
2026-02-20 08:54:34 -06:00
CI
9365fc4fad chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771597877-46e18a6 [skip ci] 2026-02-20 14:32:49 +00:00
46e18a62e4
Add TODO.md with remaining performance improvements 2026-02-20 08:30:54 -06:00
dcabb744df
Batch push_events, RF path queries, and ETS tuning for hot paths
- Batch real-time packet push_events: collect marker data across the
  packet batch and send a single "new_packets" WebSocket message instead
  of one per packet. JS handler processes all live→historical conversions
  before adding new markers to avoid intra-batch conflicts.
- Batch RF path station queries: replace N+1 get_latest_packet_for_callsign
  calls with a single DISTINCT ON query selecting only callsign + lat/lng.
- Add read_concurrency: true to streaming_packets_subscribers and :aprsme
  ETS tables (read-heavy, rarely written).
- Remove dead GC code in PacketConsumer (threshold > 1000 unreachable with
  max batch_size of 100).
2026-02-20 08:30:54 -06:00
CI
c377dfaf67 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771596583-781fdd8 [skip ci] 2026-02-20 14:13:33 +00:00
781fdd88a3
Remove dead modules, unused deps, and commented-out code
Delete 5 unused modules: Presence (untracked), LiveView ShutdownHandler
(unused mixin), RateLimiterWrapper (pointless delegation), Passcode
(only used by own test), MapLive.Utils (pure delegates).

Fix ShutdownHandler to not call deleted Presence. Inline ParamUtils
at call sites. Remove cachex dep and 27 stale entries from mix.lock.
Clean commented-out Exq/Redis config from application.ex.
2026-02-20 08:09:22 -06:00
CI
d58043488c chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771595402-6ff8838 [skip ci] 2026-02-20 13:50:11 +00:00
6ff88380e5
Remove TODO.md — all items assessed or completed 2026-02-20 07:48:55 -06:00
4153f66b86
Remove broken dual packet state system (PacketManager/PacketStore)
System A (PacketManager + PacketStore ETS) had a fatal ID mismatch:
extract_packet_ids returned Ecto UUIDs but PacketStore stored under
MD5 hashes — cleanup could never find stored packets. Unified all
packet tracking on visible_packets map in LiveView assigns.

Deletes packet_manager.ex and packet_store.ex, removes from
supervision tree and PacketDistributor.
2026-02-20 07:47:39 -06:00
CI
b1358a8fad chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1771594898-8755bba [skip ci] 2026-02-20 13:43:13 +00:00
8755bba9f0
Optimize historical packet loading by selecting only needed columns
Historical map loading previously fetched all 73 columns (SELECT *) from
the packets table (~2068 bytes/row). Added get_recent_packets_for_map/1
with select_map_fields/1 that fetches only the 22 columns needed for map
rendering (~200 bytes/row), yielding a ~3x query speedup.

Also removes unused all_packets tracking from PacketProcessor and
simplifies visible_packets cleanup in Index.
2026-02-20 07:41:14 -06:00
1832a8ef04
Restore TODO.md with remaining items at top, completed at bottom 2026-02-20 07:41:14 -06:00