Tracking a station at zoom 8 or below draws a blank map when its last packet is outside the trail window #62

Open
opened 2026-11-03 18:52:32 +00:00 by skippy-bot · 0 comments

Problem

At zoom 8 and below the map clears every marker and then draws either the heat map or, while a callsign is tracked, that station's trail. The trail filter drops packets older than the trail window, and when nothing survives the function returns without pushing any event. The result is an empty map with the sidebar still reading Tracking: W5ABC, so the station appears to vanish at exactly the zoom where the display mode changes. Zooming to 9 brings it back.

Evidence

At 2f150f66:

  • lib/aprsme_web/live/map_live/display_manager.ex:27 pushes clear_all_markers before choosing the low zoom display.
  • lib/aprsme_web/live/map_live/display_manager.ex:85 sends the heat map only when nothing is tracked, otherwise send_trail_line_for_tracked_callsign/1.
  • lib/aprsme_web/live/map_live/display_manager.ex:232 returns the socket untouched when the trail has no packets, so no event follows the clear.
  • lib/aprsme_web/live/map_live/display_manager.ex:306 drops every packet older than packet_age_threshold, which defaults to one hour at lib/aprsme_web/live/map_live/index.ex:42.
  • docs/tracked-callsign-behavior.md:65 promises the last received packet is always shown for a tracked callsign.

Expected

The tracked station stays visible at every zoom, either as a durable marker or by falling back to the heat map, so a blank map never has a tracked callsign in the sidebar.

How to verify

Build a DisplayManager socket at zoom 8 with a tracked callsign and one visible packet older than the threshold, call handle_zoom_threshold_crossing/2, and assert an event carrying the station is pushed. Today only clear_all_markers is pushed.

Acceptance criteria

  • A tracked callsign is visible at zoom 8 and below regardless of the trail window.
  • The documented last-packet guarantee holds at every zoom.
  • A test covers the empty-trail case.

Effort: S
Lens: product

## Problem At zoom 8 and below the map clears every marker and then draws either the heat map or, while a callsign is tracked, that station's trail. The trail filter drops packets older than the trail window, and when nothing survives the function returns without pushing any event. The result is an empty map with the sidebar still reading `Tracking: W5ABC`, so the station appears to vanish at exactly the zoom where the display mode changes. Zooming to 9 brings it back. ## Evidence At `2f150f66`: - `lib/aprsme_web/live/map_live/display_manager.ex:27` pushes `clear_all_markers` before choosing the low zoom display. - `lib/aprsme_web/live/map_live/display_manager.ex:85` sends the heat map only when nothing is tracked, otherwise `send_trail_line_for_tracked_callsign/1`. - `lib/aprsme_web/live/map_live/display_manager.ex:232` returns the socket untouched when the trail has no packets, so no event follows the clear. - `lib/aprsme_web/live/map_live/display_manager.ex:306` drops every packet older than `packet_age_threshold`, which defaults to one hour at `lib/aprsme_web/live/map_live/index.ex:42`. - `docs/tracked-callsign-behavior.md:65` promises the last received packet is always shown for a tracked callsign. ## Expected The tracked station stays visible at every zoom, either as a durable marker or by falling back to the heat map, so a blank map never has a tracked callsign in the sidebar. ## How to verify Build a DisplayManager socket at zoom 8 with a tracked callsign and one visible packet older than the threshold, call `handle_zoom_threshold_crossing/2`, and assert an event carrying the station is pushed. Today only `clear_all_markers` is pushed. ## Acceptance criteria - [ ] A tracked callsign is visible at zoom 8 and below regardless of the trail window. - [ ] The documented last-packet guarantee holds at every zoom. - [ ] A test covers the empty-trail case. **Effort:** S **Lens:** product
Sign in to join this conversation.
No description provided.