Commit Graph

2682 Commits

Author SHA1 Message Date
Samuel Newman 8da13e7511 drop the casts the dual-world layer needed
With every producer on the generated lexicons, the branded-string assertions at
these 30 sites are no-ops, and oxlint flags them. Also sorts the imports the
type flip disturbed and prunes the suppressions that no longer occur.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:50 +03:00
Samuel Newman 02173556ab drop @atproto/api from the dependency tree
The last references were stale comments; the package itself leaves
package.json, webpack's transpile list, and 102 packages from the lockfile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:50 +03:00
Samuel Newman ae0750099f collapse the dual-world type layer and delete the widening shims
The types/bsky post/profile/starterPack unions drop their @atproto/api arms,
and dangerousIsType/validate go with the old-world guards they wrapped. The
moderation subjects.ts widening shim and rich-text-helpers' asSdkFacets both
existed only to bridge branded and unbranded views, so their 55 and 14 callers
now go straight to @bsky.app/sdk/moderation and the raw facets.

Boundary fallout: lexicon token defs are camelCase schema objects needing
.value, and the branded string slots that the widening used to absorb are now
cast or branded at their producers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:50 +03:00
Samuel Newman 6792677be8 flip the legacy view 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 3f7b12b2fe migrate the remaining agent reads outside the session layer
The last non-session `useAgent` consumers, all thin aliases over calls the
clients already make:

- `handle.ts`: `getProfile` / `resolveHandle` to the appview client.
- `post.ts`: the three post readers share one `fetchPost` helper on the appview
  client. Their consumers still want `@atproto/api` views, so the generated view
  is asserted across at that single boundary rather than at each call site.
- `post-feed.ts`: `agent.session` gated the logged-out "did any post survive
  moderation" assertion, which is a question about the session, not the
  transport - it reads `hasSession` from the session context now.
- `ChangeHandleDialog`: `agent.serviceUrl` becomes `currentAccount.service`.
- `TestCtrls.e2e`: drops the `configureProxy` call. The appview client reads
  `BLUESKY_PROXY_HEADER` when the bundle builds it, and the gate around this
  input means no bundle exists yet, so setting the constant is sufficient.

`preferences/index.ts` still writes labeler subscriptions to the agent; that
one moves with the bundle rework, which is what gives it a client to write to.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:48 +03:00
Samuel Newman 92408c62a6 migrate link resolution to the appview and chat clients
`resolveLink` took an agent and used it for four appview reads plus the chat
invite preview, so it now takes both clients as a `LinkResolvers` pair - the
caller cannot know which branch a URL will take until it is parsed. That was
the last DM_SERVICE_HEADERS site, so the constant is deleted.

`resolveGif` never touched the agent at all (it is pure URL metadata work on
what the picker already returned), so its parameter is dropped rather than
replaced, along with the one on `fetchResolveGifQuery`.

With the resolvers on clients, `apilib.post` loses the agent parameter the
previous slice kept solely for them, and `composerStateToDraft` takes the
resolver pair instead of minting a throwaway public agent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:48 +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 4f669812b9 thread an explicit dispatch url through the video upload service auth
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:13:46 +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 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 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 8f6181495e migrate the notification say-hello action to the chat client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:53 +03:00
Samuel Newman 8a87a5fdea migrate the bookmark and draft queries 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 6ef3628155 cast branded params with the dedicated syntax types
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:51 +03:00
Samuel Newman 935935518a migrate service config and composer thread reads to the appview client
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 21:50:51 +03:00
Samuel Newman abdf1abf4b rebuild the session lifecycle on passwordsession
Replace the AtpAgent-owned session lifecycle with PasswordSession-backed
bundles, dispatched through the bridge agent. The provider, reducer and
factories now hold a `{session, agent, service}` bundle whose identity gates
session events, so a stale session can no longer log out the current account
or restore its tokens after a switch.

Behavioural changes that come with the new auth core:
- token rotation is read from the hook payload (PasswordSession fires before
  committing its live getter), so refreshes persist the new tokens
- replaced bundles are disposed rather than mutated, since PasswordSession has
  no in-place patch; cross-tab syncs rebuild instead
- the expiry rescue path prefers a newer persisted generation over logging
  every tab out

Post-signup writes keep main's agent.* call style; createAccount synthesizes
the email/active fields the thinner lex output omits.

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
Spence Pope f5f980e58e APP-1645: Improve video upload progress indicator (#11248) 2026-08-12 17:14:06 -04:00
Samuel Newman 9b0adcb55f Fix starter pack icon in profile menu (#11452) 2026-08-12 19:03:54 +03:00
Samuel Newman 34274647f2 Separate landing illustrations from splash assets (#11453) 2026-08-12 06:47:03 -07:00
Samuel Newman d727be8c1a Fix profile icon on custom feeds (#11408)
Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
2026-08-06 16:37:21 -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
Spence Pope 8cb6c7babe display backend-driven upload failure messages (#11329) 2026-08-05 12:12:03 -04:00
Spence Pope 32ec5330b0 Enrich fatal HLS errors in Sentry (#11359) 2026-08-05 10:15:26 -04:00
Spence Pope 0ccc029716 Allow feature-gated 10-minute video uploads (#11388) 2026-08-05 10:15:06 -04:00
Samuel Newman e99e04a458 Simplify inline badge presentation, fix alignment (#11352) 2026-08-03 06:26:06 -07:00
Samuel Newman c2ceb8057f Handle camera cancellation (#11322) 2026-08-03 06:25:42 -07:00
Oleksii Bulenok cc3c01267d Fix alt text input field not growing more than 3 lines (#11328) 2026-07-30 12:53:09 +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 b4bad1187a Indicate if someone followed you via a starter pack (#11320) 2026-07-29 12:11:28 -07:00
DS Boyce 196e81eb0c Get trending section indices from GrowthBook (#11319) 2026-07-29 10:24:50 -07:00
Spence Pope a35c4ac4ba APP-2670: add multipart video upload transport (#11222) 2026-07-29 12:54:03 -04:00
Samuel Newman 0751420a29 Drop react-native-progress fork (#11312) 2026-07-28 19:47:56 +03:00
Oleksii Bulenok 8263175a03 Fix caret misplaced upon pressing Return when using Japanese symbols … (#11316) 2026-07-28 17:17:29 +02:00
DS Boyce a5f0e8839a Update trending topics UI (#11304) 2026-07-27 16:34:15 -07:00
Tomasz Zawadzki 2b9deeeb6a Migrate runOnUI/runOnJS to scheduleOnUI/scheduleOnRN (#11249) 2026-07-26 12:00:35 -07:00
Samuel Newman 19b0d89313 Update react-native-uitextview (#11264) 2026-07-24 07:40:46 -07:00
Samuel Newman 63b284030a Fix Maestro E2E regressions on iOS and Android (#11258) 2026-07-24 03:48:03 -07:00
DS Boyce 10b027c35b Sort follows and following behind gate (#11237) 2026-07-23 09:02:35 -07:00
Oleksii Bulenok 8d64ab9d4b React Native New Arch (#10980) 2026-07-23 18:25:40 +03:00
DS Boyce 8ca8176eb1 Update presentation of trending feeds (#11206) 2026-07-22 14:35:45 -07:00
DS Boyce c71a4f8360 Create new trending feeds interstitial (#11207) 2026-07-22 14:23:01 -07:00
DS Boyce 1803de03a4 Lighten blue (link) text for dim and dark themes (#11164) 2026-07-20 09:29:58 -07:00
Samuel Newman 0fb7251c64 Add nightly Maestro E2E workflow (#11181)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 07:42:53 -07:00
Samuel Newman 007c21fa8e Add moduleSuffixes to tsconfig (#11146)
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-16 12:47:53 -07:00
Samuel Newman 406fb5425c Add Japan-gated custom logo (#11161) 2026-07-16 04:26:05 -07:00
Abdelrahman Youssef 83a791d7c8 Fix invisible bidi characters copied with handles on web (#11066) 2026-07-15 17:56:34 -05:00