route appview state and facet resolution off the pds client

Audit of usePdsClient call sites: the PDS client is for com.atproto.*
account/repo operations. Appview-private state (actor/list/thread mutes,
notification seen-state) and mention/facet resolution now use the
appview-routed client. useRichText also regains logged-out mention
resolution via useLexClient's public fallback (usePdsClient throws when
logged out, silently leaving mentions unresolved on StarterPackLanding
and web ProfileHoverCard).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-07-17 15:01:08 +03:00
parent 8ee62d67bd
commit 4c0d99158f
10 changed files with 36 additions and 47 deletions
+4 -4
View File
@@ -474,10 +474,10 @@ export function useProfileMuteMutationQueue(
function useProfileMuteMutation() {
const queryClient = useQueryClient()
const pdsClient = usePdsClient()
const appviewClient = useAppviewClient()
return useMutation<void, Error, {did: string}>({
mutationFn: async ({did}) => {
await pdsClient.call(muteActor, {actor: did as AtIdentifierString})
await appviewClient.call(muteActor, {actor: did as AtIdentifierString})
},
onSuccess() {
void queryClient.invalidateQueries({queryKey: RQKEY_MY_MUTED()})
@@ -487,10 +487,10 @@ function useProfileMuteMutation() {
function useProfileUnmuteMutation() {
const queryClient = useQueryClient()
const pdsClient = usePdsClient()
const appviewClient = useAppviewClient()
return useMutation<void, Error, {did: string}>({
mutationFn: async ({did}) => {
await pdsClient.call(unmuteActor, {actor: did as AtIdentifierString})
await appviewClient.call(unmuteActor, {actor: did as AtIdentifierString})
},
onSuccess() {
void queryClient.invalidateQueries({queryKey: RQKEY_MY_MUTED()})