Commit Graph

1640 Commits

Author SHA1 Message Date
James Smith 9d41ffbb59 fix: apply UI tier to standalone dashboard pages (ADS-B, AIS, Satellite)
Each dashboard is a separate HTML page that doesn't inherit the main SPA's
localStorage restore. Add a synchronous tier-restore script before CSS loads
so html[data-ui-tier] selectors fire on first paint.

Also add enhanced/lean tier override blocks to each dashboard CSS to remap
the dashboard-local variables (--bg-dark, --bg-panel, --radar-cyan, etc.)
that variables.css doesn't cover, and add lean-mode scanline/bg hide rules
since components.css is not loaded on these pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 08:44:29 +01:00
James Smith 517eb8cb77 revert: restore brand logo to fixed blue (#00d4ff) — brand identity not UI chrome
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 08:41:11 +01:00
James Smith 9d72c88a28 fix: sweep final hardcoded cyan from mode JS files and CSS
- proximity-radar.js: fix missed dot stroke in new-device creation path
- gps.js: GPS constellation color via object getter; globe atmosphere reads CSS var
- websdr.js: globe atmosphere, map markers, popup buttons, point label use CSS var
- subghz.js: canvas strokeStyle reads --accent-cyan
- sstv.js: ISS track polyline reads --accent-cyan
- app.js: info message border-left uses var(--accent-cyan)
- subghz.css, gps.css: replace all #00d4ff with var(--accent-cyan)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 23:08:49 +01:00
James Smith e1922d7a30 fix: signal-guess why-button hover uses --accent-cyan CSS variable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 23:05:57 +01:00
James Smith c48d66d1b4 fix: replace remaining hardcoded cyan in map utilities and mode JS files
- map-utils.js: range rings and reticle crosshair SVG use --accent-cyan
- drone.js: trail polyline color reads --accent-cyan for non-threat contacts
- weather-satellite.js: NOAA APT pass track reads --accent-cyan
- space-weather.js: solar wind chart border/bg/axis ticks read --accent-cyan

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 23:05:38 +01:00
James Smith fbea33e7cb fix: replace hardcoded cyan with CSS variable across brand SVGs and components
- Brand logo SVGs (.logo, .welcome-logo, .brand-i) now follow --accent-cyan
  via CSS rules that override SVG presentation attributes
- proximity-radar.js: sweep, center dot, gradient stops, and selection rings
  all use var(--accent-cyan) in style attrs or read getComputedStyle at runtime
- system.js updateGlobePosition: observer point color reads CSS variable
- .bt-detail-address MAC address text uses var(--accent-cyan)
- Enhanced tier gets --visual-edge-cyan/--visual-glow-cyan amber overrides

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 23:04:47 +01:00
James Smith af26a01703 fix: read --accent-cyan CSS var for globe atmosphere and point color
Globe.gl WebGL cannot be styled via CSS; read the computed accent color
at init time so Enhanced tier's amber (#c89628) is applied correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 23:00:50 +01:00
James Smith 336d0d81ec fix: use var(--accent-cyan) in wifi proximity radar SVG so enhanced tier colors it amber 2026-05-19 22:57:24 +01:00
James Smith 076d17da18 fix: use html[data-ui-tier] selector to beat index.css :root specificity; add body tier rules to index.css 2026-05-19 22:49:40 +01:00
James Smith 5b4b99707a fix: hide decorative elements (scanline, globe, radar-bg) in lean tier 2026-05-19 22:42:34 +01:00
James Smith db7b056cf4 Merge branch 'worktree-ui-tiers' 2026-05-19 22:36:52 +01:00
James Smith eb0512b3c0 chore: remove orphaned icon-effects CSS (replaced by tier toggle) 2026-05-19 22:30:25 +01:00
James Smith cafc2554de feat: retire data-animations from index.html, login.html, and base_dashboard.html 2026-05-19 22:25:38 +01:00
James Smith 2b25d5cbad feat: add Display Mode step to first-run setup modal 2026-05-19 22:23:58 +01:00
James Smith 0a75322ad1 feat: replace animations toggle with display mode selector in settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:22:05 +01:00
James Smith 95776f5519 feat: add tier toggle button to nav; migrate data-animations restore to data-ui-tier 2026-05-19 22:20:31 +01:00
James Smith 678aefd76e feat: add lean/enhanced component overrides; retire data-animations component CSS 2026-05-19 22:18:48 +01:00
James Smith 41a720f1f6 feat: add lean/enhanced layout overrides; retire data-animations CSS
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:16:50 +01:00
James Smith 0b5d858187 feat: add lean/enhanced body background overrides 2026-05-19 22:14:25 +01:00
James Smith e65a25e526 feat: add lean and enhanced CSS variable override blocks 2026-05-19 21:55:01 +01:00
James Smith dbe2003d75 fix: guard _looked_up_icaos popitem against concurrent clear(); add eviction tests
contextlib.suppress(KeyError) around popitem prevents a crash in the SBS
parser thread if stop_adsb() calls clear() concurrently between the len()
check and the popitem call.

Two unit tests verify FIFO eviction semantics and duplicate-key no-op.
2026-05-19 17:47:21 +01:00
James Smith a5f92ded37 perf: cap _looked_up_icaos at 50 000 entries with LRU eviction 2026-05-19 15:02:46 +01:00
James Smith f7cf0a87cc style: use consistent early-return guard in WiFi _matches filter 2026-05-19 14:56:21 +01:00
James Smith 902a21fc40 perf: combine WiFi network filters into single list pass
Replace four sequential list comprehensions (band → security → hidden → min_rssi)
with a single pass using a helper function. Reduces algorithmic complexity from O(4n)
to O(n) when multiple filters are applied. All WiFi tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 14:54:42 +01:00
James Smith eeaf87c7f2 perf: move ADS-B SSE snapshot priming into generator 2026-05-19 14:51:06 +01:00
James Smith e6e6cb3b9a fix: always update fingerprint stability; assert tracker fields preserved on skip
- Move fingerprint stability update before early return so it updates even when payload hash matches
- Remove duplicate stability assignment from detect_tracker result block
- Add assertion in test to verify tracker fields are preserved when detection is skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 14:49:51 +01:00
James Smith 260240728a perf: skip tracker signature scan when BLE payload fingerprint is unchanged 2026-05-19 13:14:16 +01:00
James Smith 0e0e17b089 style: document cleanup now-capture and widen test sleep margin 2026-05-19 13:10:44 +01:00
James Smith efc14b4de0 test: use threading to correctly exercise cleanup re-validation guard 2026-05-19 13:08:32 +01:00
James Smith 6ed24b758d test: fix cleanup re-validation test to exercise actual cleanup()
Replace manual reimplementation of snapshot/delete logic with actual
store.cleanup() call. Uses mocked time.time to simulate the scenario
where entries refreshed between snapshot and deletion survive due to
re-validation guard.

Fixes: test was passing without actually calling the subject under test
2026-05-19 12:36:14 +01:00
James Smith 646eb09e1d perf: minimize DataStore cleanup lock hold time
Modify DataStore.cleanup() to minimize lock hold duration:
- Snapshot timestamps under lock (brief O(1) list copy)
- Compute expired keys outside lock (no contention during O(n) scan)
- Re-acquire lock only for deletion with re-validation
  (ensures entries refreshed between snapshot and deletion are not deleted)

This reduces blocking of reader threads and prevents latency spikes
during periodic cleanup of large stores (10K+ entries).

Also adds tests:
- test_cleanup_removes_expired_keeps_fresh: basic cleanup behavior
- test_cleanup_does_not_delete_refreshed_entry: re-validation guard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 12:27:25 +01:00
James Smith 1dd3e485a6 chore: remove project-local CLAUDE.md 2026-05-19 11:53:44 +01:00
James Smith 77cdd56641 debug(meshcore): enable BLE debug mode and disconnect before connect
- Enable debug=True on MeshCore.create_ble() to surface verbose logs
- Disconnect any existing BlueZ connection before bleak connects to
  avoid conflicts from prior bluetoothctl/pairing sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 21:15:24 +01:00
Smittix b26d94c967 Merge pull request #229 from smittix/fix/meshcore-connect-error-reporting
fix(meshcore): surface backend error messages and extend polling window
2026-05-13 21:00:55 +01:00
James Smith 98e01f4c5b fix(meshcore): surface backend error messages and extend polling window
- Store last status message on MeshcoreClient so error details survive
  beyond the SSE event (which isn't active during connecting state)
- Status endpoint now returns message field so the frontend can show
  the real reason (e.g. 'Connection failed after retries: ...')
- Extend JS polling from 30s to 90s to outlast the backend's 65s
  retry sequence (5+15+45s delays) before declaring timeout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:59:33 +01:00
Smittix 32f245e6ef Merge pull request #228 from smittix/fix/meshcore-ble-scan-gevent
fix(meshcore): run BLE scan in dedicated thread to avoid gevent conflict
2026-05-13 20:53:02 +01:00
James Smith bf50cb4acd fix(meshcore): run BLE scan in dedicated thread to avoid gevent conflict
asyncio.run() called from a gevent-patched Flask thread fails under
gunicorn+gevent. Run the one-shot scan in a ThreadPoolExecutor thread
with its own event loop, matching how AsyncWorker handles it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:52:44 +01:00
Smittix e778efa5b6 Merge pull request #227 from smittix/fix/meshcore-ble-scan-500
fix(meshcore): fix BLE scan 500 and allow scan before connect
2026-05-13 20:50:06 +01:00
James Smith 7d537998ca fix(meshcore): revert wrong scan_ble_sync route call, fix scan without worker
- Revert route to scan_ble() — scan_ble_sync() lives on AsyncWorker,
  not MeshcoreClient; the 500 was caused by our previous fix
- MeshcoreClient.scan_ble() now runs a one-shot asyncio scan when no
  worker is active, so Scan works before Connect is pressed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:49:44 +01:00
Smittix daaf3d2158 Merge pull request #226 from smittix/fix/meshcore-ble-scan-method
fix(meshcore): call scan_ble_sync() in BLE scan route
2026-05-13 20:47:38 +01:00
James Smith 2dfdcd39f1 fix(meshcore): call scan_ble_sync() not scan_ble() in ble/scan route
Route was calling a non-existent method, causing a 500 on every scan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:47:07 +01:00
Smittix 5e568f59ba Merge pull request #225 from smittix/fix/meshcore-ble-scan
fix(meshcore): BLE scan feedback and cancel while connecting
2026-05-13 20:43:02 +01:00
James Smith ae5664dbb4 fix(meshcore): BLE scan feedback and cancel-during-connecting
- Scan button shows 'Scanning...' and disables during fetch; shows
  'No devices found' or 'Scan failed' on empty/error result; auto-
  selects device if only one is returned
- Disconnect button now enabled during 'connecting' state so users
  can cancel a stuck connection and retry with a different device

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:42:25 +01:00
Smittix e64d82ebb5 Merge pull request #224 from smittix/fix/meshcore-connect-timeout
fix(meshcore): show error when connection times out
2026-05-13 20:39:30 +01:00
James Smith c5fdf7f7e9 fix(meshcore): show error state when connection times out
After 30s of polling with no response, update UI to 'Connection timed
out' instead of silently leaving the dot stuck on Connecting...

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:39:16 +01:00
Smittix a59d4ec603 Merge pull request #223 from smittix/fix/meshcore-ux-feedback
fix(meshcore): layout height, connection polling, and modal visibility
2026-05-13 17:33:05 +01:00
James Smith 2cdf156cd0 fix(meshcore): fix layout height, connection polling, and modal visibility
- Add base flex properties to #meshcoreVisuals so it fills full panel
  height when meshtastic.css hasn't been lazily loaded yet
- Poll /meshcore/status every 2s after Connect click so the UI
  transitions out of "Connecting..." when the backend is ready
- Fix Add Contact and Traceroute modals to use .show class pattern
  (signal-details-modal uses opacity/visibility transitions, not display)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 16:59:59 +01:00
Smittix 7c535d7ba8 Merge pull request #221 from smittix/fix/meshcore-fill-height
fix(meshcore): fill panel height by removing intermediate wrapper div
2026-05-13 13:02:02 +01:00
James Smith f7d8af493a fix(meshcore): make strip and body direct children of visuals container
Remove the intermediate #meshcoreMode wrapper div that was breaking the
flex height chain. Strip and body are now direct children of
#meshcoreVisuals (matching the Meshtastic pattern), so flex: 1 propagates
correctly and the content fills the full panel height.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:16:02 +01:00
Smittix 46f076077b Merge pull request #220 from smittix/fix/meshcore-sidebar-hidden-css
fix(meshcore): add mesh-sidebar-hidden rules to meshcore.css
2026-05-13 12:06:36 +01:00