Skip to content

Feature/adsb live feed and mobile fixes#91

Open
razorsec wants to merge 3 commits intocalesthio:masterfrom
razorsec:feature/adsb-live-feed-and-mobile-fixes
Open

Feature/adsb live feed and mobile fixes#91
razorsec wants to merge 3 commits intocalesthio:masterfrom
razorsec:feature/adsb-live-feed-and-mobile-fixes

Conversation

@razorsec
Copy link
Copy Markdown

Summary

Describe what changed.

Why

Explain the problem being solved.

Scope

  • Focused bug fix
  • Small UX improvement
  • New source
  • Dashboard change
  • Docs/config change

Validation

List the commands, checks, or manual validation you performed.

Screenshots

If the dashboard or any visible output changed, add screenshots.

Config and Docs

  • No new environment variables
  • .env.example updated if needed
  • README.md updated if behavior changed

Source Additions

If this PR adds a new source, explain:

  • why the source improves signal quality
  • whether it requires an API key
  • how it degrades when the key is missing
  • what changed in apis/briefing.mjs and dashboard/inject.mjs

Checklist

  • This PR stays within one bugfix or one feature family
  • I kept unrelated changes out of the diff
  • I considered security for any mixed-source content rendering
  • I tested the changed path locally

Richard Fitts added 3 commits April 11, 2026 03:14
Split the monolithic jarvis.html (1782 lines) into three focused files:
- dashboard/public/app.css — all styles
- dashboard/public/app.js  — all application logic
- dashboard/public/jarvis.html — lean HTML shell (~75 lines)

Benefits: faster iteration on styles/logic, easier diffs, browser
caches CSS/JS independently of the data-injected HTML shell.
- Guard against missing loading.html with existsSync before sendFile
- Catch sendFile errors and return 503 text if headers not yet sent
- Prevents unhandled crashes on first-run or clean installs where
  loading.html may not be present

Also fixes in app.js and app.css (already staged in prior commit):
- Remove D3 zoom .tapLength() call — method does not exist, crashed
  the flat map on every mobile load
- Remove touch-action:none on SVG which blocked mobile page scroll
- Add touch-action:manipulation to buttons/links — removes 300ms iOS
  tap delay
- Guard ACLED data with availability flag — show UNAVAILABLE state
  instead of silent zeros when API is down
- Handle sweep delta no-baseline and degraded states explicitly
- Fix direction:'baseline' missing from dirEmoji/dirClass maps
- Sanitize space signal text with cleanUiText() — strips «» chars
  that were rendering as raw garbage in the UI
Adds a live aircraft toggle to the map powered by the ADS-B Exchange
public API, proxied server-side to avoid CORS restrictions.

Features:
- Toggle button on map (bottom-right controls) — activates/deactivates
- Server-side /api/adsb proxy endpoint with 30s cache (adsb.lol)
- Renders on both 3D globe and flat map modes
- Military detection via ICAO hex prefix table + callsign patterns
  (dbFlags & 1 from adsb.lol also used where available)
- Altitude-corrected globe points (adsb.lol reports feet, not meters)
- Civil aircraft capped at 4000 to prevent map saturation; all
  military always shown regardless of total count
- Flat map: 1.8px civilian dots, 3.5px military dots, 800 civil cap
- ADS-B panel card in left rail shows live counts (airborne / mil / civ)
  and replaces the formerly empty Conflict Events row
- Auto-refreshes every 30 seconds while active
- Hides flight corridor arcs while ADS-B is active to reduce clutter
- Restores flight corridors on deactivation

API: GET /api/adsb → proxies https://api.adsb.lol/v2/lat/0/lon/0/dist/99999
No API key required. Global coverage. 30s server-side cache.
@razorsec razorsec requested a review from calesthio as a code owner April 11, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant