-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9018 fix batch delete #9149
9018 fix batch delete #9149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR addresses performance and UI feedback issues when deleting large numbers of records by implementing a loading lock mechanism and moving favorite cleanup to server-side batch processing.
- Added
isRecordTableLoadMoreLockedComponentState
andisRecordBoardLoadMoreLockedComponentState
to prevent infinite scroll during deletion - Implemented
ActionMenuContext
callbacks to track deletion progress and manage UI state - Created server-side
FavoriteModule
with message queue for batch processing favorite deletions (batch size: 100) - Replaced individual optimistic updates with batch updates using
triggerUpdateRecordOptimisticEffectV2
- Added proper UI feedback during deletion through action start/complete callbacks
21 file(s) reviewed, 18 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenu.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenuButtons.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/contexts/ActionMenuContext.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/contexts/ActionMenuContext.ts
Show resolved
Hide resolved
...ty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectV2.ts
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/modules/favorite/listeners/favorite-deletion.listener.ts
Show resolved
Hide resolved
packages/twenty-server/src/modules/favorite/services/favorite-deletion.service.ts
Show resolved
Hide resolved
packages/twenty-server/src/modules/favorite/listeners/favorite-deletion.listener.ts
Show resolved
Hide resolved
packages/twenty-server/src/modules/favorite/services/favorite-deletion.service.ts
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/modules/favorite/listeners/favorite-deletion.listener.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenu.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenu.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecords.ts
Show resolved
Hide resolved
...ages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/message-queue/message-queue.constants.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing some tests + I think we could remove the non batch optimistic rendering to enforce usage of the new one!
Closes #9018