Commit graph

5 commits

Author SHA1 Message Date
d803d070ac
Add other SSIDs list to map sidebar, fix context/web boundary
- Add Packets.get_other_ssids/1 to query other SSIDs for a base callsign
- Show other SSIDs in MapLive sidebar with track and info link buttons
- Clicking an SSID tracks it on the map (zooms, shows marker, updates URL)
- Refactor InfoLive.Show to use shared Packets.get_other_ssids/1
- Remove web-layer dependency from Packets context (no more
  AprsmeWeb.TimeHelpers calls from data layer)
- Return raw received_at DateTime instead of pre-formatted timestamp maps
- Format timestamps in the view layer where they belong
2026-02-18 18:15:02 -06:00
318eb30046
Fix additional nesting depth issues across multiple files
Extracts nested logic into helper functions to comply with Credo
requirements (max nesting depth 2):

- data_builder.ex: Extract historical packet distance filtering
  (filter_historical_by_distance/3, packet_far_enough_from_most_recent?/3)
  Reduces depth 5 -> depth 3

- streaming_packets_pubsub.ex: Extract subscriber message sending
  (send_to_subscriber_if_alive/3)
  Reduces depth 4 -> depth 2

- aprs_symbol.ex: Extract symbol code calculation
  (get_symbol_code_ord/1)
  Reduces depth 3 -> depth 2

- mobile_channel.ex: Extract subscription bounds update
  (update_subscription_bounds/2)
  Reduces depth 3 -> depth 2

- core_components.ex: Extract SVG tag class insertion
  (add_class_to_svg_tag/2)
  Reduces depth 3 -> depth 2

- info_live/show.ex: Extract row mapping for database queries
  (map_digipeater_row/2, map_station_heard_row/2)
  Reduces depth 3 -> depth 2 (2 instances)

Also updates .sobelow-skips with new line numbers from code changes.

Fixes 7 Credo nesting depth issues (2 remaining)
2026-02-09 12:32:42 -06:00
d033e8af76
Eliminate complexity 72 monster in info_live/show.ex
Refactor decode_path_element from 217 lines with complexity 72 to clean helpers:
- Add @q_constructs module attribute with all 39 Q-construct descriptions
- Extract decode_wide_element/1 for WIDE digipeater patterns
- Extract decode_trace_element/1 for TRACE digipeater patterns
- Extract decode_relay_element/1 for RELAY digipeater patterns
- Extract decode_tcpip_element/1 for TCPIP gateway patterns
- Main function now has simple map lookup and pattern-based routing

Reduced from 217 lines to 66 lines while improving readability and maintainability.

Co-Authored-By: Graham <noreply@anthropic.com>
2026-02-09 12:20:45 -06:00
d8606bb609
Complete nested module alias fixes and update Sobelow skips
Software design fixes:
- Add proper aliases for all nested modules
- release.ex: Ecto.Adapters.SQL
- packet_consumer.ex: Aprsme.Cluster.PacketDistributor
- cleanup_scheduler.ex: Aprsme.Workers.PacketCleanupWorker
- health_check.ex: Ecto.Adapters.SQL
- status_live/index.ex: Aprsme.Cluster.LeaderElection
- packet_receiver.ex: Aprsme.Cluster.LeaderElection
- packet_distributor.ex: Aprsme.Cluster.LeaderElection, AprsmeWeb.MapLive.PacketStore

Security:
- Update .sobelow-skips for false positive SQL injection warning (div is builtin function)

All 13 software design suggestions now complete.
All 13 warnings previously fixed.
Remaining: 42 refactoring opportunities (complex/nested functions)
2026-02-09 11:26:47 -06:00
ff06c13224
Fix JavaScript/TypeScript bugs in plotting and validation
- Fix rain chart: remove incorrect /10 division on rain_24h values
- Fix RF path: change dashArray null to undefined for type safety
- Clarify trail proximity threshold: use kilometers directly instead of degrees
- Improve coordinate validation: add isFinite() checks to prevent infinity values
- Add Sobelow skip annotations for existing security warnings
2026-02-09 11:16:04 -06:00