Skip to content
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

Merged
merged 13 commits into from
Dec 20, 2024
Merged

9018 fix batch delete #9149

merged 13 commits into from
Dec 20, 2024

Conversation

bosiraphael
Copy link
Contributor

Closes #9018

@bosiraphael bosiraphael linked an issue Dec 19, 2024 that may be closed by this pull request
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 and isRecordBoardLoadMoreLockedComponentState 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

Copy link
Member

@charlesBochet charlesBochet left a 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!

@charlesBochet charlesBochet merged commit 9252946 into main Dec 20, 2024
21 of 22 checks passed
@charlesBochet charlesBochet deleted the 9018-fix-batch-delete branch December 20, 2024 09:46
mdrazak2001 pushed a commit to mdrazak2001/twenty that referenced this pull request Dec 20, 2024
samyakpiya pushed a commit to samyakpiya/twenty that referenced this pull request Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange behavior when deleting a large number of records
2 participants