You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(OUT-2055): realtime and cache issues for subtask count and subtask list.
- subtasks count cache issue : accessibleTask was use to calculate subtask count component for task card and task list. only implemented accessibleTask to be update from server on the first laod, rest of the time, its updated from realtime.
- subtasks list update issue : subtasks list were only refetched when no of subtasks in parent task was change, but while updating it doesnt change :
- created a migration adding lastSubtaskUpdated timestamp in task schema.
- formatted the timestamp for lastSubtaskUpdated in realtime response.
- refetched subtasks according to the change in lastSubtaskUpdated.
- updated lastSubtaskUpdated while creating, updating and deleted a sub task.
- made sure we dont compromise on previously applied optimization by adding refetching check on mount and optimistic updates.
constshouldRefetchRef=useRef(true)//preventing double fetching from subtask update apis. Due to optimistic update revalidation, we are already fetching logs there. So no need to refetch in case for subtask update.
0 commit comments