Files
bsky-social-app/src
Samuel Newman ac2309c182 snapshot session after prep, skip no-op cross-tab rebuilds, restore chat proxy env
Review fixes (PR #11182 round 3):
- The session factories snapshotted the account BEFORE the prep awaits
  (moderation config, age-assurance prefetch) with hooks still disarmed.
  A 401 during prep triggers PasswordSession's internal auto-refresh,
  rotating both tokens; the dropped onUpdated meant the stale refreshJwt
  got persisted (dead on next cold start). The returned account is now
  re-snapshotted after prep, right before arm() - matching the old
  BskyAppAgent.prepare ordering. Tests pin the mid-prep rotation case.
- Cross-tab sync rebuilt and killed the active bundle on ANY saved-
  account change; now bails out when the current account's tokens are
  unchanged.
- buildChatClient hard-coded the SDK's prod chat DID, making the env-
  configurable CHAT_PROXY_DID dead code and routing staging DMs to prod
  chat; new CHAT_PROXY_SERVICE constant restores the override.
- The cross-tab labeler reapply was fire-and-forget; the bundle swap now
  defers until the labeler config resolves, matching the factories.

Note: the reviewer's URL.canParse/ReadableStream claim was verified
INCORRECT - Expo 54's WinterCG runtime defines URL.canParse and Metro
injects a ReadableStream polyfill (expo/virtual/streams.js) into dev and
release bundles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 18:19:43 +03:00
..
2026-03-25 00:50:26 -07:00