feat: fixed connectors dialog navigation, Implement bulk document deletion and improve search space filtering

- Added bulk delete functionality for documents in DocumentsTableShell and DocumentsSidebar.
- Enhanced search space retrieval to exclude spaces marked for deletion in read_search_spaces.
- Updated connector dialog to synchronize URL parameters when opened externally.
- Improved layout behavior to handle search space deletion and redirection more effectively.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-03-11 15:09:10 -07:00
parent 7c3aedf811
commit d61e29e74b
7 changed files with 312 additions and 97 deletions

View file

@ -490,6 +490,12 @@ export function useDocuments(
apiToDisplayDoc,
]);
const removeItems = useCallback((ids: number[]) => {
const idSet = new Set(ids);
setDocuments((prev) => prev.filter((item) => !idSet.has(item.id)));
setTotal((prev) => Math.max(0, prev - ids.length));
}, []);
return {
documents,
typeCounts,
@ -498,6 +504,7 @@ export function useDocuments(
loadingMore,
hasMore,
loadMore,
removeItems,
error,
};
}