-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: ui does not update after pruning only files #36099
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 95a52f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #36099 +/- ##
===========================================
+ Coverage 65.50% 65.52% +0.01%
===========================================
Files 3168 3169 +1
Lines 105117 105177 +60
Branches 20021 20030 +9
===========================================
+ Hits 68858 68918 +60
- Misses 33579 33581 +2
+ Partials 2680 2678 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
do you know when this regression was introduced? |
gabriellsh
left a comment
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.
I noticed that this behavior changes based on dbWatchersDisabled. If set to false, the file pruning is reactive, set to true, it stops working. Recently this flag was changed from default false to default true (which could be the reason for the regression). For the CI, the flag is still set to false, this means that the implemented e2e tests would pass even without the fix (not really testing the fix).
Retification: The flag was also inverted in the CI, you can just disregard this comment |
Hey, @ggazzo , After debugging this, we identified a two-step root cause:
So while this behavior has likely existed for a long time, the regression (as experienced by users) was triggered when we disabled DB watchers by default. We’re fixing it now by explicitly adding a Hope this clarifies the context! |
|
why not use |
52a18d0 to
072c14c
Compare
072c14c to
1838d39
Compare
Instead of introducing a new event, I have modified the original deleteMessageBulk event to handle cases for filesOnly pruning. |
cc2c38a to
2ad5498
Compare
|
This PR currently has a merge conflict. Please resolve this and then re-add the |
2ad5498 to
9999f7d
Compare
Signed-off-by: Abhinav Kumar <[email protected]>
Signed-off-by: Abhinav Kumar <[email protected]>
Signed-off-by: Abhinav Kumar <[email protected]>
1386184 to
7b00bd6
Compare
Proposed changes (including videos or screenshots)
This PR resolves a regression where the UI fails to update reactively after pruning only files using the “Prune messages” feature. Users must currently reload the page manually to see the deleted files disappear, a behavior that deviates from version 7.6.0, where the UI responded automatically.
The issue is caused from the lack of an explicit broadcast when
filesOnlyis true—unlike full message pruning, which uses thedeleteMessageBulkevent to notify clients. To address this, a newdeleteFilesBulkevent has been added to handle these cases and ensure client-side updates.A contributing factor to this regression was a recent change that disables DB watchers by default in production environments. This change, most probably, prevented sending
stream-room-messagesevent automatically (due to absense of explicit broadcast)Together, these adjustments restore reactive file pruning functionality and improve consistency between environments and versions.
Issue(s)
Steps to test or reproduce
Further comments
CORE-1168
UPDATE
deleteMessageBulkevent to coverfilesOnlypruning cases.