Files
twenty/packages/twenty-front
sonarly-bot 7140da7d6a fix(front): don’t auto-sync parent on folder-only selection
https://sonarly.com/issue/38200?type=bug

Selecting a Microsoft subfolder under Sent also marks the Sent parent as synced, so import processes the full Sent folder instead of just the chosen subfolder.

Fix: I removed ancestor auto-selection when turning sync on in `computeFolderIdsForSyncToggle`.
Previously, sync-on returned `childIds + parentIds`, which caused selecting a nested Microsoft folder (e.g. under Sent) to also mark its parent as synced. That expanded backend import scope to the whole parent folder.

Now, sync-on returns only the selected folder and its descendants (`childIds`), while keeping existing unsync cascade behavior unchanged.

I also updated the colocated unit test file to reflect the intended behavior:
- nested folder sync should not include ancestors
- child sync should not include parent
- deep nested sync should not bubble up to ancestors
- syncing middle node should include descendants, not ancestors

This directly prevents Sent parent from being auto-synced when a user selects only a Sent subfolder.

Authored by Sonarly by autonomous analysis (run 43537).
2026-05-17 20:24:53 +00:00
..
2026-02-17 11:24:33 +01:00

Run yarn dev while server running on port 3000