about summary refs log tree commit diff
path: root/src/lib/api/feed-manip.ts
Commit message (Collapse)AuthorAgeFilesLines
* Add feed tuner to remove muted threads (#8773)kindgracekind2025-08-041-0/+16
|
* add reqId to feed feedback (#8396)hailey2025-05-211-2/+6
| | | | Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* `@atproto/api@next` integration (#7344)Eric Bailey2025-02-181-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump SDK * Use consistent type in profile query * Omit from constraint for profile shadow * Replace isRecord with isValidRecord in QuoteEmbed * Omit type from constraint for old ProfileCard * Omit type from constraint in profile queries where appropriate * Use correct type for update profile mutation * Conslidate and fix check for isValidRecord in Post.tsx * Replace isRecord with isValidRecord in PostThreadItem * Remove redundant cast in PostThreadFollowBtn * Ignore errors in DebugMod screen * Use matching type in ProfileFollows screen * Use matching type in ProfileFollowers screen * Migrate to isValidRecord in PostFeedItem * Use matching type if PostRepostedBy * Omit type from constraint in avatar props * Use matching types in NotificationFeedItem * Todo * Use isValidRecord in NotfyFeedItem * Improve MediaPreview types * Migrate another isValidRecord in NotificationFeedItem * Migrate to isValidView in queries/util * Migrate to isValidRecord in threadgate/util * Fix types in threadgates * Fix up types in starter-packs queries * Todo * Specify exact types in search-posts * Use internal type util to align types * Ditto last * Migrate postgate/index * Specify exact types in post-thread * Use correct type in post-quotes * FIX potential bug in post-thread * Use correct type in post-feed * Add correct type guards to notifications/feed * Migrate a guard in notifications/util * Migrate guard in Wizard/State * [@next] Profile handling, migrate `ProfileCard` (#7347) * Introduce new utils for profiles, migrate old ProfileCard * Rename, reorg * Add parseEmbed utils * Expand AnyProfileView to include chat profile view, update post shadow to reflect this * Cast for perf reasons * Tighten up types now that we have AnyProfileView * Add fastIsType util * Use `assertDid` Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use util types * Comment * Use fastIsType where no validation was happening before * suggestions (#7382) * suggestions * Revert unneeded changes --------- Co-authored-by: Eric Bailey <git@esb.lol> * Use new util * Rename to dangerousIsType * Convert object shape * Use dangerous util * Use dangerous util * Use dangerous util, we can trust post records * Use dangerous util * Use AnyProfileVIew * Convert object shape * Clean up handling * Patch moderateProfile to accept known profile views, to discuss * Add AnyStarterPackView and related, implement in first usage * Remove validation, fix type, fix ref * Migrate over list-conversations * Clarify intent behind precacheProfile and its unstable query cache * Clean up unstable profile cache * Fix types during label creation in PwiOptOut (#7346) * Tighten types in queries/list * Chat: use correct profile views * Chat: fix log type check * Chat: construct lexically correct shape, even though it's only internal usage * Chat: use correct profile types * Chat: fix type check in logs * Starter: use correct profile types * Starter: use correct profile types * Starter: tighten types to match lex * Any profile type will work in blocked-and-muted * Use dangerous util * Use dangerousIsType * Update new ProfileCard to use AnyProfileView * Use dangerousIsType * Remove outdated todo * Use correct profile type * Use correct profile types * Tighten up types * Use dangerousIsType * Chat: more type fixes * Remove unused file * Add a few utils * Remove unused file * Ignore feedPost.__source * Clean up types, leave validation in critical path * Use dangerousIstype * Use ANyProfileView * Use isValidRecord * Use dangerousIsType * Fix types in ListCard * Fix FeedInterstitials types * Fix types in FeedCard * Fix types in dms ReportDialog * Fix types in SearchablePeopleList * Fix bad type in composer opts * Starter: ok these need to be loose too * Clarify docs Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Less code Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports * Bump sdk, update $Typed imports * Format * Format * Fix weird TS error * Remove patch * Beter name * It's memo, can validate * Tighten up parseEmbed, dogfood * Bump sdk * Use asPredicate * Loosen types a bit * use asPredicate * Fix types * Use asPredicate * Use asPredicate * Use asPredicate * Clean up upsertProfile types * Use asPredicate * Use Un util * Fix types * Use new AnyProfileView * Use dangerousIsType * Use asPredicate * Use asPredicate * Add fallback content-type to pass typecheck * Clean up upsertProfile types * Align types * Use dangerousIsType * Use dangerousIsType * Use asPredicate * Align types * Convert findLast * Align types * Just ignore type errors and use findLast * Rename atproto -> bsky * Add validate util * Fix type error * Loosen types * Export post * rename atp bsky * Remove unused code * minor changes * Bump deps * Fix types * Tighten back up loose check * Tighten back up loose check * Fix small bug * Update comment * Revert change --------- Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
* show video feeds from posts even if they are replies (#7516)Chris Kanich2025-01-211-0/+2
| | | | | * show video feeds from posts even if they are replies * only show feed post in VideoFeed
* Revert "Show some known OP replies in Following (#5049)" (#5301)dan2024-09-121-21/+6
| | | This reverts commit bff6aedecf007a4225bf30e1800933a9005cb0b2.
* Disable in-thread deduping for reposted replies (#5135)dan2024-09-041-1/+6
|
* Mark unhydrated replies as orphaned (#5048)dan2024-08-311-1/+9
|
* Show some known OP replies in Following (#5049)dan2024-08-311-6/+21
| | | | | * Show known OP replies in Following * Fiter by >0 parent likes
* Fix language filtering for feeds (#5026)dan2024-08-291-12/+5
| | | | | * Fix language filtering for feeds * Simplify logic
* Fix orphaned feed slices, handle blocks (#4944)Eric Bailey2024-08-191-5/+26
| | | | | | | | | | | * Fix orphaned feed slices, handle blocks * Revert to filerting out orphan threads * Support NotFoundPost views too * Just kidding, use ReplyRef.root as source of grandparent data * Fixes
* Tweak feed manip to show cases of A -> B without further children (#4883)Hailey2024-08-061-8/+10
|
* Show more replies in Following (different heuristic) (#4880)dan2024-08-061-15/+79
|
* Show replies in context of their threads (#4871)dan2024-08-051-172/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't reconstruct threads from separate posts * Remove post-level dedupe for now * Change repost dedupe condition to look just at length * Delete unused isThread * Delete another isThread field It is now meaningless because there's nothing special about author threads. * Narrow down slice item shape so it does not need reply * Consolidate slice validation criteria in one place * Show replies in context * Make fallback marker work * Remove misleading and now-unused property It was called rootUri but it was actually the leaf URI. Regardless, it's not used anymore. * Add by-thread dedupe to non-author feeds * Add post-level dedupe * Always count from the start This is easier to think about. * Only tuner state need to be untouched on dry run * Account for threads in reply filtering * Remove repost deduping This is already being taken care of by item-level deduping. It's also now wrong and removing too much (since it wasn't filtering for reposts directly). * Calculate rootUri correctly * Apply Following settings to all lists * Don't dedupe intentional reposts by thread * Show reply parent when ambiguous * Explicitly remove orphaned replies from following/lists * Fix thread dedupe to work across pages * Mark grandparent-blocked as orphaned * Guard tuner state change by dryRun * Remove dead code * Don't dedupe feedgen threads * Revert "Apply Following settings to all lists" This reverts commit aff86be6d37b60cc5d0ac38f22c31a4808342cf4. Let's not do this yet and have a bit more discussion. This is a chunky change already. * Reason belongs to a slice, not item * Logically feedContext belongs to the slice * Update comment to reflect latest behavior
* Only show replies in Following if following all involved actors (#4869)dan2024-08-021-27/+17
| | | | | | | * Only show replies in Following for followed root and grandparent * Remove now-unnecessary check * Simplify condition
* Always limit Following replies to the people you follow (#4868)dan2024-08-011-12/+2
| | | | | * Limit feed replies to people you follow * Remove dead code
* Remove unused NoopFeedTuner (#4856)dan2024-07-311-10/+0
|
* Refactor feed slices (#4834)dan2024-07-251-61/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy FeedViewPost into FeedSliceItem * Explicitly construct feed slice items by copying known fields * Type rootItem as FeedViewPost for now Mergefeed logic relies on that. * Unify reason and __source for slice items * Move feedContext out of FeedSliceItem * Remove slice.isFlattenedReply * Remove unnused slice.ts * Inline slice.isFullThread * Refactor condition for clarity * Extract slice.includesThreadRoot * Encapsulate more usages of slice.rootItem into slice * Rename slice.rootItem so semi-private slice._feedPost * Move reason into slice * Simplify slice ctor argument * Reorder getters to reduce diff * Make feedContext a getter to reduce diff
* FeedFeedback fixes (#3968)dan2024-05-121-0/+4
| | | | | | | | | | | * Lower seen threshold to 1.5s * Send feedContext for replies * Use a simpler and more reliable feedContext fallback --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Dont apply the content-language filter if it will remove all content (#3492)Paul Frazee2024-04-121-5/+15
| | | | | * Dont apply the content-language filter if it will remove all content * Improve code
* Bump replies (#2604)Mary2024-02-051-3/+14
| | | | | * fix: bump replies * refactor: only bump if not at 0
* Protect against react key duplicates (close #2278) (#2309)Paul Frazee2023-12-271-9/+10
| | | | | * Fix duplicate react keys in post search * Protect against duplicate react keys in feeds
* Go back to content-driven slice keys in feeds (#2190)Paul Frazee2023-12-121-10/+10
| | | | | * Go back to deterministic react keys * Quick fix to cases when custom feeds serve empty responses
* Fix: remove replies to deleted and blocked posts from feeds (#2130)Paul Frazee2023-12-071-0/+13
|
* Fix state lifecycle management with post-feed query, solving the duplicate ↵Paul Frazee2023-11-291-16/+19
| | | | | | | key issue (#2034) * Assign keys to feed slices via a counter, to enable duplicate items in the feed if needed * Move post-feed query state into the query's page params to consistently bind their lifecycles
* Two fixes to react-key generation (#2004)Paul Frazee2023-11-271-2/+3
| | | | | * Fix missing react keys in ListMembers * Fix react key construction for the posts feed
* Refactor feeds to use react-query (#1862)Paul Frazee2023-11-101-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update to react-query v5 * Introduce post-feed react query * Add feed refresh behaviors * Only fetch feeds of visible pages * Implement polling for latest on feeds * Add moderation filtering to slices * Handle block errors * Update feed error messages * Remove old models * Replace simple-feed option with disable-tuner option * Add missing useMemo * Implement the mergefeed and fixes to polling * Correctly handle failed load more state * Improve error and empty state behaviors * Clearer naming
* Prefilter the mergefeed to ensure a better mix of following and custom feeds ↵Paul Frazee2023-09-201-12/+21
| | | | | | | | | | | | | | | (#1498) * Prefilter the mergefeed to ensure a better mix of following and custom feeds * Test suite improvements & tests for the mergefeed (#1499) * Disable invite codes test for now * Update test sim to latest iphone * Introduce TestCtrls driver * Add mergefeed tests
* Feed UI update working branch [WIP] (#1420)Paul Frazee2023-09-181-5/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feeds navigation on right side of desktop (#1403) * Remove home feed header on desktop * Add feeds to right sidebar * Add simple non-moving header to desktop * Improve loading state of custom feed header * Remove log Co-authored-by: Eric Bailey <git@esb.lol> * Remove dead comment --------- Co-authored-by: Eric Bailey <git@esb.lol> * Redesign feeds tab (#1439) * consolidate saved feeds and discover into one screen * Add hoverStyle behavior to <Link> * More UI work on SavedFeeds * Replace satellite icon with a hashtag * Tune My Feeds mobile ui * Handle no results in my feeds * Remove old DiscoverFeeds screen * Remove multifeed * Remove DiscoverFeeds from router * Improve loading placeholders * Small fixes * Fix types * Fix overflow issue on firefox * Add icons prompting to open feeds --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Merge feed prototype [WIP] (#1398) * POC WIP for the mergefeed * Add feed API wrapper and move mergefeed into it * Show feed source in mergefeed * Add lodash.random dep * Improve mergefeed sampling and reliability * Tune source ui element * Improve mergefeed edge condition handling * Remove in-place update of feeds for performance * Fix link on native * Fix bad ref * Improve variety in mergefeed sampling * Fix types * Fix rebase error * Add missing source field (got dropped in merge) * Update find more link * Simplify the right hand feeds nav * Bring back load latest button on desktop & unify impl * Add 'From' to source * Add simple headers to desktop home & notifications * Fix thread view jumping around horizontally * Add unread indicators to desktop headers * Add home feed preference for enabling the mergefeed * Add a preference for showing replies among followed users only (#1448) * Add a preference for showing replies among followed users only * Simplify the reply filter UI * Fix typo * Simplified custom feed header * Add soft reset to custom feed screen * Drop all the in-post translate links except when expanded (#1455) * Update mobile feed settings links to match desktop * Fixes to feeds screen loading states * Bolder active state of feeds tab on mobile web * Fix dark mode issue --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Ansh <anshnanda10@gmail.com>
* don't thread a self-repost of a self-reply (#1450)Eric Bailey2023-09-151-1/+4
| | | | | * don't thread a self-repost of a self-reply * typo
* Improvements to feed assembly to avoid possible state issues (#1318)Paul Frazee2023-08-281-3/+6
| | | | | * Avoid potential dropped posts due to pruning when checking for latest * Add a sanity check to ensure dup react keys never occur (close #1315)
* Fix to "Load new posts" showing sometimes when there's nothing new to show ↵Paul Frazee2023-08-161-2/+2
| | | | | | | (#1191) * Fix to feed item react key value (hopefully) * Fix false-firing of load more (close #1028)
* Fix to react-key uniqueness in feeds (#1136)Paul Frazee2023-08-081-0/+6
|
* fix: typo in feed-manip.ts (#967)Ikko Eltociear Ashimine2023-07-051-1/+1
| | | prefered -> preferred
* [APP-718] Improvements and fixes to language handling (#931)Paul Frazee2023-06-301-54/+4
| | | | | | | | | | | * Add locale helpers for narrowing languages * Add a translate link to posts in a different language * Update language filtering to use narrowing when multiple declared * Fix a few more RTL layout cases * Fix types
* [APP-690] better handling of post languages language filtering (#893)Ansh2023-06-231-9/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add SelectLangBtn * memoized objects that are created to reduce re-creation on re-render * add langs when uploading post * only send the top 3 languages otherwise backend will throw error * mv ContentLanguagesSettings to folder * add post languages settings modal and state * fix typos * modify feed manip to also check langs label on post * Fix tests * Remove log * Update feed-manip.ts * Fix syntax errors * UI tuneups * Show the currently selected languages in the composer * fix linting * Use a bcp-47 matching function * Fix a duplicate language issue * Fix web * Dont include lang in prompt * Make select language btn an observer * Keep device languages on top of language selection UIs * Fix android build settings * Enforce a max of 3 languages in posts * Fix tests * Fix types --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* fix: commentEric Bailey2023-06-161-1/+1
|
* feat: add home feed preferences settings modal and tunersEric Bailey2023-06-161-15/+54
|
* Fix image-only posts not being visible in custom feeds.Markus Amalthea Magnuson2023-06-121-0/+6
|
* Fix a bunch of type errors and add a type-check to the github workflows (#837)Paul Frazee2023-06-021-16/+25
| | | | | | | | | | | | | | | * Add yarn type-check * Rename to yarn typecheck * Fix a collection of type errors * Add typecheck to automated tests * add `dist` to exluded folders tsconfig --------- Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
* Remove sorting in feed-manipPaul Frazee2023-05-251-3/+0
|
* Remove the attempts to make the language filter more lenient (#569)Paul Frazee2023-05-031-11/+1
|
* [APP-549] Language controls for Whats Hot (#563)Paul Frazee2023-05-021-6/+4
| | | | | | | | | | | * Add a content-language preference control * Update whats hot to only show the selected languages and to refresh on lang pref changes * Fix lint * Fix tests * Add missing accessibility role
* Fix replies with <2 likes showing in the following feedPaul Frazee2023-05-021-2/+10
|
* [APP-610] Make the language filter more lenient (#562)Paul Frazee2023-05-021-2/+16
| | | | | | | | | | | | | * Tune the language filter to accept posts when a determination cant be made * use j instead of i since i has been declared in upper scope * use j instead of i since i has been declared in upper scope * Pass the j man --------- Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
* Give the unfiltered view if the language filter yields no results (close ↵Paul Frazee2023-04-031-6/+23
| | | | #358) (#382)
* Lex refactor (#362)Paul Frazee2023-03-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove the hackcheck for upgrades * Rename the PostEmbeds folder to match the codebase style * Updates to latest lex refactor * Update to use new bsky agent * Update to use api package's richtext library * Switch to upsertProfile * Add TextEncoder/TextDecoder polyfill * Add Intl.Segmenter polyfill * Update composer to calculate lengths by grapheme * Fix detox * Fix login in e2e * Create account e2e passing * Implement an e2e mocking framework * Don't use private methods on mobx models as mobx can't track them * Add tooling for e2e-specific builds and add e2e media-picker mock * Add some tests and fix some bugs around profile editing * Add shell tests * Add home screen tests * Add thread screen tests * Add tests for other user profile screens * Add search screen tests * Implement profile imagery change tools and tests * Update to new embed behaviors * Add post tests * Fix to profile-screen test * Fix session resumption * Update web composer to new api * 1.11.0 * Fix pagination cursor parameters * Add quote posts to notifications * Fix embed layouts * Remove youtube inline player and improve tap handling on link cards * Reset minimal shell mode on all screen loads and feed swipes (close #299) * Update podfile.lock * Improve post notfound UI (close #366) * Bump atproto packages
* Feed updates (Closes #344) (#356)Paul Frazee2023-03-221-13/+12
| | | | | | | | | * Rework feed polling to correctly detect when new content is available (close #344) * Tweak how the tuner works for consistency * Improve the feed-update behavior after posting * Load latest notifications when opening the tab
* Filter content by your device's configured languages (#354)Paul Frazee2023-03-221-21/+20
|
* Fix tscPaul Frazee2023-03-221-17/+0
|
* A few fixes to ensure threads show up as often as possiblePaul Frazee2023-03-211-3/+6
|