Independent audit note — series 05/11. Integration order. Patch base: the #44 baseline; this diff repeats the 6-file baseline change. Assessment: not recommended for merge as-is.
Scope #
Moderation hub: the single disabled routes/moderation.tsx is replaced by subroutes (inbox, report, muted accounts/words, blocked accounts, interaction settings, labelers, verification, lists), plus preferences CRUD, local mutes, and report helpers.
Findings #
- Keep:
src/utils/preferences.tsand its 13 tests. This is the strongest module in the bundle: read-modify-write of the preferences array with a compare-and-swap guard, and one place for upsert/remove/mutate/replace. Reimplementing preferences without it means rebuilding the hard part. - Remove:
LOCAL_MUTE_COLLECTION = "app.bsky.graph.mute"(moderation.ts:46). That collection is not in the Bluesky lexicon; it is an invented public repo record. Mutes are private state. A local-only mute should stay local; a cross-client mute should callapp.bsky.graph.muteActor. Writing a fake public record publishes the mute list to anyone who reads the repo. - Duplicate mute paths. This branch's
muteAccountwrites the local record (moderation.ts:225). #01'smoderationActions.ts:173callsagent.mute(). The same user action has two destinations and two behaviours. vite.config.tsflipsMODERATION_PAGEtotrue, so the nav entry appears. That is only correct if the subroutes are ready.window.confirmremains atroutes/moderation/inbox.tsx:116androutes/moderation/lists/$rkey.tsx:111.routeTree.gen.tsis regenerated (+253). It should match the project's TanStack Router version before applying.preferences.test.tsis real coverage (+283). The tests are worth keeping even if the UI is rewritten.
Dependencies #
No hard dependency. #01 introduces the competing mute helper, so the mute model needs one owner (#05 or #01, not both). AppView mute sync only matters once #06's transport exists.
Merge assessment #
The invented public mute collection and the two conflicting mute implementations are user-visible privacy and correctness problems.