Repository navigation
feat(nav): Waze-grade live TomTom HUD + Palantir action/confidence - #116
Blackleets wants to merge 10 commits into
Conversation
|
Deployment failed for project aegis with the following error: Learn More: https://vercel.com/nfyns-projects-b0cc0f41?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 493348b666
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const destinationCoordinate = routeSnapshot | ||
| ? { lat: routeSnapshot.destination.lat, lng: routeSnapshot.destination.lng } | ||
| : null; |
There was a problem hiding this comment.
Stabilize the destination passed to the incident hook
destinationCoordinate is recreated on every render, while useLiveRouteIncidents includes destination in its effect dependencies and immediately updates its own state. During active navigation that update rerenders this component, changes the dependency identity, aborts the request, and starts another refresh, potentially creating an endless render/request loop before an incident response can complete. Pass a stable object, such as the existing destination object or a memoized coordinate.
AGENTS.md reference: AGENTS.md:L49-L52
Useful? React with 👍 / 👎.
| action: nearbyEarthquakeAlert.magnitude >= 5 | ||
| ? 'Reduce y evita zonas inestables si puedes' | ||
| : 'Mantén precaución en la zona', | ||
| confidence: 'high' as const, |
There was a problem hiding this comment.
Do not manufacture confidence for source alerts
When an earthquake is selected, this assigns high confidence without any confidence field in NearbyEarthquakeAlert; the context branch similarly hardcodes medium, and the TomTom presentation infers medium merely from locally classified critical severity. The HUD therefore presents an operator-facing confidence metric that was not supplied by the named source. Hide it when unavailable or derive it only from documented upstream confidence evidence.
AGENTS.md reference: AGENTS.md:L17-L18
Useful? React with 👍 / 👎.
| const liveIncidentDistanceMeters = liveRouteIncidents.incident?.distanceAheadMeters ?? null; | ||
| const proximityAlert = liveIncidentCockpit && liveIncidentDistanceMeters !== null | ||
| ? { |
There was a problem hiding this comment.
Expire stale traffic alerts before prioritizing them
After one successful incident response, repeated network/provider failures cause useLiveRouteIncidents to retain that incident with stale: true indefinitely, and this unconditional first branch continues placing it ahead of earthquake and context alerts without consulting or displaying checkedAt. A cleared traffic incident can consequently remain for the rest of a trip and suppress a newer critical alert; enforce a maximum age and expose the observation time before granting stale traffic top priority.
AGENTS.md reference: AGENTS.md:L50-L52
Useful? React with 👍 / 👎.
| ? { lat: routeSnapshot.destination.lat, lng: routeSnapshot.destination.lng } | ||
| : null; | ||
| const liveRouteIncidents = useLiveRouteIncidents({ | ||
| enabled: navigationActive, |
There was a problem hiding this comment.
Restrict driver incident guidance to driving routes
This enables TomTom road-incident monitoring for every active route, although RouteSnapshot.mode also supports walking and cycling and the existing RouteCockpitMobileSafe integration explicitly restricts the same hook to mode === 'driving'. Walking and cycling navigation can therefore show vehicle-specific actions such as changing lanes or holding the steering wheel; include the driving-mode check here as well.
Useful? React with 👍 / 👎.
Mobile nav polish toward Waze + Palantir. Wires unused useLiveRouteIncidents into RouteCockpitMobile, adds glanceable action + confidence on incident banners, prioritizes live on-route TomTom over context/quake while navigating. See docs/nav-waze-palantir-hud.md. Complements ontology Wave 1 (#115 / #114).