WIP: Enable dynamic AIS stream handling based on user location and map focus.

- Prevent AIS stream from starting immediately; start upon user interaction.
- Add `ais_stream_started` state for WebSocket management.
- Extend `useRealAISProvider` with `userLocationLoaded` and `mapFocused` to control stream.
- Update frontend components to handle geolocation and map focus.
- Exclude test files from compilation

Introduce WebSocket integration for AIS services

- Added WebSocket-based `useRealAISProvider` React hook for real-time AIS vessel data.
- Created various tests including unit, integration, and browser tests to validate WebSocket functionality.
- Added `ws` dependency to enable WebSocket communication.
- Implemented vessel data mapping and bounding box handling for dynamic updates.
This commit is contained in:
geoffsee
2025-07-20 22:27:39 -04:00
parent e029ef48fc
commit 7528b2117b
23 changed files with 5134 additions and 28 deletions

View File

@@ -8,7 +8,9 @@
"build": "tsc -b && vite build",
"lint": "eslint ",
"preview": "vite preview",
"background-server": "(cd ../ && cargo run &)"
"background-server": "(cd ../ && cargo run &)",
"test": "vitest",
"test:run": "vitest run"
},
"dependencies": {
"next-themes": "^0.4.6",
@@ -20,23 +22,27 @@
"@chakra-ui/react": "^3.21.1",
"@emotion/react": "^11.14.0",
"@eslint/js": "^9.29.0",
"@tauri-apps/plugin-geolocation": "^2.3.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/js-cookie": "^3.0.6",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react-swc": "^3.10.2",
"bevy_flurx_api": "^0.1.0",
"eslint": "^9.29.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"geojson": "^0.5.0",
"globals": "^16.2.0",
"js-cookie": "^3.0.5",
"jsdom": "^26.1.0",
"mapbox-gl": "^3.13.0",
"react-map-gl": "^8.0.4",
"typescript": "~5.8.3",
"typescript-eslint": "^8.34.1",
"vite": "^7.0.0",
"@tauri-apps/plugin-geolocation": "^2.3.0",
"vite-tsconfig-paths": "^5.1.4",
"bevy_flurx_api": "^0.1.0",
"geojson": "^0.5.0"
"vitest": "^3.2.4"
}
}