@@ -36,6 +36,7 @@ import { createLazyFileRoute, useSearch } from "@tanstack/react-router";
3636import { useCallback , useEffect , useMemo , useState } from "react" ;
3737
3838import { BORDER_STYLE_GRAY_3 , ICON_SIZE , SEARCH , TIME_MS } from '@/config/style-constants' ;
39+ import { useActivity } from '@/contexts/ActivityContext' ;
3940import { useUserInteractions } from "@/hooks/use-user-interactions" ;
4041import { useGraphList } from "@/hooks/useGraphList" ;
4142
@@ -200,6 +201,7 @@ const getEntityTypeColor = (entityType: AutocompleteResult["entity_type"]) => {
200201const SearchPage = ( ) => {
201202 const searchParams = useSearch ( { from : "/search" } ) ;
202203 const queryClient = useQueryClient ( ) ;
204+ const { addActivity } = useActivity ( ) ;
203205
204206 // View mode state
205207 const [ viewMode , setViewMode ] = useState < ViewMode > ( "table" ) ;
@@ -433,8 +435,16 @@ const SearchPage = () => {
433435 }
434436 if ( searchResults && searchStartTime > 0 ) {
435437 setSearchDuration ( Date . now ( ) - searchStartTime ) ;
438+
439+ // T006: Add search activity to feed
440+ addActivity ( {
441+ category : 'search' ,
442+ description : `Searched for "${ searchFilters . query } "` ,
443+ query : searchFilters . query ,
444+ resultCount : searchResults . length ,
445+ } ) ;
436446 }
437- } , [ searchResults , retryCount , searchStartTime ] ) ;
447+ } , [ searchResults , retryCount , searchStartTime , searchFilters . query , addActivity ] ) ;
438448
439449 const hasResults = searchResults && searchResults . length > 0 ;
440450 const hasQuery = Boolean ( searchFilters . query . trim ( ) ) ;
0 commit comments