The web app has been really slow to update whenever the ThreadStore changes, so I decided to do some quick profiling on prod using the Chrome Dev Tools.
I noticed that the browser was spending a lot of time on useThreadsWithPermission, so I investigated its callers. That led me to identity this perf issue where we are forcing useThreadsWithPermission to be recalculated on every call to useThreadHasPermission.