feat(tasks): optimize task retrieval and performance metrics logging
- Updated `getList` and `getTasksOnly` methods to skip expensive progress calculations by default, enhancing performance. - Introduced logging for performance metrics, including method execution times and warnings for deprecated methods. - Added new `getTaskProgressStatus` endpoint to provide basic progress stats without heavy calculations. - Implemented performance optimizations in the frontend, including lazy loading and improved rendering for task rows. - Enhanced task management slice with reset actions for better state management. - Added localization support for task management messages in multiple languages.
This commit is contained in:
@@ -73,6 +73,8 @@ const groupingSlice = createSlice({
|
||||
state.groupStates[groupId].collapsed = false;
|
||||
});
|
||||
},
|
||||
|
||||
resetGrouping: () => initialState,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -86,6 +88,7 @@ export const {
|
||||
setGroupCollapsed,
|
||||
collapseAllGroups,
|
||||
expandAllGroups,
|
||||
resetGrouping,
|
||||
} = groupingSlice.actions;
|
||||
|
||||
// Selectors
|
||||
|
||||
@@ -85,6 +85,8 @@ const selectionSlice = createSlice({
|
||||
state.selectedTaskIds = action.payload;
|
||||
state.lastSelectedId = action.payload[action.payload.length - 1] || null;
|
||||
},
|
||||
|
||||
resetSelection: () => initialState,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -97,6 +99,7 @@ export const {
|
||||
selectAllTasks,
|
||||
clearSelection,
|
||||
setSelection,
|
||||
resetSelection,
|
||||
} = selectionSlice.actions;
|
||||
|
||||
// Selectors
|
||||
|
||||
@@ -338,6 +338,11 @@ const taskManagementSlice = createSlice({
|
||||
setSearch: (state, action: PayloadAction<string>) => {
|
||||
state.search = action.payload;
|
||||
},
|
||||
|
||||
// Reset action
|
||||
resetTaskManagement: (state) => {
|
||||
return tasksAdapter.getInitialState(initialState);
|
||||
},
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
builder
|
||||
@@ -398,6 +403,7 @@ export const {
|
||||
setError,
|
||||
setSelectedPriorities,
|
||||
setSearch,
|
||||
resetTaskManagement,
|
||||
} = taskManagementSlice.actions;
|
||||
|
||||
export default taskManagementSlice.reducer;
|
||||
|
||||
Reference in New Issue
Block a user