mirror of
https://github.com/block/buzz.git
synced 2026-11-28 04:01:45 +00:00
## Summary `CommunityListNotifier.addCommunity` has no callers in the app. Communities are saved through the auth flow (`authenticateWithCommunity`), so the method, including its same-relay credential replacement branch, is dead code that tests kept alive. This deletes the method and the test that covered it. Tests that used it only for setup now seed `CommunityStorage` before building the provider container, which is how the app loads communities at startup. ## Changes - Delete `addCommunity` and its now-unused import. - Delete the `addCommunity adds to list` test. - Trim the two credential replacement tests to the startup sweep and removal coverage they also held, and delete the storage helper only they used. The trimmed tests still seed a retired signer's channel-directory file at startup, and check that the saved-message scope is cleared while the active community still holds a removed account. - `community_entry_requirements_test` keeps only the authentication path; the community addition variant tested the deleted method. ### Added lines Ignoring whitespace the diff is +99/-282. The added lines are: - `await communityStorage.save(...)` in place of each removed `addCommunity(...)` setup call. - `createContainer()` and the initial list read, moved below the seeded communities so the notifier loads them. - Reindentation in `community_entry_requirements_test` after removing its outer loop. - In the startup sweep and saved-message purge tests: a channel-directory seed helper with its assertions, and a listener that checks the saved-message scope during removal. These keep coverage of the provider's per-signer directory sweep and the scope's retained-identity guard, which the replacement assertions used to provide. ## Validation - Full mobile test suite, analyze, format and file-size checks pass. - No user-visible change, so no screenshots; the deleted code had no production caller. --------- Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>