about summary refs log tree commit diff
path: root/src/state
Commit message (Collapse)AuthorAgeFilesLines
* Remove error for refresh, not necessary (#4034)Eric Bailey2024-05-151-11/+0
|
* [🐴] Better retry styling (#4032)Eric Bailey2024-05-152-28/+27
| | | | | | | | | | | | | * Pass whole object to MessageItem for clarity * Add retry to pending-message * Style send failure, retry * Group pending messages * Remove todos * Fix types with fake message
* Reset after 5 min (#4026)Eric Bailey2024-05-142-7/+27
|
* [🐴] Block states, read only (#4022)Eric Bailey2024-05-142-1/+34
| | | | | | | | | | | * Refactor ChatListItem for mod state * Refactor Conversation Header for mod state * Invalidate query for list when blocking/unblocking * Remove unused prop, restore border * Add mutations, hook up profile shadow to list query, use shadow-aware query for convo (#4024)
* remove serviceurl gate (#4019)Samuel Newman2024-05-141-4/+1
|
* [🐴] Settings screen (#3830)Samuel Newman2024-05-141-0/+64
| | | | | | | | | * create settings screen + api * update api package * use putrecord API with validate false * create new RadioGroup component
* [🐴] Message drafts (#3993)Samuel Newman2024-05-142-1/+87
| | | | | | | | | | | * drafts * don't throw if no convo ID * Remove labs package --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [🐴] Make status checks easier, fix load state (#4010)Eric Bailey2024-05-143-79/+137
| | | | | | | | | * Make status checks easier, fix load state * Make naming more clear * Split up types for easier re-use * Replace hacky usage
* [🐴] Swap in new package, update usages (#3992)Eric Bailey2024-05-1413-142/+65
| | | | | | | * Swap in new package, update usages * Remove uneccessary patch * Override type in safe place
* Gate base following feed usage (#3994)Eric Bailey2024-05-131-1/+11
|
* Swap in base following (#3991)Eric Bailey2024-05-131-2/+1
|
* FeedFeedback fixes (#3968)dan2024-05-121-1/+1
| | | | | | | | | | | * 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>
* Fix flashes when replacing For You (#3967)dan2024-05-111-0/+40
| | | | | * Fix flashes when replacing For You * Switch to Discover if pinned after removing
* Onboarding fixes (#3966)dan2024-05-111-12/+25
| | | | | | | | | | | | | | | * Ensure prefs are up-to-date before leaving onboarding * Parallelize upsertProfile call * Don't upsertProfile if no image * Don't waterfall blob upload * Fix useProfileUpdateMutation to parallelize uploads * Invalidate user profile before leaving onboarding * Ungate setting the pic
* Movable following feed (#3593)Eric Bailey2024-05-118-127/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle home algo with backwards compat * Remove todo, fix pwi view * Simplify filter logic * Handle edge case * Handle home algo in FeedSourceCard * Fix handling of pinned feed if home algo is disabled * Handle home algo on ProfileFeed screen * Rename * Fix pinned feeds key * Improve perf of pinned feeds with primary algo * Update statsig API * Revert unneeded changes * Support following feed as well * Better formatting * Clarify primary algo usage * Better comment * Handle saved feed screen edge case * Restore Feeds sparkle, fix line height * Move gate call down * Filter out primary algo from feeds page * Filter dupe from Feeds screen * Simplify logic * Missing following handling * Hide primary feed setting outside exp * Revert testing change * Migrate usePinnedFeedInfos * Migrate FeedSourceCard * Migrate Feeds screen * Migrate SavedFeeds screen * Handle timeline in feed infos * Finish migrating ProfileFeed, FeedSourceCard * Migrate ProfileList * Finalize mutation hooks * Allow unsaving lists * Handle following feed on Feeds screen * Handle following on SavedFeeds * Get rid of deprecated interface usages * Handle no pinned feeds * Handle no feeds on Feeds screen * Reuse component on SavedFeeds screen * Handle no following feed * Remove primary algo references * Migrate to new plural APIs * Remove unused event * Prevent duplicate keys * Make handling much more clear * Dedupe useHeaderOffset * Filter unknown feed types at source * Use just following * Immprove key handling * Resume from last tab * Bump sdk * Revert Gemfile * Additional protection in FeedSourceCard * Fix ProfileList save/unsave handling * Translate * Translate * Match existing handling post-signup * Ensure onboarding results in correct selected feeds * Some testing tweaks on create/onboarding * Revert primary algo consderations * Remove comment * Handle default feed setting * Rm unnecessary type cast * Remove premature gate check * Remove nullable check in onPageSelecting, assume the pager checks bounds * Use null for default selected feed * Rm unrelated change * Remove the concept of __key__ I don't think this concept is consistent. It's introduced on FeedSourceInfo which is used both by pinned feeds and by useFeedSourceInfoQuery. Pinned feeds use the pinning ID there. But there is no pinning ID for useFeedSourceInfoQuery. So this means this field is sometimes one thing and sometimes some other thing. That is a decent sign that it shouldn't be on that type at all. It's not used anywhere except the desktop feed enumeration. It seems reasonable to assume there that we wouldn't want to show the same feed URL twice. (And if it does occur in the array twice, IMO we should solve that at the API level and dedupe it on read or next write.) So I think we should just use the URL in that place. (I used the descriptor, which is equivalent.) * Dedupe pinned feeds by URL on read * Filter timeline out of mergefeed sources * Put FeedDescriptor into FeedSourceInfo * Group saved info with feed for pins This removes a loop within a loop within a loop. * Fix Feeds link on native --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [🐴] Simplify message passing, cleanup (#3952)Eric Bailey2024-05-103-87/+85
| | | | | * Simplify message passing * Setup/teardown events
* [🐴] Mutate data instead of invalidating queries when muting or unmuting ↵Hailey2024-05-103-57/+62
| | | | | | | | | | | | | | | | | | | | | (#3946) * mutate for mutes * mutate data for mutes * add initial data, `useConvoQuery` in `ConvoMenu` * `useInitialData` * don't use `identifier` for notifications, use `dates` instead * better implementation * simplify * simplify * fix types
* [🐴] Clean up after deleting message (#3950)Eric Bailey2024-05-102-8/+6
| | | | | * Clean up after removal * Remove console
* [🐴] Remove extra spinner states from chat screen (#3947)Hailey2024-05-101-1/+1
| | | | | | | | | | | * remove extra loading states from chat * nits * fix scrolling animation to bottom * nit * move spinner to top
* [🐴] Handle errors, improve styling (#3937)Eric Bailey2024-05-102-32/+60
| | | | | * Handle errors, improve styling * Remove old UI
* [Session] Restore emailAuthFactor and emailConfirmed from last session (#3939)dan2024-05-091-4/+7
|
* Add retries to all handlers (#3935)Eric Bailey2024-05-092-73/+90
|
* Handle push notifications for DMs (#3895)Hailey2024-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add some better handling for notifications prep merge move `useNotificationsListener` into shell progress better structure only show messages notifications while using app if it is the current account progress only emit on native current chat emitter only show alerts for the current chat type add logs setup handlers * remove event emitter * just needs cleanup * oops * remove unnecessary `queryClient` param * few fixes * cleanup * nit * remove folds * remove comment * simplify if * add back invalidate * comment out other navigations for now * rename type * handle various navigation cases * push to conversation from notification * update badge in all cases except `chat-message` * ensure no duplicate notifications * rm unused `animationOnReplace` * revert to using `goBack` in the conversation header * add todo comment
* [🐴] Integrate event bus (#3915)Eric Bailey2024-05-085-126/+120
| | | | | | | | | | | | | * Integrate event bus * Fixes * Move events mgmt into Convo class * Clean up poll interval updates * Remove unused * Remove annoying log
* [🐴] Refactor event bus (#3919)Eric Bailey2024-05-084-257/+151
| | | | | * Refactor to singleton class outside react * Fix retry, remove debug logs
* Replace updateCurrentAccount() with refreshSession() (#3910)dan2024-05-084-224/+1
| | | Replace updateCurrentAccount() with resumeSession()
* actually optimistic mark as read (#3917)Samuel Newman2024-05-082-5/+9
|
* Move to requestPollInterval handling (#3914)Eric Bailey2024-05-082-23/+43
|
* [🐴] Mark as read in convo menu (#3913)Samuel Newman2024-05-082-7/+22
| | | | | | | * add mark as read option * optimistic update + link up menu * rm messageid
* [🐴] Reorg convo files (#3909)Eric Bailey2024-05-074-246/+264
| | | | | * Remove unused prop * Reorganize
* Add session reducer tests (#3860)dan2024-05-082-0/+1644
|
* [Session] Code cleanup (#3854)dan2024-05-087-486/+537
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split utils into files * Move reducer to another file * Write types explicitly * Remove unnnecessary check * Move things around a bit * Move more stuff into agent factories * Move more stuff into agent * Fix gates await * Clarify comments * Enforce more via types * Nit * initSession -> resumeSession * Protect against races * Make agent opaque to reducer * Check using plain condition
* [🐴] Unread messages badge (#3901)Samuel Newman2024-05-073-5/+148
| | | | | | | | | | | | | | | | | | | | | * add badge * move stringify logic to hook * add mutation hooks * optimistic mark convo as read * don't count muted chats * Integrate new context * Integrate mark unread mutation * Remove unused edit --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [Session] Remove global agent (#3852)dan2024-05-083-339/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove logs and outdated comments * Move side effect upwards * Pull refreshedAccount next to usage * Simplify account refresh logic * Extract setupPublicAgentState() * Collapse setStates into one * Ignore events from stale agents * Use agent from state * Remove clearCurrentAccount * Move state to a reducer * Remove global agent * Fix stale agent reference in create flow * Proceed to onboarding even if setting date fails --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [🐴] Integrate global event bus (#3904)Eric Bailey2024-05-073-1/+65
| | | | | * Conditionally run global event bus * Add current convo id context, bundle providers
* [🐴] State transitions (#3880)Eric Bailey2024-05-072-204/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle init/resume/suspend/background and polling * Add debug and temp guard * Make state transitions sync * Make init sync also * Checkpoint: confusing but working state machine * Reducer-esque * Remove poll events * Guard fetchConvo (cherry picked from commit 8385579d31500bb4bfb60afeecdc1eb3ddd7e747) * Clean up polling, make sync (cherry picked from commit 7f75cd04c3bf81c94662785748698640a84bef51) * Update history handling (cherry picked from commit b82b552ba4040adf7ead2377541132a386964ff8) * Check for screen focus in app state listener * Get rid of ad-hoc status checks
* [🐴] Global event mgmt (#3897)Eric Bailey2024-05-073-0/+644
| | | | | | | | | | | | | * Add global event bus for messages logs * Add rev to state * Better handle error * Clean up polling, add backgrounding * Add trailConvo method * Extend polling until we're ready for this
* Implement FeedFeedback API (#3498)Paul Frazee2024-05-072-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement onViewableItemsChanged on List.web.tsx * Introduce onItemSeen to List API * Add FeedFeedback tracker * Add clickthrough interaction tracking * Add engagement interaction tracking * Reduce duplicate sends, introduce a flushAndReset to be triggered on refreshes, and modify the api design a bit * Wire up SDK types and feedContext * Avoid needless function allocations * Fix schema usage * Add show more / show less buttons * Fix minor rendering issue on mobile menu * Wire up sendInteractions() * Fix logic error * Fix: it's item not uri * Update 'seen' to mean 3 seconds on-screen with some significant portion visible * Fix non-reactive debounce * Move methods out * Use a WeakSet for deduping * Reset timeout * 3 -> 2 seconds * Oopsie * Throttle instead * Fix divider * Remove explicit flush calls * Rm unused --------- Co-authored-by: dan <dan.abramov@gmail.com>
* Merge branch 'fix-banner-cropper' of ↵Paul Frazee2024-05-061-0/+1
|\ | | | | | | https://github.com/piotrpalek/social-app into piotrpalek-fix-banner-cropper
| * allow for custom cropper aspect ration based on imagePiotr P2024-04-271-0/+1
| |
* | remove trailing period from query term in `useActorAutocompleteQuery` (#3765)Hailey2024-05-061-1/+5
| | | | | | | | | | | | | | | | | | * remove trailing period from query term * Rm useMemo --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* | [Clipclops] All my clops gone (#3850)Eric Bailey2024-05-062-80/+174
| | | | | | | | | | | | | | | | | | * Handle two common errors, provide more clarity around error states * Handle failed polling * Remove unused error type * format
* | [Clipclops] Delete message in dialog (#3849)Hailey2024-05-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * delete and copy * add retry dialog if message send fails * add layout animation * fix `nextMessage` being incorrect --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* | Clipclop tweaks (#3851)Hailey2024-05-031-1/+1
| | | | | | | | | | | | | | * scroll on input resize * add back the padding 🙊 * fix timestamps
* | [Clipclops] Refactor message list (#3832)Hailey2024-05-031-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rework the list for accessibility * Reverse reverse * progress * good to start testing * memo `MessageItem` * small hack * use our custom `List` impl * use `ScrollProvider` for `onScroll` event * remove use of `runOnJS` * actually, let's keep it * add some comments --------- Co-authored-by: Eric Bailey <git@esb.lol>
* | add focus refresh + polling (#3846)Samuel Newman2024-05-031-1/+2
| |
* | [Session] Align state and global agent switchpoints (#3845)dan2024-05-031-36/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * Adopt synced accounts unconditionally * Remove try/catch around resuming session * Move to login form on resume failure * Restructure code flow for easier reading --------- Co-authored-by: Eric Bailey <git@esb.lol>
* | [Clipclops] Moar error (#3837)Eric Bailey2024-05-031-34/+75
| | | | | | | | | | | | | | * Add history error * Log error * Add period
* | [Session] Reset global agent on expire (#3838)dan2024-05-031-6/+11
| |
* | [Session] Rely on agent session change event for persisting resumed session ↵dan2024-05-031-32/+12
| | | | | | | | | | | | | | (#3836) * Rely on agent session change handler for resumption * Add a fast path for noop resumes