diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 6f1ca85..881758e 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -28,6 +28,9 @@ jobs: sudo apt-get update sudo apt-get install -y protobuf-compiler + - name: Install Go protobuf tools + run: make tools + - name: Generate Protocol Buffers run: make gen-proto diff --git a/.gitignore b/.gitignore index 163cce0..01559cd 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,5 @@ temp/ # Binary output type -#meshstream \ No newline at end of file +#meshstream +**/.claude/settings.local.json diff --git a/Makefile b/Makefile index b823e0c..14e0ee4 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,7 @@ $(TOOLS_DIR): # Install the protoc-gen-go tool $(PROTOC_GEN_GO): $(TOOLS_DIR) GOBIN=$(abspath $(TOOLS_DIR)) go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + echo "Installed protoc-gen-go in $(TOOLS_DIR)" ls $(TOOLS_DIR) # Web application commands diff --git a/web/src/components/dashboard/GoogleMap.tsx b/web/src/components/dashboard/GoogleMap.tsx index 88ff8e1..dc3318a 100644 --- a/web/src/components/dashboard/GoogleMap.tsx +++ b/web/src/components/dashboard/GoogleMap.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useEffect, useState } from "react"; +import React, { useRef, useEffect, useState, useCallback } from "react"; import { calculateAccuracyFromPrecisionBits, calculateZoomFromAccuracy } from "../../lib/mapUtils"; import { GOOGLE_MAPS_ID } from "../../lib/config"; @@ -39,7 +39,7 @@ export const GoogleMap: React.FC = ({ // Track whether the map has been initialized const isInitializedRef = useRef(false); - const initializeMap = () => { + const initializeMap = useCallback(() => { if ( mapRef.current && window.google && @@ -94,7 +94,7 @@ export const GoogleMap: React.FC = ({ radius: accuracyMeters, }); } - }; + }, [lat, lng, effectiveZoom, accuracyMeters, precisionBits]); // Check for Google Maps API loading - make sure all required objects are available useEffect(() => { @@ -148,7 +148,7 @@ export const GoogleMap: React.FC = ({ if (isGoogleMapsLoaded && mapRef.current) { initializeMap(); } - }, [isGoogleMapsLoaded, lat, lng, effectiveZoom, accuracyMeters, precisionBits]); + }, [isGoogleMapsLoaded, initializeMap]); // Prepare the container classes based on fullHeight flag const containerClassName = `w-full ${fullHeight ? 'h-full flex-1' : 'min-h-[300px]'} rounded-lg overflow-hidden effect-inset`;