Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

perf(tasks): avoid duplicate relation refetch after deletion

Tind69c9b4d99be
diff --git a/apps/web/src/hooks/mutations/task/use-delete-task.ts b/apps/web/src/hooks/mutations/task/use-delete-task.ts
index edc24789c..ac358c6de 100644
--- a/apps/web/src/hooks/mutations/task/use-delete-task.ts
+++ b/apps/web/src/hooks/mutations/task/use-delete-task.ts
@@ -27,12 +27,6 @@ export function useDeleteTask() {
void queryClient.invalidateQueries({
queryKey: ["tasks", deletedTask.projectId],
});
- // Relations cascade with the task, and the TASK_DELETED broadcast skips
- // the window that issued the delete, so this is the only path that
- // refreshes the list view's edge set for whoever performed it.
- void queryClient.invalidateQueries({
- queryKey: ["task-relations", "project", deletedTask.projectId],
- });
const { project, setProject } = useProjectStore.getState();
if (project?.id === deletedTask.projectId) {