From ea61a45baeb21f246468b1362ccf4445bae1efb2 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 18:43:23 +0000 Subject: [PATCH 1/3] Add multi-feed search functionality to Lazer price feed IDs - Support comma or space-separated search terms - Match any feed that includes at least one of the search terms - Update placeholder text to indicate multi-search capability Co-Authored-By: Jayant --- components/LazerPriceIdTable.tsx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/components/LazerPriceIdTable.tsx b/components/LazerPriceIdTable.tsx index 3c84214b..b54a9813 100644 --- a/components/LazerPriceIdTable.tsx +++ b/components/LazerPriceIdTable.tsx @@ -69,14 +69,24 @@ const LoadedLazerPriceIdTable = ({ }, []); const filteredFeeds = useMemo(() => { + const searchTerms = search + .split(/[,\s]+/) + .map((term) => term.trim().toLowerCase()) + .filter((term) => term.length > 0); + + if (searchTerms.length === 0) { + return priceFeeds; + } + return priceFeeds.filter((feed) => { - const searchLower = search.toLowerCase(); - return ( - feed.symbol.toLowerCase().includes(searchLower) || - feed.name.toLowerCase().includes(searchLower) || - feed.description.toLowerCase().includes(searchLower) || - feed.pyth_lazer_id.toString().includes(searchLower) - ); + return searchTerms.some((searchTerm) => { + return ( + feed.symbol.toLowerCase().includes(searchTerm) || + feed.name.toLowerCase().includes(searchTerm) || + feed.description.toLowerCase().includes(searchTerm) || + feed.pyth_lazer_id.toString().includes(searchTerm) + ); + }); }); }, [priceFeeds, search]); @@ -84,7 +94,7 @@ const LoadedLazerPriceIdTable = ({
Date: Tue, 14 Oct 2025 18:47:37 +0000 Subject: [PATCH 2/3] Apply prettier formatting Co-Authored-By: Jayant --- components/LazerPriceIdTable.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/LazerPriceIdTable.tsx b/components/LazerPriceIdTable.tsx index b54a9813..e82f1162 100644 --- a/components/LazerPriceIdTable.tsx +++ b/components/LazerPriceIdTable.tsx @@ -3,7 +3,7 @@ import { StyledTd } from "./Table"; import { Spinner } from "./Spinner"; const fetchLazerPriceIdMetadata = async () => { const response = await fetch( - "https://history.pyth-lazer.dourolabs.app/history/v1/symbols" + "https://history.pyth-lazer.dourolabs.app/history/v1/symbols", ); const data = await response.json(); return data; @@ -39,12 +39,12 @@ const LazerPriceIdState = { }; type LazerPriceIdState = ReturnType< - typeof LazerPriceIdState[keyof typeof LazerPriceIdState] + (typeof LazerPriceIdState)[keyof typeof LazerPriceIdState] >; const useLazerPriceIdState = () => { const [state, setState] = useState( - LazerPriceIdState.NotLoaded() + LazerPriceIdState.NotLoaded(), ); useEffect(() => { From ca3e7f63d2d56c1f04659eb6fef09af423e27a28 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 18:49:29 +0000 Subject: [PATCH 3/3] Match pre-commit prettier formatting expectations Co-Authored-By: Jayant --- components/LazerPriceIdTable.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/LazerPriceIdTable.tsx b/components/LazerPriceIdTable.tsx index e82f1162..b54a9813 100644 --- a/components/LazerPriceIdTable.tsx +++ b/components/LazerPriceIdTable.tsx @@ -3,7 +3,7 @@ import { StyledTd } from "./Table"; import { Spinner } from "./Spinner"; const fetchLazerPriceIdMetadata = async () => { const response = await fetch( - "https://history.pyth-lazer.dourolabs.app/history/v1/symbols", + "https://history.pyth-lazer.dourolabs.app/history/v1/symbols" ); const data = await response.json(); return data; @@ -39,12 +39,12 @@ const LazerPriceIdState = { }; type LazerPriceIdState = ReturnType< - (typeof LazerPriceIdState)[keyof typeof LazerPriceIdState] + typeof LazerPriceIdState[keyof typeof LazerPriceIdState] >; const useLazerPriceIdState = () => { const [state, setState] = useState( - LazerPriceIdState.NotLoaded(), + LazerPriceIdState.NotLoaded() ); useEffect(() => {