feat: wire cluster endpoint to search-service with filters - #67
Merged
Conversation
Switch cluster fetching from location-service to search-service, passing amendment and participant filters so map clusters reflect the same filters as the video list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap API call in try/catch and throw SearchError with status code context, consistent with the existing searchVideos pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover both Axios error (wraps in SearchError with statusCode) and non-Axios error (wraps with generic message) catch branches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Coverage after merging feature/60-filtered-cluster-endpoint into master will be
Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
location-servicetosearch-serviceso clusters reflect video filterssearchClusters()function callingGET /search/clusterwith amendment/participant filtersuseLocationClustershook to acceptfiltersparameter and include filters in query keyfiltersfromMapContainertouseLocationClustersgetClusters()function and related types fromlocations.tsSemantic change
Cluster counts now represent video count instead of location count (e.g., "23 videos here" vs "23 locations here").
Files Changed
src/lib/api/search.tssearchClusters()function with filter supportsrc/lib/api/locations.tsgetClusters()and cluster types (dead code)src/hooks/useLocationClusters.tsfilters, callsearchClusters, include filters in query keysrc/components/map/MapContainer.tsxfilterstouseLocationClusterssrc/types/map.tsamendments?andparticipants?toClusterParamssrc/__tests__/lib/api/search.test.tssearchClusterstestssrc/__tests__/lib/api/locations.test.tssrc/__tests__/hooks/useLocationClusters.test.tsxTest plan
npm run buildsucceeds (type check)Closes #60
🤖 Generated with Claude Code