Commit Graph

1461 Commits

Author SHA1 Message Date
Samuel Newman e056c43116 flip the component type imports to the generated lexicons
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:49 +03:00
Samuel Newman 541a82c2dd move the bluesky labeler did to the sdk api constant
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:49 +03:00
Samuel Newman 3c5f0ca916 Update state.test.ts 2026-08-13 22:13:48 +03:00
Samuel Newman f31c1c6c2a fix import order 2026-08-13 22:13:47 +03:00
Samuel Newman d6af1c5d36 point the remaining view moderation call sites at the sdk
The rest of the consumer surface - components, screens and the legacy `view`
tree - takes its moderation types from `@bsky.app/sdk/moderation` and its
`moderate*` calls from the `lib/moderation/subjects` seam.

`DebugMod` constructs a `ModerationOpts` by hand for its scenario matrix, so
its literal `userDid` is branded at the construction site.
2026-08-13 22:13:47 +03:00
Samuel Newman f1411df0a4 flip the preferences and labeler reads to sdk types
`UsePreferencesQueryResponse` now derives from the sdk's `BskyPreferences`
rather than the legacy one, which removes the cast the previous slice put on the
assembled response - the query already returns the sdk action's result, so the
two now type structurally.

`labeler.ts`'s three service reads move to the appview client and return
`app.bsky.labeler.defs` views, because `interpretLabelValueDefinitions` takes
the lexicon-typed view. `moderation-opts.tsx` reads `Client.appLabelers`
instead of `AtpAgent.appLabelers`: the lex static is already branded, so the
fallback labeler list satisfies `ModerationPrefsLabeler` without a cast.

`MutedWords` follows the prefs types: `expiresAt` is a `DatetimeString` now,
built with `toDatetimeString` rather than `Date.toISOString`, and
`sanitizeMutedWordValue` comes from `@bsky.app/sdk/utils`.
2026-08-13 22:13:47 +03:00
Samuel Newman 9aa6b49daf swap the moderation core to the sdk moderation module
Point the moderation primitives - the label definitions, the cause/UI/decision
types and the label-info hooks - at `@bsky.app/sdk/moderation` instead of
`@atproto/api`.

The two implementations are mutually unassignable: the sdk's subject types are
the generated `#/lexicons` views, so their `did`/`uri`/`cid` fields are
branded (`DidString`, `AtUriString`) where the `@atproto/api` views type the
same fields as plain `string`. That rules out a partial swap - a decision made
by one implementation cannot be read by the other - so the whole moderation
layer moves together.

`lib/moderation/subjects.ts` is the transitional seam for the brand mismatch.
Every `moderate*` entry point is re-exported through a wrapper that widens its
subject parameter to accept a view from either world, because many read paths
still emit `@atproto/api` views while the moderation runtime only ever reads
`.did`, `.labels` and `.viewer` - none of which the brand affects. It is
deleted in the `@atproto/api` removal pass.
2026-08-13 22:13:47 +03:00
Samuel Newman 755ce365f6 migrate the age assurance data reads to the session clients
getOtherRequiredData's getPreferences read moves onto the sdk action, which
also unblocks fetchActorDeclarationRecord - its only caller - so the record
read moves to the pds client too.

The prefetch and refetch entry points now take the transport they need
rather than an agent: the appview client for getState and device signals,
the account client for preferences and the declaration record. The session
bundle still carries only an agent, so the three session call sites derive
both clients from it; the full bundle rework is a later slice. The standalone
config read stays on its own unauthenticated agent.
2026-08-13 22:13:47 +03:00
Samuel Newman a40c199523 migrate the signup and onboarding profile writes to sdk actions
The post-signup and onboarding writes (setPersonalDetails, upsertProfile,
overwriteSavedFeeds, setInterestsPref) move onto sdk actions over the pds
client, and the starter-pack and contact-import reads move to the lex
clients. Every upsertProfile call now writes a lex blob directly, so the
toLegacyBlobRef bridge has no remaining callers and is deleted.
2026-08-13 22:13:46 +03:00
Samuel Newman 8d588518cb replace the age assurance agent clone with a token-scoped client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:46 +03:00
Samuel Newman 483e79497b add refreshSession to the session api and migrate its callers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:45 +03:00
Samuel Newman 83fdc95237 migrate the blob upload helper to the pds client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:45 +03:00
Samuel Newman 3a970a7104 migrate the starter pack writes to the pds client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:45 +03:00
Samuel Newman 0c8cdba703 migrate the threadgate and postgate records to the pds client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:44 +03:00
Samuel Newman 74b0001335 migrate getAllListMembers to the appview client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:44 +03:00
Samuel Newman 2beb63fb2d migrate RichText to the SDK and resolve facets via the appview
The two RichText classes are not mutually assignable - `UnicodeString` has a
private field and the SDK brands `did`/`uri` as template literal types - so
every producer and consumer of a RichText instance has to move in one step.

`detectFacets` now takes a lex client instead of the legacy agent, which is
what removes the last hard agent dependency from these files. Handle
resolution is an appview job, so the appview client is threaded in: through
`useAppviewClient` in the hooks and dialogs, and through a new
`appviewClient` option on `apilib.post` (Composer already had the client to
hand). The rest of the post pipeline still writes through the agent.

Facet feature checks move from the `AppBskyRichtextFacet` validators to the
generated `#/lexicons` schemas, matching how the rest of the app narrows
lexicon types.

Display sinks still read facets off `@atproto/api` view types, which are the
same lexicon but typed with plain strings. `asSdkFacets` widens them at those
call sites and goes away once the view types come from the SDK too.
2026-08-13 21:50:54 +03:00
Samuel Newman fbc7c94b59 lint fix 2026-08-13 21:50:54 +03:00
Samuel Newman abf8ba0993 route moderation reports through the appview client with per-call proxying
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:54 +03:00
Samuel Newman 1d5c0ff4af migrate the email request mutations to the pds client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:54 +03:00
Samuel Newman 0bf2ada0c6 migrate the activity subscription queries to the appview client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:53 +03:00
Samuel Newman 1a6bfd8a6a migrate the contact queries and phone verification to the appview client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:52 +03:00
Samuel Newman c0aafe4ffd migrate the actor search and autocomplete queries to the appview client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:52 +03:00
Samuel Newman 72162c1544 classify migrated chat group errors with matchXrpcError
The lex client throws XrpcResponseError, which is not an XRPCError
subclass, so the per-method error classes generated by @atproto/api no
longer match. Those instanceof checks compile fine but silently stop
firing, degrading every typed group failure to the generic fallback
message. Narrow against the method schema instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:52 +03:00
Samuel Newman 85f2ff39a7 classify migrated chat convo errors with matchXrpcError
The lex client throws XrpcResponseError, which is not an XRPCError
subclass, so the old per-method error classes generated by @atproto/api
no longer match. Those instanceof checks compile fine but silently stop
firing, degrading every typed chat failure to the generic fallback
message. Narrow against the method schema instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:52 +03:00
Samuel Newman 1d279dc894 adapt error classification and email state to the lex session core
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:41:04 +03:00
Darrin Loeliger 2f0d417417 Updated Media Icons (#11457)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 05:49:05 -07:00
Samuel Newman da93da4191 Fix display of link cards in DMs (#11458) 2026-08-13 05:48:56 -07:00
DS Boyce aafcb2eeff Remove workaround for iOS text clipping (#11455) 2026-08-12 14:55:25 -07:00
Samuel Newman 9b0adcb55f Fix starter pack icon in profile menu (#11452) 2026-08-12 19:03:54 +03:00
Jeffrey Gleason 98fa8eafdf algo team reply feedback (#11444) 2026-08-12 04:30:14 -07:00
DS Boyce 82db01fc60 Prevent last line of post text from being clipped on Android (#11433) 2026-08-11 13:57:18 -07:00
DS Boyce 1e6725c0a1 Fix post numbers being clipped in some cases (#11413) 2026-08-06 16:34:49 -07:00
DS Boyce 1c349ad7da Add timestamp field to video report dialog (#11339) 2026-08-06 12:11:05 -07:00
Eric Bailey 724013df1b Add repost-only mutes (#11223)
Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
2026-08-06 11:53:02 -07:00
surfdude29 78a5c222bf Tweak strings (#11407) 2026-08-06 05:18:38 -07:00
Eric Bailey b79908ecea Add canonical OP thread numbering (#11184)
Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
2026-08-05 10:20:43 -07:00
Spence Pope 32ec5330b0 Enrich fatal HLS errors in Sentry (#11359) 2026-08-05 10:15:26 -04:00
Spence Pope f1cfa37bab APP-2764: Remove unnecessary top padding on GIF posts (#11321) 2026-08-04 10:45:44 -04:00
Samuel Newman 1cc942a869 Classify report dialog errors (#11354) 2026-08-03 08:00:25 -07:00
Oleksii Bulenok 157a1893fd fix TextInput resizes on Android when the first chat is typed (#11318) 2026-07-30 12:53:35 +02:00
DS Boyce 91517af01c Log rank and parent index with trending topic events (#11331) 2026-07-29 16:14:44 -07:00
DS Boyce 45bdba5dfa Let trending topic names wrap to two lines (#11323) 2026-07-29 10:58:08 -07:00
Foysal Ahamed c6a40088dd Add TIDA form URL for adult content report (#11150)
Co-authored-by: Eric Bailey <git@esb.lol>
2026-07-29 17:38:27 +02:00
Samuel Newman 0751420a29 Drop react-native-progress fork (#11312) 2026-07-28 19:47:56 +03:00
Samuel Newman de348db116 Show a non-standard OTA channel notice in the drawer (#11288)
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-28 06:59:17 -07:00
DS Boyce e4ba1b4378 Add trendingTopic:seen metric (#11309) 2026-07-27 17:06:10 -07:00
DS Boyce a5f0e8839a Update trending topics UI (#11304) 2026-07-27 16:34:15 -07:00
DS Boyce d9eacc3d98 Fix keyboard activation for signin button (#11308) 2026-07-27 15:18:43 -07:00
Samuel Newman abde10b7bd Fix tooltip layout measurement loop (#11284) 2026-07-27 03:16:31 -07:00
Tomasz Zawadzki 2b9deeeb6a Migrate runOnUI/runOnJS to scheduleOnUI/scheduleOnRN (#11249) 2026-07-26 12:00:35 -07:00