Пропиши ПОЛНЫЙ КОД. This reducer is too heavy. It is responsible for 3 different entities: boards, lists and tasks
Please try to create one reducer per entity import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { Board } from '../types';
interface BoardsState {
    boards: Board[];
    selectedBoardId: string | null;
}

const initialState: BoardsState = {
    boards: [],
    selectedBoardId: null
};

const boardsSlice = createSlice({
    name: 'boards',
    initialState,
    reducers: {
        addBoard(state, action: PayloadAction<string>) {
            const newBoard: Board = {
                id: Date.now().toString(),
                title: action.payload,
                lists: []
            };
            state.boards.push(newBoard);
        },
        selectBoard(state, action: PayloadAction<string>) {
            state.selectedBoardId = action.payload;
        },
        addList(
            state,
            action: PayloadAction<{ boardId: string; title: string }>
        ) {
            const { boardId, title } = action.payload;
            const board = state.boards.find((b) => b.id === boardId);
            if (board) {
                board.lists.push({
                    id: Date.now().toString(),
                    title,
                    tasks: []
                });
            }
        },
        addTask(
            state,
            action: PayloadAction<{ listId: string; title: string }>
        ) {
            const { listId, title } = action.payload;
            for (const board of state.boards) {
                const list = board.lists.find((l) => l.id === listId);
                if (list) {
                    list.tasks.push({
                        id: Date.now().toString(),
                        title,
                        description: '',
                        listId
                    });
                    break;
                }
            }
        },
        moveTask(
            state,
            action: PayloadAction<{
                sourceListId: string;
                destListId: string;
                sourceIndex: number;
                destIndex: number;
                taskId: string;
            }>
        ) {
            const { sourceListId, destListId, sourceIndex, destIndex } =
                action.payload;

            for (const board of state.boards) {
                const sourceList = board.lists.find(
                    (l) => l.id === sourceListId
                );
                const destList = board.lists.find((l) => l.id === destListId);

                if (sourceList && destList) {
                    const [movedTask] = sourceList.tasks.splice(sourceIndex, 1);
                    movedTask.listId = destListId;
                    destList.tasks.splice(destIndex, 0, movedTask);
                    break;
                }
            }
        },
        deleteBoard(state, action: PayloadAction<string>) {
            const boardId = action.payload;
            state.boards = state.boards.filter((b) => b.id !== boardId);
            if (state.selectedBoardId === boardId) {
                state.selectedBoardId = null;
            }
        },
        deleteList(
            state,
            action: PayloadAction<{ boardId: string; listId: string }>
        ) {
            const { boardId, listId } = action.payload;
            const board = state.boards.find((b) => b.id === boardId);
            if (board) {
                board.lists = board.lists.filter((l) => l.id !== listId);
            }
        },
        deleteTask(
            state,
            action: PayloadAction<{ listId: string; taskId: string }>
        ) {
            const { listId, taskId } = action.payload;
            for (const board of state.boards) {
                const list = board.lists.find((l) => l.id === listId);
                if (list) {
                    list.tasks = list.tasks.filter((t) => t.id !== taskId);
                    break;
                }
            }
        },
        updateBoardTitle(
            state,
            action: PayloadAction<{ boardId: string; newTitle: string }>
        ) {
            const { boardId, newTitle } = action.payload;
            const board = state.boards.find((b) => b.id === boardId);
            if (board) {
                board.title = newTitle;
            }
        },
        updateListTitle(
            state,
            action: PayloadAction<{
                boardId: string;
                listId: string;
                newTitle: string;
            }>
        ) {
            const { boardId, listId, newTitle } = action.payload;
            const board = state.boards.find((b) => b.id === boardId);
            if (board) {
                const list = board.lists.find((l) => l.id === listId);
                if (list) {
                    list.title = newTitle;
                }
            }
        },
        updateTaskTitle(
            state,
            action: PayloadAction<{
                listId: string;
                taskId: string;
                newTitle: string;
            }>
        ) {
            const { listId, taskId, newTitle } = action.payload;
            for (const board of state.boards) {
                const list = board.lists.find((l) => l.id === listId);
                if (list) {
                    const task = list.tasks.find((t) => t.id === taskId);
                    if (task) {
                        task.title = newTitle;
                        break;
                    }
                }
            }
        },
        updateTaskDescription(
            state,
            action: PayloadAction<{ taskId: string; newDescription: string }>
        ) {
            const { taskId, newDescription } = action.payload;
            for (const board of state.boards) {
                for (const list of board.lists) {
                    const task = list.tasks.find((t) => t.id === taskId);
                    if (task) {
                        task.description = newDescription;
                        break;
                    }
                }
            }
        }
    }
});

export const {
    addBoard,
    selectBoard,
    addList,
    addTask,
    moveTask,
    deleteBoard,
    deleteList,
    deleteTask,
    updateBoardTitle,
    updateListTitle,
    updateTaskTitle,
    updateTaskDescription
} = boardsSlice.actions;
export const boardsReducer = boardsSlice.reducer;
index.js import { configureStore } from '@reduxjs/toolkit';
import { boardsReducer } from './boardsSlice';
import { activityReducer } from './activitySlice';

export const store = configureStore({
    reducer: {
        boards: boardsReducer,
        activity: activityReducer
    }
});

export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
thunkactions.js import { AppDispatch } from './index';
import {
    addBoard,
    addList,
    addTask,
    deleteBoard,
    deleteList,
    deleteTask,
    updateBoardTitle,
    updateListTitle,
    updateTaskTitle,
    updateTaskDescription
} from './boardsSlice';
import { logActivity } from './activitySlice';

export const addBoardWithActivity =
    (title: string) => (dispatch: AppDispatch) => {
        dispatch(addBoard(title));
        dispatch(logActivity(`Added board "${title}"`));
    };

export const deleteBoardWithActivity =
    (boardId: string, boardTitle: string) => (dispatch: AppDispatch) => {
        dispatch(deleteBoard(boardId));
        dispatch(logActivity(`Deleted board "${boardTitle}"`));
    };

export const addListWithActivity =
    (boardId: string, title: string) => (dispatch: AppDispatch) => {
        dispatch(addList({ boardId, title }));
        dispatch(logActivity(`Added list "${title}"`));
    };

export const deleteListWithActivity =
    (boardId: string, listId: string, listTitle: string) =>
    (dispatch: AppDispatch) => {
        dispatch(deleteList({ boardId, listId }));
        dispatch(logActivity(`Deleted list "${listTitle}"`));
    };

export const addTaskWithActivity =
    (listId: string, title: string) => (dispatch: AppDispatch) => {
        dispatch(addTask({ listId, title }));
        dispatch(logActivity(`Added task "${title}"`));
    };

export const deleteTaskWithActivity =
    (listId: string, taskId: string, taskTitle: string) =>
    (dispatch: AppDispatch) => {
        dispatch(deleteTask({ listId, taskId }));
        dispatch(logActivity(`Deleted task "${taskTitle}"`));
    };

export const updateBoardTitleWithActivity =
    (boardId: string, newTitle: string) => (dispatch: AppDispatch) => {
        dispatch(updateBoardTitle({ boardId, newTitle }));
        dispatch(logActivity(`Board renamed in "${newTitle}"`));
    };

export const updateListTitleWithActivity =
    (boardId: string, listId: string, newTitle: string) =>
    (dispatch: AppDispatch) => {
        dispatch(updateListTitle({ boardId, listId, newTitle }));
        dispatch(logActivity(`List renamed in "${newTitle}"`));
    };

export const updateTaskTitleWithActivity =
    (listId: string, taskId: string, newTitle: string) =>
    (dispatch: AppDispatch) => {
        dispatch(updateTaskTitle({ listId, taskId, newTitle }));
        dispatch(logActivity(`Task renamed in "${newTitle}"`));
    };

export const updateTaskDescriptionWithActivity =
    (taskId: string, newDescription: string) => (dispatch: AppDispatch) => {
        dispatch(updateTaskDescription({ taskId, newDescription }));
        dispatch(logActivity(`Task description updated`));
    };