Skip to content

Fix fb deletion priority#650

Merged
micahflee merged 8 commits into
mainfrom
fix-fb-deletion-priority
Apr 17, 2026
Merged

Fix fb deletion priority#650
micahflee merged 8 commits into
mainfrom
fix-fb-deletion-priority

Conversation

@SaptakS
Copy link
Copy Markdown
Contributor

@SaptakS SaptakS commented Apr 15, 2026

Fixes #649

This PR does things slightly differently from the approach listed in the issue.

  • It loops over the batch actions in priority (delete > untag > hide)
  • It tries to select every item in the current priority batch action (delete in beginning and then so on) instead of determining the priority batch action from the first item
  • If there is 0 items that the current priority action can be applied to, then it moves to the next action in the priority list, else it breaks from the loop and performs the action

This does make things slightly slower than before, but I think classifying (as suggested in the issue) would make it equally slow. I have added some test to replicate the issue and also tried to replicate the issue in a test account and in both cases, it seems to work. We may have to brainstorm later if we can improve performance, but this definitely seems to be working in deleting, untagging and hiding everything.

I think this process is also easier, if we want to provide a better summary of how many elements were deleted, how many were untagged and how many were hidden.

SaptakS added 2 commits April 15, 2026 14:52
Goes through batchAction based on the priority order set by us, that is
first try to delete all items. If there are 0 checked item with
batchAction set as delete, then try to untag, and then try to hide.
These prevents anomalies where the first item might have just "hide"
action since it will always try to delete all items first and only move
to next priority action if there is 0 checked item.
@SaptakS SaptakS force-pushed the fix-fb-deletion-priority branch from 40aa938 to e65ec5e Compare April 15, 2026 12:26
Copy link
Copy Markdown
Member

@micahflee micahflee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great! I think we should add two additional things to this PR:

  • Separate the progress into items deleted, untagged, and hidden, instead of just deleted. (This will also require a small cyd-server change, when submitting progress.)
  • Display more verbose progress info, possibly in the speech bubble? Instead of just saying "I'm removing all posts from your Facebook wall." it should give granular updates:
    • When it starts looping through a different action, it should say something like, "I'm looking for a batch of posts to delete/untag/hide..."
    • After it finds a batch, it should say something like, "I'm deleting/untagging/hiding X posts..."

@micahflee micahflee merged commit 717f856 into main Apr 17, 2026
1 check passed
@micahflee micahflee deleted the fix-fb-deletion-priority branch April 17, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Facebook] fix the deletion algorithm

2 participants