feat(FN-1529): implement search query propagation to remote node data
- Add search query propagation so remote nodes receive and use query filters - Update api-node.ts to accept and forward search query parameters - Add useRemoteNodeData query key dependency for proper re-fetching on filter changes - Add api-node.test.ts with tests for search query propagation - Add comprehensive tests for App component including remote data filtering - Document search query propagation pitfall in .fusion/memory.md
This commit is contained in:
@@ -16,6 +16,8 @@ import {
|
||||
export interface UseRemoteNodeDataOptions {
|
||||
/** Project ID to fetch tasks for */
|
||||
projectId?: string;
|
||||
/** Search query to filter tasks */
|
||||
searchQuery?: string;
|
||||
}
|
||||
|
||||
export interface UseRemoteNodeDataResult {
|
||||
@@ -42,7 +44,7 @@ export function useRemoteNodeData(
|
||||
nodeId: string | null,
|
||||
options?: UseRemoteNodeDataOptions,
|
||||
): UseRemoteNodeDataResult {
|
||||
const { projectId } = options ?? {};
|
||||
const { projectId, searchQuery } = options ?? {};
|
||||
|
||||
const [projects, setProjects] = useState<ProjectInfo[]>([]);
|
||||
const [tasks, setTasks] = useState<Task[]>([]);
|
||||
@@ -81,7 +83,7 @@ export function useRemoteNodeData(
|
||||
|
||||
// Add tasks and project health fetches if projectId is provided
|
||||
if (projectId) {
|
||||
promises.push(fetchRemoteNodeTasks(nodeId, projectId));
|
||||
promises.push(fetchRemoteNodeTasks(nodeId, projectId, searchQuery));
|
||||
promises.push(fetchRemoteNodeProjectHealth(nodeId, projectId));
|
||||
}
|
||||
|
||||
@@ -130,7 +132,7 @@ export function useRemoteNodeData(
|
||||
setLoading(false);
|
||||
}
|
||||
}
|
||||
}, [nodeId, projectId]);
|
||||
}, [nodeId, projectId, searchQuery]);
|
||||
|
||||
// Fetch on mount and when nodeId changes
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user