about summary refs log tree commit diff
path: root/src/state/queries/post-thread.ts
Commit message (Collapse)AuthorAgeFilesLines
* Don't re-sort already fetched post thread items (#6698)dan2024-11-241-9/+43
| | | | | | | | | | | | | | | * Don't reorder already seen posts in PostThread * Add sorting by generation * Rip out stable order cache It doesn't make sense because sort() doesn't call the callback for all A/B pairs, and the server returning a different ordering will cause cache misses which means there'll be no stability anyway. * Make hotness deterministic per fetched at * Cache random scores while in thread * Reorder for clarity
* Add a hotness thread sort (#6649)dan2024-11-231-1/+20
| | | | | * Add a hotness thread sort * Bump @atproto/api
* Sort pins last in thread view (#6426)dan2024-11-161-0/+11
|
* Sort imports (#6009)dan2024-10-291-3/+3
| | | | | * Mark import sort/order/style rules as error * npm run lint -- --fix
* Fix notification->post jump for real (#5314)dan2024-09-131-2/+6
| | | | | | | * Revert "Fix notification scroll jump (#5297)" This reverts commit e0d9e75407b053dd3b7a3472f925d8cd4bd92d45. * Query notifications first
* fix `findAll*` type in `post-thread` (#4986)Hailey2024-08-231-8/+12
|
* Optimistic hidden replies (#4977)Eric Bailey2024-08-231-4/+12
|
* update `usePostThreadQuery` to check quote query data (#4975)Hailey2024-08-221-0/+4
| | | | | | | * update `usePostThreadQuery` to check quote query data * search notifs before quotes * oops
* Detached QPs and hidden replies (#4878)Eric Bailey2024-08-211-1/+17
| | | | Co-authored-by: Hailey <me@haileyok.com>
* Show just-posted replies above OP replies (#4901)dan2024-08-081-1/+18
| | | | | | | | | * Unify onPostReply handler * Show just-posted replies above OP replies * Only do this for the highlighted post or thread mode It's confusing to have your post displace OP thread or other people's leaf posts.
* Show own replies before follows' replies in threads (#4882)dan2024-08-061-1/+12
|
* Implement thread locking (#4545)Paul Frazee2024-06-181-1/+1
| | | | | | | * Add the ability to edit threadgates * Fix bottom border on mobile * Refresh thread after threadgate edit
* Fix: only apply self-thread load-more behavior on the outer edge of the ↵Paul Frazee2024-06-181-2/+11
| | | | reply tree (#4559)
* Fix to thread load-more bug (#4488)Paul Frazee2024-06-111-3/+2
|
* Improve thread loading (#4402)Paul Frazee2024-06-111-2/+51
| | | | | | | * Increase the number of posts loaded when a self-thread is present * Increase depth to 10, detect cutoffs on self-threads and show continue link * Stacky the avis
* remove resolution from post thread (#4297)Hailey2024-06-031-11/+14
| | | | | | | | | | | | | | | | | | | | | * remove resolution from post thread nit completely remove did cache lookup move cache check for did to `usePostThreadQuery` remove resolution from post thread * helper function * simplify * simplify search too * fix missing check for root or parent quoted post 🤯 * fix thread traversal
* Shadows (#4265)Eric Bailey2024-05-311-3/+46
|
* Replace getAgent() with reading agent (#4243)dan2024-05-281-2/+2
| | | | | * Replace getAgent() with agent * Replace {agent} with agent
* Improve moderation behaviors: show alert/inform sources and improve UX ↵Paul Frazee2024-05-241-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | around threads (#3677) * Dont show account or profile alerts and informs on posts * Sort threads to put blurred items at bottom * Group blurred replies under a single 'show hidden replies' control * Distinguish between muted and hidden replies in the thread view * Fix types * Modify the label alerts with some minor aesthetic updates and to show the source of a label * Tune when an account-level alert is shown on a post * Revert: show account-level alerts on posts again * Rm unused import * Fix to showing hidden replies when viewing a blurred item * Go ahead and uncover replies when 'show hidden posts' is clicked --------- Co-authored-by: dan <dan.abramov@gmail.com>
* remove precacheThreadPostProfiles (#3729)Hailey2024-04-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove `precacheThreadPostProfiles` * add `displayName` to `PreviewableUserAvatar` * memo * use `precacheProfile` * pass `profile` directly to `PreviewableUserAvatar` * update the `UserAvatar`'s props * remove feed cache * one more spot * rm unused queryClient * Don't call fn unnecessarily * Preload for display name too * try notification item * add to feeditem * and finally, precache for post threads * timestamp * Fix * onBeforePress --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Add `useAgent` hook and replace (#3706)Eric Bailey2024-04-251-1/+2
| | | | | | | | | | | * Hook it up * Memoize getAgent method * Use one shared reference --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* cache fix for search post results (#3520)Hailey2024-04-121-0/+4
|
* QT Jump Pt. 2 - Remove code duplication (#3506)Hailey2024-04-121-9/+2
| | | | | * remove code duplication * now it's safe to remove shimmer
* Extract query key roots to constants (#3404)dan2024-04-041-7/+8
| | | | | | | * Extract query key roots to constants * Dedupe labelers-detailed-info * Align naming
* Fix flash when pressing into just-created post (#2945)dan2024-02-201-1/+8
|
* Prefer full posts for post thread placeholder (#2943)dan2024-02-201-25/+32
| | | | | | | | | * Revert "Prefer post over quote when finding cached post (#2935)" This reverts commit da62a77f05258ce2b0609248cb5677c2406a4e63. * Prefer full posts for post thread placeholder * Clarify with a comment
* Precache basic profile from posts for instant future navigations (#2795)Hailey2024-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * skeleton for caching * modify some existing logic * refactor uri resolution query * add precache feed posts * adjustments * remove prefetch on hover (maybe revert, just example) * fix * change arg name to match what we want * optional infinite stale time * use `ProfileViewDetailed` * Revert "remove prefetch on hover (maybe revert, just example)" This reverts commit 08609deb0defa7cea040438bc37dd3488ddc56f4. * add warning comment back for stale time * remove comment * store profile with both the handle and did for query key * remove extra block from revert * clarify argument name * remove QT cache * structure queries the same (put `enabled` at bottom) * use both `ProfileViewDetailed` and `ProfileView` for the query return type * placeholder profile header * remove logs * remove a few other things we don't need * add placeholder * refactor * refactor * we don't need this height adjustment now * use gray banner while loading * set background color of image to the loading placeholder color * reorg imports * add border to header on loading * Fix style * Rm radius * oops * Undo edit * Back out type changes * Tighten some types and moderate shadow * Move precaching fns to profile where the cache is * Rename functions to match what they do now * Remove anys --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Completely disable the RQ cache in post-thread (#2133)Paul Frazee2023-12-071-0/+1
|
* Add PWI opt-out toggle (#2122)Paul Frazee2023-12-071-5/+0
| | | | | | | | | | | | | | | | | * Add PWI opt-out toggle * Bump @atproto/api@0.7.0 * Tweak copy * Bump lockfile * Fix layout on ios * Tweak copy more * Fix types * Tweak copy some more
* Fix some typesPaul Frazee2023-12-051-1/+2
|
* Perf: Include quote posts in the post-thread placeholder (#2104)Paul Frazee2023-12-051-1/+38
|
* Rewrite the shadow logic to look inside the cache (#2045)dan2023-11-301-27/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reset * Associate shadows with the cache * Use colocated helpers * Fix types * Reorder for clarity * More types * Copy paste logic for profile * Hook up profile query * Hook up suggested follows * Hook up other profile things * Fix shape * Pass setShadow into the effect deps * Include reply posts in the shadow cache search --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Adjust stale-caches and dont group read&unread notifs together (#2041)Paul Frazee2023-11-291-2/+0
| | | | | | | | | * Dont group read & unread notifications together * Remove and reduce some stale cache times * Keep the staleTime on the post-feed * Bring back the load-bearing staletime on profile
* Apply feed preferences (react-query refactor) (#2040)Paul Frazee2023-11-291-9/+8
| | | | | * Actually implement the feed tuners hook * Move feed-tuner pass into select() to have it apply immediately on change
* Restore post-thread caching behaviors (react-query refactor) (#2010)Paul Frazee2023-11-271-2/+144
| | | | | | | | | | | | | | | | | | | | | * Rework resolve-did and resolve-uri queries to be smarter about cache reuse * Precache handle resolutions * Remove old unused code * Load placeholder threads from the post-feed and notifications-feed queries * Remove logs * Fix bad ref * Add loading spinners to the cache-loading thread view * Scroll replies into view when loading threads * Add caching within a thread * Fix: dont show bottom border when the child spinner is active
* Filter out blocked posts from thread view (#2006)Eric Bailey2023-11-271-3/+4
|
* Move the current agent to a global and reset RQ queries on agent change (#1946)Paul Frazee2023-11-161-3/+2
|
* Caching heuristics (#1938)Eric Bailey2023-11-161-0/+3
| | | | | * Tempfix profile load * First pass at staleTime
* Remove post thread (#1920)Eric Bailey2023-11-151-3/+3
| | | | | | | * Delete post-thread model * Remove post-thread-item * Remove unused types
* Refactor feeds to use react-query (#1862)Paul Frazee2023-11-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Refactor post threads to use react query (#1851)Paul Frazee2023-11-091-0/+177
* Add post and post-thread queries * Update PostThread components to use new queries * Move from normalized cache to shadow cache model * Merge post shadow into the post automatically * Remove dead code * Remove old temporary session * Fix: set agent on session creation * Temporarily double-login * Handle post-thread uri resolution errors