The logic had a couple of issues:
- We weren't checking the timestamps when the viewer was leaving a top-level thread
- We were checking top-level thread membership of the viewer, which doesn't make sense because it is guaranteed
- We weren't removing non-viewer users from sidebars while leaving their parent thread
https://linear.app/comm/issue/ENG-9452/remove-user-from-sidebars-when-they-leave-a-parent-thread