You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cleanup(path-inspector): remove unreachable showOnMap branch that calls undefined window.drawPacketRoute #143
Low-priority cleanup. public/path-inspector.jsshowOnMap() has an "already on #/map" branch that calls window.drawPacketRoute, but public/map.js only exposes window.drawPacketRouteMulti (around line 1368), not window.drawPacketRoute. If that branch ever ran, "Show on map" would silently do nothing.
Not user-visible today (verified by reading master d264716c):
The standalone Path Inspector lives at #/tools/path-inspector, so showOnMap() always takes the first branch: it stores window._pendingPathInspectorRoute and navigates to #/map, where map.js (around line 1732) draws it with its local drawPacketRoute. This works.
The Path Inspector pane embedded in the map page (map.js, around line 2464) calls the local drawPacketRoute directly. This also works.
The else branch in path-inspector.js (around lines 180–191) is therefore unreachable in normal navigation, and it hides a broken call.
Found by the issue-batch agent while working on #123; the user-visible impact it reported was checked and does not hold.
Proposed cleanup
Pick one and keep it small:
Remove the unreachable else branch (and its comment), leaving the pending-route + navigate path as the only behaviour; or
Expose window.drawPacketRoute = drawPacketRoute next to window.drawPacketRouteMulti in map.js, so the branch works if it ever becomes reachable.
Option 1 is preferred (less surface, no new global). If #123's PR already touches the Path Inspector wiring in map.js, this can be folded into it instead.
Acceptance criteria
No code path calls an undefined window.drawPacketRoute.
"Show on map" from #/tools/path-inspector and from the map's embedded pane still draws the route (existing tests or a small new one).
Activity
Merge pull request #345 from dborup/codex/path-inspector-cleanup-143
dborup commentedon Oct 7, 2026
Fixed by #345 (merged as
69890b8e732fbfdf02d107c45a88ffd84ffdc1d5).