diff --git a/src/components/PrimaryAlgoNoticeDialog.tsx b/src/components/PrimaryAlgoNoticeDialog.tsx
deleted file mode 100644
index 406ef09589..0000000000
--- a/src/components/PrimaryAlgoNoticeDialog.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react'
-import {msg} from '@lingui/macro'
-import {useLingui} from '@lingui/react'
-
-import {DialogOuterProps} from '#/components/Dialog'
-import * as Prompt from '#/components/Prompt'
-
-export function PrimaryAlgoNoticeDialog({
- control,
-}: {
- control: DialogOuterProps['control']
-}) {
- const {_} = useLingui()
- return (
-
- Your primary algorithm
-
- This feed is set as your primary algorithm, which is used as your home
- screen when you open the app.
-
-
-
-
-
- )
-}
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts
index ccd2399f8c..765670aaf9 100644
--- a/src/lib/statsig/gates.ts
+++ b/src/lib/statsig/gates.ts
@@ -1,12 +1,11 @@
export type Gate =
// Keep this alphabetic please.
- | 'autoexpand_suggestions_on_profile_follow'
- | 'disable_min_shell_on_foregrounding'
- | 'disable_poll_on_discover'
+ | 'autoexpand_suggestions_on_profile_follow_v2'
+ | 'disable_min_shell_on_foregrounding_v2'
+ | 'disable_poll_on_discover_v2'
| 'hide_vertical_scroll_indicators'
- | 'new_profile_scroll_component'
- | 'new_search'
- | 'receive_updates'
- | 'show_follow_back_label'
+ | 'show_follow_back_label_v2'
+ | 'start_session_with_following_v2'
+ | 'test_gate_1'
+ | 'test_gate_2'
| 'use_new_suggestions_endpoint'
- | 'reduced_onboarding_and_home_algo'
diff --git a/src/state/queries/feed.ts b/src/state/queries/feed.ts
index 035b53605b..252ce3a895 100644
--- a/src/state/queries/feed.ts
+++ b/src/state/queries/feed.ts
@@ -22,7 +22,6 @@ import {getAgent, useSession} from '#/state/session'
import {router} from '#/routes'
export type FeedSourceFeedInfo = {
- isPrimaryAlgorithm: boolean
type: 'feed'
uri: string
route: {
@@ -41,7 +40,6 @@ export type FeedSourceFeedInfo = {
}
export type FeedSourceListInfo = {
- isPrimaryAlgorithm: boolean
type: 'list'
uri: string
route: {
@@ -72,7 +70,6 @@ const feedSourceNSIDs = {
export function hydrateFeedGenerator(
view: AppBskyFeedDefs.GeneratorView,
- options?: Pick,
): FeedSourceInfo {
const urip = new AtUri(view.uri)
const collection =
@@ -81,7 +78,6 @@ export function hydrateFeedGenerator(
const route = router.matchPath(href)
return {
- isPrimaryAlgorithm: options?.isPrimaryAlgorithm ?? false,
type: 'feed',
uri: view.uri,
cid: view.cid,
@@ -113,7 +109,6 @@ export function hydrateList(view: AppBskyGraphDefs.ListView): FeedSourceInfo {
const route = router.matchPath(href)
return {
- isPrimaryAlgorithm: false,
type: 'list',
uri: view.uri,
route: {
@@ -209,7 +204,6 @@ export function useSearchPopularFeedsMutation() {
* The following feed, with fallbacks to Discover
*/
const PWI_DISCOVER_FEED_STUB: FeedSourceInfo = {
- isPrimaryAlgorithm: true,
type: 'feed',
displayName: 'Discover',
uri: DISCOVER_FEED_URI,
@@ -289,7 +283,6 @@ export function usePinnedFeedsInfos() {
result.push(feedInfo)
} else if (pinnedFeed.type === 'timeline') {
result.push({
- isPrimaryAlgorithm: false,
type: 'feed',
displayName: 'Following',
uri: pinnedFeed.value,
diff --git a/src/state/shell/selected-feed.tsx b/src/state/shell/selected-feed.tsx
index a77801a9dd..df50b3952f 100644
--- a/src/state/shell/selected-feed.tsx
+++ b/src/state/shell/selected-feed.tsx
@@ -4,7 +4,6 @@ import {Gate} from '#/lib/statsig/gates'
import {useGate} from '#/lib/statsig/statsig'
import {isWeb} from '#/platform/detection'
import * as persisted from '#/state/persisted'
-import {DEFAULT_FEED_DESCRIPTOR} from '#/state/queries/post-feed'
type StateContext = string
type SetContext = (v: string) => void
@@ -13,43 +12,29 @@ const stateContext = React.createContext('home')
const setContext = React.createContext((_: string) => {})
function getInitialFeed(gate: (gateName: Gate) => boolean) {
- const isPrimaryAlgoExperimentEnabled = gate(
- 'reduced_onboarding_and_home_algo',
- )
- let feed = DEFAULT_FEED_DESCRIPTOR
-
if (isWeb) {
if (window.location.pathname === '/') {
const params = new URLSearchParams(window.location.search)
const feedFromUrl = params.get('feed')
if (feedFromUrl) {
- // basically a link to a specific tab, use that every time if present
+ // If explicitly booted from a link like /?feed=..., prefer that.
return feedFromUrl
}
}
const feedFromSession = sessionStorage.getItem('lastSelectedHomeFeed')
if (feedFromSession) {
// Fall back to a previously chosen feed for this browser tab.
- feed = feedFromSession
+ return feedFromSession
}
}
-
- const feedFromPersisted = persisted.get('lastSelectedHomeFeed')
- if (feedFromPersisted) {
- // Fall back to the last chosen one across all tabs.
- feed = feedFromPersisted
- }
-
- if (isPrimaryAlgoExperimentEnabled) {
- // following feed
- if (feed === 'home') {
- return 'home'
+ if (!gate('start_session_with_following_v2')) {
+ const feedFromPersisted = persisted.get('lastSelectedHomeFeed')
+ if (feedFromPersisted) {
+ // Fall back to the last chosen one across all tabs.
+ return feedFromPersisted
}
- // or left-most tab
- return DEFAULT_FEED_DESCRIPTOR
}
-
- return DEFAULT_FEED_DESCRIPTOR
+ return 'home'
}
export function Provider({children}: React.PropsWithChildren<{}>) {
diff --git a/src/view/com/home/HomeHeader.tsx b/src/view/com/home/HomeHeader.tsx
index 62802ff981..2c432eec6f 100644
--- a/src/view/com/home/HomeHeader.tsx
+++ b/src/view/com/home/HomeHeader.tsx
@@ -26,9 +26,7 @@ export function HomeHeader(
if (!hasSession) return false
return feeds.some(tab => {
const isFollowing = ['home', 'following'].includes(tab.uri)
- const isPrimaryAlgo = tab.isPrimaryAlgorithm
- const isCustom = !isFollowing && !isPrimaryAlgo
- return isCustom
+ return !isFollowing
})
}, [feeds, hasSession])