Skip to content

Commit 3e4793c

Browse files
committed
feat(brand): brand feed as signed-out + default feed, drop video default
Each brand's primary feed (brand.defaultFeeds[0]) now backs the signed-out home and is the default for new users, and the dedicated videos feed is no longer pinned by default. Every brand defaults to exactly two feeds: the brand feed and the following timeline. - DISCOVER_FEED_URI now derives from brand.defaultFeeds[0].value, so the signed-out home (PWI discover stub) and discover-specific UI use the brand feed. For the Bluesky brand this stays whats-hot (unchanged). - Home screen signed-out + demo feed panes use pinnedFeedInfos[0].feedDescriptor instead of the hardcoded Bluesky whats-hot feed. - Onboarding no longer pins the videos feed; it seeds only the brand feed + following, matching the defaults written at account creation. - Fix mdparivaar default feed rkey (mdparivaar -> md-parivaar) to match the published feed generator record. Closes #15
1 parent 3b5b876 commit 3e4793c

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

brands/mdparivaar/brand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const brand: Brand = {
103103
{
104104
type: 'feed',
105105
value:
106-
'at://did:plc:ieyfjh6ystyufa3a7pi3jw5q/app.bsky.feed.generator/mdparivaar',
106+
'at://did:plc:ieyfjh6ystyufa3a7pi3jw5q/app.bsky.feed.generator/md-parivaar',
107107
pinned: true,
108108
},
109109
{

src/lib/constants.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,11 @@ export const BSKY_FEED_OWNER_DIDS = [
143143
'did:plc:q6gjnaw2blty4crticxkmujt',
144144
]
145145

146-
export const DISCOVER_FEED_URI =
147-
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
146+
// The brand's primary feed doubles as its "discover" feed: it backs the
147+
// signed-out home and drives discover-specific UI (fresh-content polling,
148+
// composer prompt, etc.). For the Bluesky brand this resolves to whats-hot,
149+
// so upstream behavior is unchanged.
150+
export const DISCOVER_FEED_URI = brand.defaultFeeds[0].value
148151
export const VIDEO_FEED_URI =
149152
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/thevids'
150153
export const STAGING_VIDEO_FEED_URI =
@@ -156,11 +159,6 @@ export const VIDEO_FEED_URIS = [VIDEO_FEED_URI, STAGING_VIDEO_FEED_URI]
156159
// `src/brand/boot.ts` and the type assertion below.
157160
export const DISCOVER_SAVED_FEED = brand.defaultFeeds[0]
158161
export const TIMELINE_SAVED_FEED = brand.defaultFeeds[1]
159-
export const VIDEO_SAVED_FEED = {
160-
type: 'feed',
161-
value: VIDEO_FEED_URI,
162-
pinned: true,
163-
}
164162

165163
export const RECOMMENDED_SAVED_FEEDS: Pick<
166164
AppBskyActorDefs.SavedFeed,

src/screens/Onboarding/StepFinished/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
BSKY_APP_ACCOUNT_DID,
1919
DISCOVER_SAVED_FEED,
2020
TIMELINE_SAVED_FEED,
21-
VIDEO_SAVED_FEED,
2221
} from '#/lib/constants'
2322
import {useRequestNotificationsPermission} from '#/lib/notifications/notifications'
2423
import {logger} from '#/logger'
@@ -108,7 +107,9 @@ export function StepFinished() {
108107
// Interests need to get saved first, then we can write the feeds to prefs
109108
await agent.setInterestsPref({tags: selectedInterests})
110109

111-
// Default feeds that every user should have pinned when landing in the app
110+
// Default feeds that every user should have pinned when landing in
111+
// the app: the brand's primary feed and the following timeline. This
112+
// matches the brand defaults seeded at account creation.
112113
const feedsToSave: AppBskyActorDefs.SavedFeed[] = [
113114
{
114115
...DISCOVER_SAVED_FEED,
@@ -118,10 +119,6 @@ export function StepFinished() {
118119
...TIMELINE_SAVED_FEED,
119120
id: TID.nextStr(),
120121
},
121-
{
122-
...VIDEO_SAVED_FEED,
123-
id: TID.nextStr(),
124-
},
125122
]
126123

127124
// Any starter pack feeds will be pinned _after_ the defaults

src/view/screens/Home.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {ActivityIndicator, StyleSheet} from 'react-native'
33
import {withSpring} from 'react-native-reanimated'
44
import {useFocusEffect} from '@react-navigation/native'
55

6-
import {PROD_DEFAULT_FEED} from '#/lib/constants'
76
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
87
import {useOTAUpdates} from '#/lib/hooks/useOTAUpdates'
98
import {useSetTitle} from '#/lib/hooks/useSetTitle'
@@ -267,7 +266,7 @@ function HomeScreenReady({
267266
testID="customFeedPage"
268267
isPageFocused
269268
isPageAdjacent={false}
270-
feed={`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`}
269+
feed={pinnedFeedInfos[0].feedDescriptor}
271270
renderEmptyState={renderCustomFeedEmptyState}
272271
feedInfo={pinnedFeedInfos[0]}
273272
/>
@@ -330,7 +329,7 @@ function HomeScreenReady({
330329
testID="customFeedPage"
331330
isPageFocused
332331
isPageAdjacent={false}
333-
feed={`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`}
332+
feed={pinnedFeedInfos[0].feedDescriptor}
334333
renderEmptyState={renderCustomFeedEmptyState}
335334
feedInfo={pinnedFeedInfos[0]}
336335
/>

0 commit comments

Comments
 (0)