guard against a null view tag when keyboard-controller's
useExtraContentPadding flushes its deferred scrollTo. the rAF callback can
fire after the ScrollView detaches (navigating away, list re-creating its
scroll component), at which point scrollViewRef() is null. on the old arch
reanimated's scrollTo passes that null to the native _scrollToPaper
HostFunction, which throws "Value is null, expected a number".
re-check the ref inside the rAF before scrolling.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* show composer error if draft over char limit
* adjust cancel discarding if over the limit
* use richtext for validation
* don't allow saving a draft that can't actually be saved
* account for 1k chars
* update discard sheet
* show composer error if draft over char limit
* adjust cancel discarding if over the limit
* use richtext for validation
* don't allow saving a draft that can't actually be saved
* account for 1k chars
* update discard sheet
* pr comment fixes
* pluralization
Sets the "What to test" field in TestFlight to distinguish between
TestFlight and Production builds.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Fix text input not updating
* Fix autofocus
* make placeholder text fainter
* Await invalidation
* Image only drafts
* tweaks to gif presentation
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Add encouragement message to drafts list
Shows "So many thoughts, you should post one" at the bottom of the drafts list when user has more than 5 drafts.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Use Text component and center-align encouragement message
- Switch from ButtonText to Text component for better styling
- Add text-center alignment to the message
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* set presentation field in record
* refer to it as a gif in the composer
* video player gif presentation style
* tweak badge
* only do the "manual loop" when absolutely necessary
* mute gifs
* reuse gif controls component for tenor gifs
* update media previews in notifications
* edit comment
* remove outdated prop
* persist startup queries
* Use IDB for query storage (#9687)
* Add storage abstraction for persisted query data
Introduce a platform-specific storage abstraction layer for react-query
persistence:
- Native: Uses MMKV for high-performance synchronous storage
- Web: Uses IndexedDB via the `idb` library for efficient async storage
This replaces the previous AsyncStorage implementation with more performant
platform-native solutions. The abstraction maintains API compatibility with
@tanstack/query-async-storage-persister.
* Refactor storage abstraction to use factory pattern
Change createPersistedQueryStorage to a factory function that accepts a
storage ID, allowing multiple isolated storage instances:
- Native: Each instance gets its own MMKV store
- Web: Each instance gets its own IndexedDB database
Adopt the factory pattern in:
- react-query.tsx: Uses 'persisted_queries' storage
- ageAssurance/data.tsx: Uses 'age_assurance' storage
This provides better separation between different query client caches
and allows each to be managed independently.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Refactor to use archival storage
(cherry picked from commit a773b40e41c96f821cd32260919ce1437c0fc3ab)
* Improve archive db types
(cherry picked from commit 80e4959ba2aa00c984c26aed2f7dfae1095720b0)
* rm idb
* clear on logout, bust on app version
* create abstraction for persisting queries, make gcTime infinite
* Rm abstraction
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Use a separate translatable string for "Media stored on another device"
instead of interpolating a translated fragment into another string.
This allows translators to properly handle the complete sentence for
languages with different grammar structures.
https://claude.ai/code/session_01TJMLcXE9HHneEXMEBJqL4u
Co-authored-by: Claude <noreply@anthropic.com>
* Send deviceId and platform
* Add deviceId and deviceName to drafts, skip loading media for other devies
* WIP new preview
* show rich text in drafts list
(cherry picked from commit fb70d53d59)
* New draft preview UI
* Tighten up spacing in draft list
* Add i18n comments
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* delete media from existsCache when deleting
* revoke media URLs
* skip revoking objecturls until the composer is completely closed
* [Drafts] Metrics (#9794)
* metrics for drafts
* Nit: format
* nit: use new util for clarity
* nit: use new util for clarity
---------
Co-authored-by: Eric Bailey <git@esb.lol>
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Add ESLint rule to enforce Lingui msg usage
Adds a custom ESLint rule 'lingui-msg-rule' that ensures the Lingui _()
function is called with msg`` template literals or plural/select macros,
preventing accidental misuse like _('string') which bypasses i18n.
https://claude.ai/code/session_01JMXXPUgAHiSBGmfGwUojKy
* Support msg({...}) descriptor form and add auto-fix
- Allow msg() function call form: _(msg({message: 'Hello'}))
- Add auto-fix for string literals: _('Bad') -> _(msg`Bad`)
- Add auto-fix for untagged templates: _(`Bad`) -> _(msg`Bad`)
- No auto-fix for variables/function calls (not safely fixable)
https://claude.ai/code/session_01JMXXPUgAHiSBGmfGwUojKy
* fix complex cases
* run autofix HELL YEAH
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add drafts functionality to composer
- Add local storage layer for drafts (filesystem on native, IndexedDB on web)
- Add "Drafts" button to composer top bar showing badge with draft count
- Modify discard prompt to offer "Save Draft" option
- Add `restore_from_draft` action to composer reducer
- Support saving/restoring: text, facets, images, labels, threadgate, quote/link embeds
- Add placeholder hooks for future server API integration
- Add unit tests for draft serialization
Note: Video/GIF restoration marked as TODO for future implementation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix drafts button: always visible, adjacent to post button
- Make drafts button always visible (not just when drafts exist)
- Move button to be adjacent to the publish button
- If composer is empty: opens drafts list directly
- If composer has content: shows prompt to save/discard before viewing drafts
- Add badge showing draft count when drafts exist
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update drafts button: text-only, ghost/primary style
- Show "Drafts" or "Drafts (N)" as text, no icon
- Use ghost variant with primary color
- Match Cancel button styling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove draft count from button, just show "Drafts"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Increase drafts button horizontal padding and gap
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Use InnerFlatList and Dialog.Header for drafts dialog
- Switch from ScrollableInner to InnerFlatList
- Add Dialog.Header with back button in left slot
- Use sticky header
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Track draft ID in composer state machine
Adds draftId to ComposerState so that editing an existing draft and
saving it again updates the draft rather than creating a new one.
- Add draftId?: string to ComposerState type
- Set draftId when restoring from draft via restore_from_draft action
- Pass existingDraftId to save functions from composerState.draftId
- Add PageX icon for empty drafts state
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add clear action to discard composer content
When pressing the Drafts button with content in the composer, the user
can choose to discard. This now properly clears the composer by
dispatching a 'clear' action that resets to an empty state.
- Add 'clear' action type to ComposerAction
- Implement clear case in composerReducer (resets to single empty post)
- Add handleClearComposer callback in Composer.tsx
- Pass onDiscard prop through ComposerTopBar to DraftsButton
- Call onDiscard before opening drafts dialog on discard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Track dirty state to skip discard prompt for unchanged drafts
When a draft is loaded and the user hasn't made any changes, closing
the composer should not show the discard prompt since nothing would
be lost.
- Add isDirty field to ComposerState
- Set isDirty: true on all content-modifying actions
- Set isDirty: false on restore_from_draft, clear, and initial state
- Update onPressCancel to only show prompt if no draft or isDirty
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Redesign drafts list to show full thread preview
- Display all posts in a draft thread, not just the first
- First post uses larger avatar (42px), subsequent posts nested with
smaller avatar (32px) and thread connector line
- Show author avatar, display name, handle, and relative timestamp
- Add overflow menu button (placeholder) on first post
- Display full text instead of truncated preview
- Add media preview component for images, GIFs, and videos
- Card layout with rounded corners and proper spacing
- Add gap separators between draft cards in list
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix draft item styling based on feedback
- Add border and shadow to draft cards
- Remove trash button, move delete to overflow menu prompt
- Remove size differences for thread posts (same avatar/text size)
- Add spacing between header and first draft item
- Change prompt wording to "Discard draft"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Use real image embed components for draft preview
Replace custom image preview with AutoSizedImage for single images
and ImageLayoutGrid for multiple images. This gives drafts the same
polished image display as regular posts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Improve drafts dialog platform handling
- Render header outside FlatList on native, inside on web
- Use web() helper for conditional web-only props
- Replace ItemSeparatorComponent with mt_lg margin on items
- Add minHeight on web for better dialog sizing
- Simplify header structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Mark composer as clean after saving draft
Add mark_saved action that resets isDirty to false and updates the
draftId. This is dispatched after successfully saving a draft, allowing
the user to close the composer without a discard prompt since their
changes have been saved.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply dirty tracking to Drafts button prompt
Only show the save/discard prompt when pressing the Drafts button if
the composer has unsaved changes (isDirty). If the content is unchanged
from a loaded draft or was just saved, go directly to the drafts list.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix re-saving drafts with existing media
When re-saving a draft, the code was trying to copy media files that
were already in drafts storage to new locations, causing copy errors.
Changes:
- Add extractLocalIdFromPath() to detect if a path is already in drafts
- Track loadedMediaMap in ComposerState for identifying reusable media
- Only delete old media that wasn't reused during re-save
- Pass loadedMediaMap when saving to enable media reuse detection
- Disable pointer events on draft media preview
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add vertical option to prompt, change copy
* fix import
* fix import
* Migrate drafts from local storage to server API
Replace local-only draft storage with the new `app.bsky.draft.*` server API:
- getDrafts, createDraft, updateDraft, deleteDraft endpoints
Key changes:
- Add api.ts with type converters (ComposerState <-> server Draft)
- Update hooks.ts to use server API instead of local storage
- Simplify storage.ts/storage.web.ts for local media caching only
- Media stored locally via localRef pattern (filepath in server draft)
- GIFs stored as external embeds with Tenor URL + dimensions
- Hide drafts button when replying (reply drafts not supported)
- Show "different device" note when media is missing locally
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* attempt to fix blob mangement
* Migrate storage.ts from expo-file-system/legacy to expo-file-system
Use the new object-based expo-file-system API (SDK 54+) with Directory
and File classes instead of the legacy function-based API. The new API
provides synchronous operations for file/directory existence checks,
creation, copying, deletion, and listing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add drafts-specific logger
Add a Drafts context to the logger system for better log categorization
and debugging of draft-related operations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: use drafts-specific logger in hooks and storage
Switch from the generic logger to the new drafts-specific logger
for better log categorization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: ensure media cache is populated before checking exists
On iOS (and web), the media cache wasn't populated before the drafts
query ran, causing drafts with local media to incorrectly show as
"missing media" on app restart. The issue would resolve itself after
closing and reopening the composer because by then the cache was ready.
This fix adds ensureMediaCachePopulated() and awaits it in useDrafts
before checking which media exists locally.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: complete Gif object reconstruction for draft rehydration
Fix "Cannot read property 'url' of undefined" error when rehydrating
drafts with GIFs. The Gif object was missing required properties like
url, content_description, and media_formats.preview that are needed
by useResolveGifQuery and other components.
Also preserve alt text through serialization by storing it in URL
query params alongside dimensions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: load draft preview images and get dimensions
Fix draft preview images not showing on web and add proper aspect
ratio support:
1. Try to load all images regardless of the exists cache flag, which
may be stale due to async cache population timing
2. Use Image.loadAsync() from expo-image to get image dimensions
3. Pass dimensions to viewImages for proper aspect ratio in previews
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: update save prompt copy when editing existing draft
When editing an existing draft (vs creating a new one), use "Save
changes" instead of "Save draft" in the save/discard prompts. This
provides clearer context to the user about what action they're taking.
Add isEditingDraft prop to DraftsButton and ComposerTopBar, and
update both prompts (in DraftsButton and Composer) with conditional
copy based on whether we're editing an existing draft.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* style: add bottom padding to drafts list
Add pb_xl padding to the drafts list content container for better
visual spacing at the bottom of the list.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: use typed error check for draft limit
Replace manual error object inspection with the proper
AppBskyDraftCreateDraft.DraftLimitReachedError type check for
cleaner and more reliable error handling.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* make storage functions async to match web
* log unknown errors
* delete left-over file
* move state to colo with composer
* fix: handle invalid GIF dimensions gracefully
Fix NaN aspectRatio when rehydrating GIFs from drafts by:
1. Adding validation in parseTenorGif to reject invalid dimensions
(NaN, zero, or negative values)
2. Adding defensive checks in GifEmbed to fallback to 1:1 aspect
ratio if dimensions are invalid
3. Adding defensive checks in composer ExternalEmbedGif to fallback
to 16:9 if gif.media_formats.gif.dims is missing or invalid
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: prevent double query string in GIF draft hydration
When loading a GIF from a draft, the URL was being corrupted with
double query strings like:
`?ww=498&hh=498?hh=498&ww=498`
This happened because:
1. serializeGif() adds ?ww=X&hh=Y&alt=Z to the Tenor URL
2. parseGifFromUrl() returned the full URL including our params
3. resolveGif() in resolve.ts then appends MORE params via string
concatenation, creating a second ?
Fix: Strip our custom params (ww, hh, alt) from the URL in
parseGifFromUrl() before returning it, so the reconstructed GIF
has a clean base URL.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix draft button behaviour when publishing, tweak buttons
* ensure media unavaiable message is contrasty enough
* infinite query, rename file to queries
* simplify threadgate/postgate handling
* refactor: pass full draft data instead of re-fetching
The useLoadDraft and useDeleteDraftMutation hooks were fetching drafts
via getDrafts() to look up a draft by ID. This was problematic because
getDrafts is paginated, so drafts not on the first page wouldn't be
found.
Changes:
- Add full Draft object to DraftSummary type
- useLoadDraft now takes Draft directly (only loads local media)
- useDeleteDraftMutation now takes {draftId, draft} to avoid re-fetch
- Update DraftItem and DraftsListDialog to pass full draft data
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix type errors
* docs: add notes on platform files and paginated APIs
- Platform-specific files (.web.ts, .native.ts) are resolved by the
bundler automatically - just import normally, don't use require()
- Paginated APIs should use useInfiniteQuery, not useQuery
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* More CLAUDE.md updates
* Delete PLAN.md
* Use minimal media mode for draft display - REVERT IF NEEDED
* Enable pagination
* Add comment about headers
* remove extraneous comments
* Prevent runaway pagination
* fix detection rebase change
* use border_transparent
* Replace idb with idb-keyval for draft media storage
Simplifies web IndexedDB storage by using idb-keyval instead of the
full idb library. This reduces bundle size and aligns with the pattern
used in src/storage/archive/db/index.web.ts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix native draft media filename encoding
The previous approach replaced both / and : with _, but the reverse
transformation couldn't distinguish between them. This caused cache
misses for paths containing both characters.
Use encodeURIComponent/decodeURIComponent for a proper reversible
encoding.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* convert useLoadDraft() hook to regular async function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* update atproto api
* clean up orphaned media
* restore videos
* save/restore captions
* restore postgates
* Copy updates from Darrin
* Ope fix missed vertical props
* get image aspect ratio when restoring
* get videos working on native
* get video restoration working on native
* sanitize handles properly in draftitem
* fix yarn.lock
* Swap console logs
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Use CSS-based %c styling for browser consoles instead of ANSI escape codes, which don't render properly in Firefox. Keep ANSI codes for native/terminal environments.
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Adds preload={false} to KeyboardProvider to prevent unnecessary keyboard controller initialization during app startup.
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Drill down an `enabled` prop to ThreadItemAnchorFollowButtonInner so
that the GrowthHack wrapper is always rendered on iOS, even when the
follow button shouldn't be displayed. The inner component returns null
when disabled, allowing GrowthHack to render its logo without children.
Co-authored-by: Claude <noreply@anthropic.com>
* WIP
* Clean up growthbook code, integrate into init and sessions
* Move everything out of React
* Add metrics client
* Move to separate file
* Shared metadata cache
* Ensure we update metadata when session ID changes
* Ensure userMetadata is cleared when logging out
* WIP revamp
* Integrate feature gates into analytics context
* Clean up old code
* Fix useMeta util
* Some comments and cleanup
* Add logger to base analytics context
* Refactor current route handling
* Rip out LogEvent from navigation
* Update tracking endpoint
* Migrate toClout
* Clear out statsig client
* Add todo, reset logger readme
* Ope fix statsig noop
* Refactor logging in feed-feedback, add debug logging to metrics client
* Remove LogEvents alias for Metrics
* Prefer root package export
* Remove Metrics alias from logger
* [APP-1782] Migrate to new analytics APIs (#9735)
* Migrate logEvent to useAnalytics
* Migrate logger.metric to useAnalytics
* Migrate tricky spot, fix types
* Migrate remaining tricky spot
* Missed one
* Remove metric() from logger
* Migrate useGate to useAnalytics
* Remove all other StatSig mentions
* Update event payload
* Update logger tests
* Mock expo method
* Fix session ID bug
* Add session ID test
* Add test for metrics client
* Clarify intent
* Clean up core analytics file
* Clean up the call once utils
* Fix TODO
* Fix TODO
* Fix TODO
* Fix TODO
* Fix TODO
* Remove debug code
* Fix navigation context
* OK nav context is not working, todo
* Checkpoint: works but feels hacky
* Fix navigation context issue
* Improve feature API
* Improve metric logging
* Update logger tests
* Upgrade ESLint to v9 with flat config
- Upgrade eslint from v8 to v9.18.0
- Migrate from .eslintrc.js to eslint.config.mjs (flat config)
- Upgrade typescript-eslint to v8.20.0 (unified package)
- Replace eslint-plugin-import with eslint-plugin-import-x for flat config support
- Add globals package for environment globals
- Update eslint-plugin-bsky-internal with proper meta objects for ESLint v9
- Fix deprecated context.getScope() API usage
- Update bskyembed to use flat config
- Remove deprecated --ext flag from lint scripts
- Configure rules to maintain previous behavior while using new ESLint version
* Fix varsIgnorePattern to require character after underscore
Restore the original pattern `^_.+` instead of `^_` so that lingui's
`const { _ } = useLingui()` will still be flagged when unused.
* Update ESLint rule tests for flat config format
- Update RuleTester to use flat config languageOptions instead of
eslintrc parser format
- Remove duplicate test case that ESLint v9 now detects
- Add Jest globals for test files
* update eslint package versions
* lint android a11y
* enable typechecked rules, switch them to warn
* fix yarn lock ci
* Fix CI failure
* Remove unused globals?
* Organize a bit, add quiet to main lint command
* Allow ternary
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Eric Bailey <git@esb.lol>
* prevent flash of wrong theme on startup
* move bg color to #root
* Update and use existing system
* Darken slightly, better contrast
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* fix: make logo show in qr code by absolutely positioning svg on top of it
* fix: remove log and add explanation comment
* fix: only apply qrcode fix to web
Co-authored-by: Elijah Seed-Arita <elijaharita@gmail.com>
* Add cashtag support for stock ticker discussions
Display cashtags ($TICKER format) as clickable links with dedicated menu actions and search feed, alongside hashtags. Includes composer highlighting and proper formatting.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* Fix cashtag search query to use # prefix
Cashtags need to be searched as "#$BTC" rather than just "$BTC" to work
with the search API.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update @atproto/api to 0.18.14 with cashtag support
The updated package includes native CASHTAG_REGEX detection for stock
ticker symbols like $AAPL and $BTC.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix todo, remove redundant validation
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: Eric Bailey <git@esb.lol>
* Add comprehensive CLAUDE.md development guide
Document the codebase architecture, styling system (ALF), component patterns
(Dialog, Menu, Button), i18n with Lingui, state management with TanStack Query,
and navigation patterns to help Claude work effectively in this codebase.
* Add footguns section to CLAUDE.md
Document critical pitfalls including:
- Dialog close callback pattern (control.close(() => ...)) for avoiding
race conditions with navigation, state updates, and opening other dialogs
- Controlled vs uncontrolled input guidance
- Platform-specific component behavior differences
* Add React Compiler note to footguns section
Document that useMemo/useCallback are unnecessary since React Compiler
handles memoization automatically. Only use them for specific cases like
effect dependencies or non-React library interop.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add conductor setup and run scripts that install dependencies and start the dev server with a dynamically allocated port.
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Patches react-native-pager-view to handle iOS 26's
interactiveContentPopGestureRecognizer, using the same logic that
already exists for RNSPanGestureRecognizer: on the leftmost page,
disable the scrollview's pan gesture to let the back gesture through.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Configure concurrency groups so only one iOS build and one Android build
can run at a time across all workflows. This prevents manual builds from
conflicting with automatic builds triggered by fingerprint changes.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* use English for Esperanto `intl-displaynames` until bug is fixed
* Update src/locale/i18n.ts
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Add dismiss button to user suggestions
* Adds dismiss button to suggested user cards, behind a feature gate
* Reverse gate check, best practice
* Sync DISMISS_ANIMATION_DURATION
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Handle download link
* Improve NUX geo gating from #9549
* Fix alignment of phone code select
* Show full name
* Add gate to nux banner
* Add gate to settings screen
* Invert gate check in settings, whoops
* implement sitemap handlers for users
* ensure compressed payload is passed through
* improved handling
* reverse header order
* add the sitemap to robots.txt
* add telephone code select
* add flags
* run svgo on flags
* get it somewhat working on web
* get web closed state working
* verify country code we get from geo
* trim down names to shorter common versions
* add labels to other selects
* make international tel codes a static object
* add component to storybook
* Update src/lib/international-telephone-codes.ts
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* update to new geo hook
* use Intl.DisplayNames, add polyfill
* use in rather than keys().includes()
---------
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Hook up suggestedUser:seen client events
* Fix crash when clicking "find people to follow"
* While we're at it, fix the position of the X button on the "find people to follow" modal
* Add suggestedDid and category attributes to suggestedUser client events
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Clicking "see more" on user suggestions now opens modal
* More conventional pattern
* Remove unneeded optional
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Age Assurance V2
* Tighten up test
* Add todos for sdk migration
* Align RQ versions
* Use useEffect for side effect
* Improve effects, memoize
* Standarize on birthdate
* Copy feedback
* Copilot
* Add support link
* Reove double ..
* Cleanup
* Remove redirect dialog
* Cleanup todos, add comments
* Update splash in main template too
* Mock some stuff
* Exhaustive checks
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Exhaustive checks
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Small fix to bday handling
* Add comment
* onboarding style tweak
sneaking this in sorry!
* rm unreachable breaks
* Put useIntentHandler back on web
* Remove misleading success set
* Align on birthdate
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* use xlarge runner for macos build
* try and fix yarn cache
* update actions/cache for pods step
* use expo github action main rather than v8
* update all actions to the same
* use yarn cache where missing
* Adds post:view client event tracking in feeds
* Add post:view event on the post page itself
* Don't send post:view to statsig for now
* convert to non reactive callback to reduce rerenders
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Add parameters to profile:follow
Track who was followed, whose profile generated the follow, and the position of the person who was followed in the list
* Add profileCard:seen event
* Don't send "profileCard:seen" event to Statsig
* Clean up
* prevent overzealous clearing
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Adds a "follow back" button to follow notifications
* get shadowcache logic working, strip out manual optimistic update
* whoops, don't just stick any old profile in there
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* new segmented control
* fix type error
* convert server input, use CSS for web
* add segmented control to storybook
* use segmented control in embed dialog
* add to suggested text wrappers
* update change handle dialog
* update styles since button changes
* fix atom
* style updates to segmented control, add size prop
* update state in layout effect rather than in render
* set type = 'radio' as default
* prevent expansion in server dialog on iOS
* use non reactive callback in needsUpdate effect
* give video a black background on web
* Video crop on web tweaks (#9371)
* Remove video embed crop option to reduce confusion
* Improve default thumb and border on web
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* tweak in-post threadgate button
* tweak composer threadgate button
* reduce date length slightly
* pressed styles
* make date length depend on breakpoint
* add chevron to label btn
* add tiny chevron, special-case button icon width
* [Threadgate] Add hint (#9350)
* get tooltip working on web
* add compatibility layer for working in iOS sheets
* add timeout to profile tooltip now that it appears instantly
* rm debug code
* Update ThreadgateBtn.tsx
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* remeasure when keyboard changes
---------
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* fix types
* [Threadgate] Refresh dialog (#9342)
* wip new ui
* update threadgate dialog with new designs
* restore nobody option
* relayout android sheet when ratio changes
* fix ratio changing case in bottom sheet
* timebox reached, use setTimeout
* update panel styles
* missing imports
* extract out Panel
* tweak layout animation
* fix icon color
* use same color mechamism for icon as text
* restore the header
* refreshed toggle styles (#9343)
* [Threadgate] Persist settings (#9341)
* add persist toggle to threadgate dialog
* move state back down
* sort out spacing
* wire up query
* @surfdude29 tweaks
* use tiny chevron in WhoCanReply
* wait for prefetch before opening
* move Panel into the Toggle namespace
* default -> pref
* use medium date length
* rm hover state from web selects, fix border radius
* fix key issue in Selects
---------
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Fixes a ts error caused by welcomemodal styles on logged-out homepage
* use flatten util instead
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* prevent sparse arrays in snapToOffsets
* wait, sparse arrays don't work like that
* more readable check even if it's technically useless
* make the second check actually work
* feat: PostControlsSkeleton (#9205)
* feat: new PostControlsSkeleton component
* feat: integrate PostControlsSkeleton into other usages
* fix: shrink skele pill and circle sizes a bit
* Couple small tweaks
(cherry picked from commit f6a38ec42274bffc41b2898d8addb735791494fd)
---------
Co-authored-by: Elijah Seed-Arita <elijaharita@gmail.com>
* minor perf improvement on android for lightbox
* Use correct `cachePolicy` when prefetching lightbox images (#9275)
* use `memory` cachePolicy when prefetching
* use `memory` cache policy on iOS lightbox images
* add tinted icon style
* new dark icon
* use icon composer file
* rename some icons, ensure default ios is still there
* use solid fill instead of auto gradient
* fix web build
* back to gradient
* add . for consistency
* rename `default_old` to `legacy`
Prevents AccordionAnimation from animating open on web when suggestions array is empty by adding conditional rendering logic to AnimatedProfileHeaderSuggestedFollows component.
* clarify in content hider if label is on overall account
* fix bool typo
* Update src/components/moderation/ContentHider.tsx
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* rename variable for clarity
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* move interests clientside
* add finance
* try and ensure there's always data for the "all" category
* add empty state for suggested accounts
* simplify error wording
* Fix computation of isLastSibling and isLastChild to account for muted or
otherwise hidden replies
* Update comments
* isLastSiblingByCounts isn't needed, should rely only on the count of replies seen
* The counters serve the same purpose, we only need to know the count of the actual replies rendered to the view in order to calculate the replyIndex
* Remove redundant check
* Remove remaining usages of old post thread query
* Add PostThreadContext, cache mutator for threadgates on threads, pipe it through
* Replace getPostThread in threadgate query
* Replace in initQuote handling, which isn't even used rn...
* Missing import
* Revert ext change
* the reply button should open the replies to a post, not present a text input for you to enter your Big Thought into. i think a lot of people don’t even realize that the point has already been written
* Feature gate, fix event
---------
Co-authored-by: Eric Bailey <git@esb.lol>
When the user clicks the search button next to "Discover New Feeds" or "Suggested Accounts" on the Explore page, we'll auto-select the respective search results tab (feeds or users).
* use 16kb-compatible fork of react-native-mmkv
* avoid using package alias
* specify ndk version
* Revert "specify ndk version"
This reverts commit 577393518e.
* add compiler flags to mmkv build (bump version)
* move fork to bsky repo/npm org
* Rip out the network hack in favor of bluesky-social/atproto#4238
* Bump api pkg
* Debug code
* Revert "Debug code"
This reverts commit 38445f31f4.
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* tighten eslint config to catch unused `useLingui`s
* fix now-invalid uses of _
* remove unused function that produces a ton of eslint warnings
* upgrade react compiler plugin
* feat: don't retain accepted language suggestion after finishing or exiting post (#8886)
* feat: don't retain accepted language suggestion after finishing or exiting post
* fix: rebase fixes
* fix: rebase fixes
* chore: lint
* Rename onChange for clarity
* Improve logic in composer
* Handle user override more explicitly
* Drill in onSelectLanguage callback into dialog too
* Fix typo
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Make text crystal clear
* Handle multiple languages
---------
Co-authored-by: Elijah Seed-Arita <elijaharita@gmail.com>
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* constraint video max height to 14/9
* Apply new default to web video embed too
* Retain web handling
* Rename prop for clarity
* Align no-crop handling on native/web
* make it always constrained
---------
Co-authored-by: Eric Bailey <git@esb.lol>
Enable rich link previews when feed URLs are shared in iMessage, Slack, and other social platforms. Adds feed title, description, creator info, and avatar images to improve sharing experience.
* Translation comment
* Fix error handling in starter pack generation
* Allow access to DM settings for age restricted users
* Leave post stat unit formatting up to translators
* tweak string in BlockedGeoOverlay.tsx
* tweak string in AgeAssuranceAccountCard.tsx
* tweak string and labels in DeviceLocationRequestDialog.tsx
* prettier
* add missing `.` in DeviceLocationRequestDialog.tsx
* Adds welcome modal to logged-out homepage
* Adds metrics and feature gate for welcome modal
* Slightly smaller text for mobile screens to avoid wrapping
* Remove unused SVG
* Adds text gradient and "X" close button
* Fix color on "Already have an account?" text
* tweak hooks, react import
* rm stylesheet
* use hardcoded colors
* add focus guards and scope
* no such thing as /home
* reduce spacign
* use css animations
* use session storage
* fix animation fill mode
* add a11y props
* Fix link/button color mismatch, reduce gap between buttons, show modal until user dismisses it
* Fix "Already have an account?" line left-aligning in small window sizes
* Adds "dismissed" and "presented" metric events
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Previously, pins were included for both 'posts_with_replies' and
'posts_and_author_threads' filters. This change restricts pin inclusion
to only the 'posts_and_author_threads' filter, ensuring correct feed
behavior and reducing unnecessary data in other filter modes.
* get e2e image picker working
* verify create account actually reaches onboarding
* wait for image to actually be attached before posting
* wait until login finishes before moving on
* sign out before switch accounts then wait until logged in
* disable onboarding experiments in e2e
* add testId to handle availability checkmark
* fix too long username
* update thread muting test to reflect current behaviour
* hackfix for the british english translation
* unflake the onboarding tests
* fix curate list flow
* admit defeat on the most list one
* Bump picker, add patch for next version
* Revert "Bump picker, add patch for next version"
This reverts commit a4aab0bdcd.
* Update to latest picker@next
* add context in VerificationsDialog.tsx
* add context in VerifierDialog.tsx
* add context in VerificationSettings.tsx
* add context in EditProfileDialog.tsx
* add context and tweak label in ChangeHandleDialog.tsx
* tweak label in ContentHider.tsx
Replaces NoSnippetWrapper with a dataSet prop on the root View to
control the nosnippet attribute for discover feeds. This simplifies the
component structure and improves maintainability by reducing unnecessary
wrappers.
* [APP-1303] Redesign/refactor post language select (#8884)
* Nightly source-language update
* Nightly source-language update
* [APP-1303] Redesign/refactor post language select
* update: stylesheets.create to use the latest structure
* update styles to modern structure
* update: dialog breakpoints on web and delete depricated language modals
* remove unused post languages settings dialog
* restructure Post languages dialog
* place the Dialog.Close inside the Dialog.ScrollableInner
* add: language search
* update search and language variables for clarity
* fix: memoize language state lists
* chore: add comments
* update proper colors to the background
* add back older error boundary
* add: tweaks to the mobile and web responsiveness
* add tweaks to center the container
* update labels
* update button and border
* added translation updates
* Update: text input to reuse search input
* remove unused file
* update: web breakpoints
* run eslint and prettier
---------
Co-authored-by: Elijah Seed-Arita <elijaharita@gmail.com>
Co-authored-by: Anastasiya Uraleva <anastasiya@Anastasiyas-MacBook-Pro.local>
Co-authored-by: Anastasiya Uraleva <anastasiya@Mac.localdomain>
* rm old file
* sort out styles, add FlatListFooter component
* rm cancel button in favor of search input X
* get dialog height working on iOS
* delete `DropdownButton`
* hide scroll indicators on android
* ios scroll indicator insets
* get footer sorta working on android
* change button color on press
* rm empty file
---------
Co-authored-by: Anastasiya Uraleva <anastasiyauraleva@gmail.com>
Co-authored-by: Elijah Seed-Arita <elijaharita@gmail.com>
Co-authored-by: Anastasiya Uraleva <anastasiya@Anastasiyas-MacBook-Pro.local>
Co-authored-by: Anastasiya Uraleva <anastasiya@Mac.localdomain>
* Split out into macro component
* Add Action component
* Add fallback
* add button to view post after sending
* Dismiss toast when clicking action button
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* update vite+typescript
* update atproto api to latest, split out utils
* add checkmark to post
* add checkie to embed
* revert change to example post
* fix ext link color
* Delete root PostThread component
* Remove PostThreadItem, migrate DebugMod to use new components
* Remove other unused components
* Move PostThreadFollowBtn to new home
* Move PostThreadComposePrompt to new home
* Remove gate
* Keep naming in DebugMod
* rm v1 prefs
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
- Rename filter from 'canonical' to 'canonicalize_url' to follow Pongo2
naming conventions
- Update function name from filterCanonical to filterCanonicalizeURL
- Update template usage in post.html and profile.html
- Update test function name and all references
Refactored the "See more accounts you might like" card to use ButtonIcon
and ButtonText for improved consistency and accessibility. Updated
styles for better alignment, spacing, and visual hierarchy. Navigates to
the Explore page when pressed.
Use canonical filter on requestURI in canonical link tag while preserving
original URL with parameters for og:url metadata. This provides clean
canonical URLs for search engines while maintaining full Open Graph URLs.
Uses canonical filter for canonical link tags while preserving original URLs with parameters for og:url metadata, improving SEO through proper URL canonicalization
Addresses community feedback about canonical URLs being misleading
when they include UTM parameters. The new Pongo2 filter creates
clean canonical URLs while preserving tracking parameters for
social sharing.
Updated ViewMoreCard to use a Button component instead of a styled View
for the 'View more' action. This improves accessibility and consistency
with other interactive elements in TrendingVideos.
Moved the 'View more' card logic into a separate ViewMoreCard component
for better separation of concerns and readability.
Updated imports to use named React hooks instead of React namespace. To
modernise this old component per the new guidelines.
Some browsers exit fullscreen when the escape key is pressed without `preventDefault()` being called; we don't want that when we're handling the press ourselves.
* Integrate Sonner for toasts
* Fix animation on iOS
* Refactor API
* Update e2e file
* [APP-1318] Post composer: combine image & video buttons (#8710)
* add: select media btn
* udpate: compose post with combined image and video support
* add: video combine button with edge cases
* add select media btn
* test: select media btn
* add: media button update
* remove unused files and update toast on android
* update: make strings shorter
* add: ValidatedVideoAsset type
* update link comments and add toast support for native and web
* rebase latest toast and update toast structure
* remove unused prop
* fix types
* undo changes to yarn.lock
* remove: support for mkv files
* update: eslint and prettier
(cherry picked from commit f69779ee130f07e1c49219b53117e3bdd1a9f81b)
* Add missing props to launchImageLibraryAsync
(cherry picked from commit 2e80ae561fd66850f787cac0aae0fa5a6980f8f5)
* Rough out new approach
(cherry picked from commit 9add225160e7e407befc73e9cdd9743a30cdf1cd)
* Comments and cleanup
(cherry picked from commit e69bd186e7335372f440c446ae6643ed0fb15db9)
* Handle native case
(cherry picked from commit 74e38acdfd9181d0557426691fcbcbf0800481ca)
* Refactor
(cherry picked from commit 68aea496db8df54dba5f58da267ad962c28ef995)
* Rename
(cherry picked from commit 8609e59ad14219e7378ee6cb9514d633ce7efc27)
* Cleanup, comments
(cherry picked from commit 6c9c98648e37257285a9c8caeb1eadcc56c81402)
* Rename
(cherry picked from commit 66e3db539d5baa41436c9e49af06e87a78e9e7e1)
* Handle selectionLimit on Android
(cherry picked from commit 251f06dd5e65a7083b810bad3d81114b2fe9ab39)
* create composer images in parallel
(cherry picked from commit 70ea79d9d76d99e9c99a7d2296caed84c718650e)
* Update toast API usage
(cherry picked from commit e370018b8ed8cdfd7675c9634058c72cb59d39de)
* Ensure once one type of media is selected, you can only select more of that type
(cherry picked from commit 1a9e6e0cdb5234667f08e3dd9107ae598941fc23)
* Remove TODO and debug code
* Add more descriptive a11y label to button
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Add back post success toast
* Include mimeType in toast error
* Remove unneeded toast
* Clarify hint
* Typo
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* allow gifs on native, just treat as images
* disable haptic toast
* allow gifs on native, treat as videos
* only do keyboard dismiss on native
* tweak pasting logic
* hide web scrubber in certain situations
* Update MaxImages translation
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Add plural formatting to a11y hint translation
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* fix suggestion
* Protect against no valid assets selected
* Handle conversion of too-big assets on web
* Reorder
* Bump expo-image-picker to include bug/perf improvements
See https://github.com/expo/expo/blob/main/packages/expo-image-picker/CHANGELOG.md#1700--2025-08-13
* Handle edge case validations
* Ok actually bump expo-image-picker
* Comment
* HEIC support Android
* Fix handling for new picker version, improve size validation
* Remove getVideoMetadata handling, no longer needed
* Handle web video duration
* Update src/view/com/composer/SelectMediaButton.tsx
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
---------
Co-authored-by: Anastasiya Uraleva <anastasiyauraleva@gmail.com>
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* set size=small buttons to `text_sm`
* change to `leading_snug`
* add gap to repost buttons
* Add medium-weight font, use for buttons (#8819)
* add medium weight inter
* add medium font to buttons
* Adjust bold weights
* Fix ref
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Align with designs
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* add context and comment for translators to button text in email verification dialog
* shorten comment
* add comment for other string
* tweak comment
* tweak again
* use intents to translate text on android
* clean up config plugins
* restore day night plugin
just to be safe
* leave a comment for why we can't open translate directly
* add todo
* fix lockfile lint
* check handle as you type
* metrics
* add metric types
* fix overflow
* only check reserved handles for bsky.social, fix test
* change validation check name
* tweak input
* move ghosttext component to textfield
* tweak styles to try and match latest
* add suggestions
* improvements, metrics
* share logic between typeahead and next button
* Apply suggestions from code review
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* update checks, disable button if unavailable
* convert to lowercase
* fix bug with checkHandleAvailability
* add gate
* move files around to make clearer
* fix bad import
* Fix flashing next button
* Enable for TF
---------
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
Co-authored-by: Hailey <me@haileyok.com>
Co-authored-by: Eric Bailey <git@esb.lol>
* Only enable policy update overlay once the actual Overlay mounts (after onboarding and all that)
* Disable policy overlay in e2e
* Add comments
* Add extra insurance
* Rm log
* Fix shared prefs test
* Fix login flows by optionally closing 'Remember password' system dialog
* Return missing testID
* Bump dev-env
* Only enable policy update overlay once the actual Overlay mounts (after onboarding and all that)
* Disable policy overlay in e2e
* Add comments
* Add extra insurance
* Rm log
* Rm gradient buttons from Storybook
* TEMP move storybook button section
* Remove gradient_sky
* Remove actual defs for gradient_sky and gradient_primary
* Remove other gradient defs
* Remove gradient support entirely
* Deprecate 'variant' in favor of 'color'
* Fork base styles codepath to make variant deprecation more obvious
* Remove text styles for when no color is set, never been used
* Fork text styles codepath to make variant deprecation more obvious
* Revert temp storybook commit, remove deprecated values
* Replace remaining gradient button usage
* Update Buttons storybook section
* Update tiny styles
* Update small styles
* Update large sizes
* Ensure proper alignment of buttons in storybook
* Update button colors
* Rename negative_secondary to negative_subtle
* Remove unnecessary select()
* Update icon size and gap
* Update negative_subtle styles
* Custom button colors
* Add borderCurve
* update: toast colors for accessibility
* update: toast color codes from figma
* condense the colors to remove select calls that are unecessary
* remove unused select
* Revert "[APP-1083] bug fix: videos not accurately autoplaying on web (#8692)"
This reverts commit 9aa35e9fbb.
* fix overflow hidden breaking the video viewport observer
* update: auto play video on web with intersection position
* place back the threshold: 0.5
* update: optimize the intersection observer with a throttled scroll listener
---------
Co-authored-by: Anastasiya <anastasiya@Mac.localdomain>
Co-authored-by: Anastasiya <anastasiya@Anastasiyas-MacBook-Pro.local>
* Rm gradient buttons from Storybook
* TEMP move storybook button section
* Remove gradient_sky
* Remove actual defs for gradient_sky and gradient_primary
* Remove other gradient defs
* Remove gradient support entirely
* Deprecate 'variant' in favor of 'color'
* Fork base styles codepath to make variant deprecation more obvious
* Remove text styles for when no color is set, never been used
* Fork text styles codepath to make variant deprecation more obvious
* Revert temp storybook commit, remove deprecated values
* Replace remaining gradient button usage
* Reorg
* Move animation into css file
* Update style comment
* Extract core component, use platform-specific wrappers
* Pull out platform specific styles
* Just move styles into Toast component itself
* Rename cleanup
* Update API
* Add duration optional prop
* Add some type docs
* add exp eased slide aniamtions
* Make toasts full width on mobile web
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Clean up env files
* Use new env in Sentry setup file
* Use new env in Bitdrift setup file
* Use new env in chat proxy header
* Prefix Bitdrift key with EXPO_PUBLIC
* Deprecate SENTRY_RELEASE since we use package.json now
* Use existing EXPO_PUBLIC_BUNDLE_IDENTIFIER short commit has as Sentry dist value
* Fix missing bundle identifier for Render deploys
* Deprecate SENTRY_DIST in favor of EXPO_PUBLIC_BUNDLE_IDENTIFIER
* Prefix SENTRY_DSN with EXPO_PUBLIC to match others
* Remove debugging field
* Replace NODE_ENV in places where its safe
* Self review
* Properly patch Sentry package
* Echo variables to .env in Dockerfile instead of passing to shell script
* Make sure EXPO_PUBLIC_ENV is set for web container builds
* Update IS_TESTFLIGHT to include testflight-android
* Slice bundle hash to match other platforms, needed for render.com deployments
* [APP-1331] Migrate `app-info` to new env (#8703)
* Move env files into directory with platform specific files
* Migrate usages of app-info to new env
* Fix bad import
* Update BUNDLE_DATE format comment
* Trim RENDER_GIT_COMMIT to first 7 to match --short sha
* Clarify build process env vars and ensure they are explicitly passed in
* Revert Sentry patch as a result of prev commit
* Update webpack Sentry dist value based on prev commits
* Add PACKAGE_VERSION and replace in statsig to fix conflict
* Fix render substitution syntax
* Remove invalid syntax
* Remove unnecessary testflight check
* Just use long commit hash
* Slice full hash for display in app
* Fix missing space in ios workflow
* Pass in sentry CLI env vars, align matching values
* Align on RELEASE_VERSION
* Add new env setup to missed OTA spot
* Update webpack to use same SENTRY_RELEASE var
* Just fallback to package version for Render deploys
* Remove TF check for BUNDLE_DATE
* Set EXPO_PUBLIC_ENV for bundle update
* Consistent naming "Env"
* Add comment
* Use RELEASE_VERSION instead of package.json
* Update PR comment CI
* make sure request is fetched before returning true
* Ensure preferences object skips equality checks if overridden
---------
Co-authored-by: Eric Bailey <git@esb.lol>
Changed the TrendingVideos dismiss button to use solid variant and
square shape for improved visibility. Also set ButtonIcon size to "sm"
for better alignment with the new button style.
Reduced top padding from large to small and updated horizontal padding
handling for the TrendingVideos component. Increased card gap and snap
interval from small to medium.
Added a border and low contrast border color to CompactVideoPostCard,
CompactVideoPostCardPlaceholder, and TrendingVideos card components for
improved visual separation.
Added a small shadow (shadow_sm) to the CompactVideoPostCard and the
"View more" card in TrendingVideos for improved visual depth and
consistency. This enhances the card appearance and aligns with the
design system.
Added overflow_hidden to the main container and set overflow_visible on
the FlatList to ensure proper display of horizontally scrolling cards.
This resolves clipping issues and improves the visual layout of trending
videos.
Added the `overflow_visible` atom to the atoms utility object for
setting CSS overflow to 'visible'. This complements the existing
`overflow_hidden` atom and improves flexibility for layout styling.
* replace resumeSession with getSession
* copy lil type tweak from the other PR
* Add partialRefreshSession to session API context, use session state to infer state further down tree
* Review
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* feat(ui): add showLikeCount flag to CompactVideoPostCard
Introduced a showLikeCount flag to control the display of like count in
the CompactVideoPostCard component. The like count is now only shown if
both likeCount > 0 and showLikeCount are true. This allows for more
flexible UI configurations and easier toggling of like count visibility.
* fix(ui): hide gradient shadow when hiding like count
* fix(ui): increase trending video profile pic size from 20 -> 24
* fix(ui): add small drop shadow to trending video profile pic
* fix(ui): a.shadow_sm -> t.atoms.shadow_sm based on PR feedback
"Following" has different translations as a name of a feed and the state of following someone in other languages like Turkish. This allows "Following" as a feed name translated correctly.
(cherry picked from commit d92a7f163ed9e28ee4ebab230758b1f00bdd9966)
Co-authored-by: Sedat Kapanoğlu <sedat@kapanoglu.com>
The colons in file names break Windows compatibility and prevent Bluesky from being developed on Windows. (Regression: Bluesky Git repository always shows missing files on Windows #8263)
* add getInitialURL
* get deep linking working
* actually handle as push instead
* push to route instead of setting initial path
* pop to on top of notifications
* fix comment
* change chat-message handling
* add metrics
* don't reopen due to notif multiple times
* extract data from notification differently on android
* sorry sorry annoying naming nits, align logger
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* fix quote padding not being pressable
* fix list padding not being pressable
* Fix unnecessary loading of feeds (#8578)
* stop layout shifts in feed loading
* don't load feed data if we already have it
* adjust styles, alf stuff
* remove unused button, massively simplify
* fix layout shifting in notifs
* use feedcard for feed post embeds
* use bold text to match other style
* use Link component rather than jank Pressable
* prevent nested anchors in notifs
* match following text size
* add space between content hider
* Better dead feed handling (#8579)
* add space between content hider
* add handling for feeds that fail to load
* cleanError, in case of network funkiness
* handle deleted lists
* split out missingfeed
* Working overlay, WIP
* Ok working with no overlay and global gesture handler
* Ok pretty good on native
* Cleanup
* Cleanup
* add animation
* add transform origin to animation
* Some a11y
* Improve colors
* Explicitly wrap gesture handler
* Add easier abstraction
* Web
* Fix animation
* Cleanup and remove provider
* Include demo for now
* Ok diff interface to avoid collapsed views
* Use dimensions hook
* Adjust overlap, clarify intent of consts
* Revert testing edits
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Temp ignore a couple logs
* Add debug for unknown notifications
* Nvm let's do this in Sentry
* Downgrade two DMs network related issues
* Check for network errors before sending in Convo
* Do the same for event bus
* Fix mistake
* Move all dialogs within NavigationContent on native
* Ok leave old ModalsContainer alone for now
* Do the same on web
* Gate browser consent dialog just to be clear
"text": "Android production build for Google Play Store submission is ready!\n```Artifact: ${{ steps.upload-artifact-production.outputs.artifact-url }}\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_ANDROID_VERSION_CODE }}```"
{"text": "Android production build for Google Play Store submission is ready!\n```Artifact: ${{ steps.upload-artifact-production.outputs.artifact-url }}\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_ANDROID_VERSION_CODE }}```"}
- name:🔔 Notify Slack of Testflight Build
if:${{ inputs.profile != 'production' }}
uses:slackapi/slack-github-action@v1.25.0
uses:slackapi/slack-github-action@v2.1.1
with:
webhook:${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }}
webhook-type:incoming-webhook
payload-templated:true
payload:|
{
"text": "Android build is ready for testing. Download the artifact here: ${{ steps.upload-artifact-testflight.outputs.artifact-url }}"
"text": "iOS production build for App Store submission is ready!\n```Artifact: Check TestFlight to know when it is available\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_IOS_BUILD_NUMBER }}```"
{"text": "iOS production build for App Store submission is ready!\n```Artifact: Check TestFlight to know when it is available\nVersion Number: ${{ steps.get-build-info.outputs.PACKAGE_VERSION }}\nBuild Number: ${{ steps.get-build-info.outputs.BSKY_IOS_BUILD_NUMBER }}```"}
An OTA deployment has been requested and is now running for `${{ steps.pr-info.outputs.head-sha }}`.
[Here is some music to listen to while you wait...](https://www.youtube.com/watch?v=VBlFHuCzPgY)
---
*Generated by [PR labeler](https://github.com/expo/expo/actions/workflows/pr-labeler.yml) 🤖*
- name:Check for EXPO_TOKEN
run:>
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name:⬇️ Checkout
uses:actions/checkout@v5
with:
ref:${{ steps.pr-info.outputs.head-sha }}
- uses:pnpm/action-setup@v6
- name:🔧 Setup Node
uses:actions/setup-node@v6
with:
node-version-file:package.json
cache:pnpm
- name:Install dependencies
run:pnpm install --frozen-lockfile
- name:Lint check
run:pnpm lint
- name:🔤 Compile translations
run:pnpm intl:build 2>&1 | tee i18n.log
- name:Check for i18n compilation errors
run:if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi
# CLAUDE.md – Bluesky Social App Development Guide
This document provides guidance for working effectively in the Bluesky Social app codebase.
## Project Overview
Bluesky Social is a cross-platform social media application built with React Native and Expo. It runs on iOS, Android, and Web, connecting to the AT Protocol (atproto) decentralized social network.
**Tech Stack:**
- React 19.1
- React Native 0.81 with Expo 54
- TypeScript 6
- React Navigation 7 for routing
- TanStack Query (React Query) for data fetching
- Lingui 5 for internationalization
- Custom design system called ALF (Application Layout Framework)
Prefer using the latest features available for each of these libraries (exact versions are found in `package.json`). For example, prefer `@lingui/react/macro` over `@lingui/react`. Suggest refactoring legacy or deprecated uses.
## Essential Commands
```bash
# Development
pnpm start # Start Expo dev server
pnpm web # Start web version
pnpm android # Run on Android
pnpm ios # Run on iOS
# Testing & Quality
# IMPORTANT: Always use these pnpm scripts, never call the underlying tools directly
pnpm test# Run Jest tests
pnpm lint # Run ESLint
pnpm typecheck # Run TypeScript type checking
# Internationalization
# DO NOT run these commands - extraction and compilation are handled by CI
pnpm intl:extract # Extract translation strings (nightly CI job)
pnpm intl:compile # Compile translations for runtime (nightly CI job)
# Build
pnpm build-web # Build web version
pnpm prebuild # Generate native projects
```
## Project Structure
```
src/
├── alf/ # Design system (ALF) - themes, atoms, tokens
All user-facing strings must be wrapped for translation using Lingui. Include `comment` and/or `context` props when necessary to avoid ambiguity, e.g., “Post” as a noun vs a verb.
Prefer using `t` via `import {useLingui} '@lingui/react/macro'` vs `_` via `import {useLingui} from '@lingui/react'`. Alias `t` to `l` to avoid collisions with `const t = useTheme()`. Refactor existing uses of ``_(msg`foo`)`` to use `` l`foo` ``.
Prefer Unicode punctuation over keyboard punctuation, e.g., `“quote”` over `"quote"`. Prefer en dashes preceded by a non-breaking space over em dashes, e.g., `one – two` over `one—two`.
```tsx
import {plural} from '@lingui/core/macro'
import {Trans, useLingui} from '@lingui/react/macro'
function MyComponent() {
const {t: l} = useLingui()
// Simple strings - use the l macro
const title = l`Settings`
const errorMessage = l({
message: 'Something went wrong',
comment: 'Generic error message for unknown/unhandled errors.',
context: 'Toast',
})
// Strings with variables
const greeting = l`Hello, ${name}!`
// Pluralization
const countLabel = plural(count, {
one: '# item',
other: '# items',
})
// JSX content - use Trans component
return (
<Text>
<Trans>
Welcome to <Text style={a.font_bold}>Bluesky</Text>, {name}!
</Trans>
</Text>
)
}
```
Prefer `i18n.date` for date and time formatting. This ensures formatting is re-applied when the language changes at runtime. Refactor existing uses of `Intl.DateTimeFormat` to use `i18n.date`.
```tsx
import {useLingui} from '@lingui/react/macro'
function MyComponent() {
const {i18n} = useLingui()
const createdAt = new Date()
return i18n.date(createdAt, {
dateStyle: 'medium',
timeStyle: 'medium',
})
}
```
**Commands:**
```bash
# DO NOT run these commands - extraction and compilation are handled by a nightly CI job
pnpm intl:extract # Extract new strings to locale files
pnpm intl:compile # Compile translations for runtime
```
## State Management
### TanStack Query (Data Fetching)
```tsx
// src/state/queries/profile.ts
import {useQuery, useMutation, useQueryClient} from '@tanstack/react-query'
import {createQueryKey} from '#/state/queries/util'
/*
* Query key name should match the query hook name for consistency
*/
const profileQueryKeyRoot = 'profile'
/*
* Use object params and createQueryKey helper for better readability and to
* If cache mutation is needed, include specific interfaces for the specific
* mutations you require adjacent to the source queries. Naming should be
* descriptive of the mutation's purpose, e.g. use[Name]CacheMutation. This is
* not a strict requirement, but it's a helpful convention for discoverability
* and consistency.
*/
export function useProfileCacheMutation() {
const queryClient = useQueryClient()
return (data: Partial<Profile>) => {
queryClient.setQueryData(
createProfileQueryKey({did: data.did}),
oldData => {
if (!oldData) return oldData
return {...oldData, ...data}
},
)
}
}
```
**Stale Time Constants** (from `src/state/queries/index.ts`):
```tsx
STALE.SECONDS.FIFTEEN // 15 seconds
STALE.MINUTES.ONE // 1 minute
STALE.MINUTES.FIVE // 5 minutes
STALE.HOURS.ONE // 1 hour
STALE.INFINITY // Never stale
```
**Paginated APIs:** Many atproto APIs return paginated results with a `cursor`. Use `useInfiniteQuery` for these:
```tsx
export function useDraftsQuery() {
const agent = useAgent()
return useInfiniteQuery({
queryKey: createQueryKey('drafts'),
queryFn: async ({pageParam}) => {
const res = await agent.app.bsky.draft.getDrafts({cursor: pageParam})
return res.data
},
initialPageParam: undefined as string | undefined,
getNextPageParam: page => page.cursor,
})
}
```
To get all items from pages: `data?.pages.flatMap(page => page.items) ?? []`
**Persisted Queries**
To persist query data across app restarts, `createQueryKey` supports a third
parameter called `options`, which has a `persistedVersion` property. When this
property is set to a number, the query will be persisted.
When this property is updated (e.g. incremented), the persisted data will be cleared and replaced with the new data from the query function. This is useful for cases where the shape of the data has changed and old persisted data would no longer be valid.
- `src/components/Dialog/index.web.tsx` – Web (uses modal with Radix primitives)
**Important:** The bundler automatically resolves platform-specific files. Just import normally:
```tsx
// CORRECT - bundler picks storage.ts or storage.web.ts automatically
import * as storage from '#/state/drafts/storage'
// WRONG - don't use require() or conditional imports for platform files
const storage = IS_NATIVE
? require('#/state/drafts/storage')
: require('#/state/drafts/storage.web')
```
Platform detection (for runtime logic, not imports):
```tsx
import {IS_WEB, IS_NATIVE, IS_IOS, IS_ANDROID} from '#/env'
if (IS_NATIVE) {
// Native-specific logic
}
```
## Import Aliases
Always use the `#/` alias for absolute imports:
```tsx
// Good
import {useSession} from '#/state/session'
import {atoms as a, useTheme} from '#/alf'
import {Button} from '#/components/Button'
// Avoid
import {useSession} from '../../../state/session'
```
## Footguns
Common pitfalls to avoid in this codebase:
### Dialog Close Callback (Critical)
**Always use `control.close(() => ...)` when performing actions after closing a dialog.** The callback ensures the action runs after the dialog's close animation completes. Failing to do this causes race conditions with React state updates.
```tsx
// WRONG - causes bugs with state updates, navigation, opening other dialogs
const onConfirm = () => {
control.close()
navigation.navigate('Home') // May race with dialog animation
}
// WRONG - same problem
const onConfirm = () => {
control.close()
otherDialogControl.open() // Will likely fail or cause visual glitches
}
// CORRECT - action runs after dialog fully closes
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
This is a [React Native](https://reactnative.dev/) application, written in the TypeScript programming language. It builds on the `atproto` TypeScript packages (like [`@atproto/api`](https://www.npmjs.com/package/@atproto/api)), code for which is also open source, but in [a different git repository](https://github.com/bluesky-social/atproto).
This is a [React Native](https://reactnative.dev/) application, written in the TypeScript programming language. It builds on the `atproto` TypeScript packages (like [`@atproto/api`](https://www.npmjs.com/package/@atproto/api)), which are also open source, but in [a different git repository](https://github.com/bluesky-social/atproto).
There is a small amount of Go language source code (in `./bskyweb/`), for a web service that returns the React Native Web application.
@@ -19,7 +19,7 @@ The [Build Instructions](./docs/build.md) are a good place to get started with t
The Authenticated Transfer Protocol ("AT Protocol" or "atproto") is a decentralized social media protocol. You don't *need* to understand AT Protocol to work with this application, but it can help. Learn more at:
- [Overview and Guides](https://atproto.com/guides/overview)
- [Github Discussions](https://github.com/bluesky-social/atproto/discussions) 👈 Great place to ask questions
- [GitHub Discussions](https://github.com/bluesky-social/atproto/discussions) 👈 Great place to ask questions
- [Blogpost on self-authenticating data structures](https://bsky.social/about/blog/3-6-2022-a-self-authenticating-social-protocol)
@@ -27,6 +27,7 @@ The Bluesky Social application encompasses a set of schemas and APIs built in th
## Contributions
> [!NOTE]
> While we do accept contributions, we prioritize high quality issues and pull requests. Adhering to the below guidelines will ensure a more timely review.
**Rules:**
@@ -59,7 +60,7 @@ Please be sure to:
## Security disclosures
If you discover any security issues, please send an email to security@bsky.app. The email is automatically CCed to the entire team and we'll respond promptly.
If you discover any security issues, please send an email to security@bsky.app. The email is automatically CC'd to the entire team and we'll respond promptly.
## Are you a developer interested in building on atproto?
@@ -69,6 +70,8 @@ Bluesky is an open social network built on the AT Protocol, a flexible technolog
See [./LICENSE](./LICENSE) for the full license.
Bluesky Social PBC has committed to a software patent non-aggression pledge. For details see [the original announcement](https://bsky.social/about/blog/10-01-2025-patent-pledge).
## P.S.
We ❤️ you and all of the ways you support us. Thank you for making Bluesky a great place!
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.