Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix missing recId values for suggested user events (#10291)

Co-authored-by: Eric Bailey <git@esb.lol>

authored by

DS Boyce
Eric Bailey
and committed by
GitHub
07344f70 bfdaab0a

+38 -4
+2
src/analytics/metrics/types.ts
··· 487 487 | 'SeeMoreSuggestedUsers' 488 488 | 'ProgressGuide' 489 489 location: 'Card' | 'Profile' | 'FollowAll' 490 + recSource?: 'Search' 490 491 recId?: number | string 491 492 position: number 492 493 suggestedDid: string ··· 514 515 | 'Onboarding' 515 516 | 'SeeMoreSuggestedUsers' 516 517 | 'ProgressGuide' 518 + recSource?: 'Search' 517 519 recId?: number | string 518 520 position: number 519 521 suggestedDid: string
+1
src/components/FeedInterstitials.tsx
··· 167 167 168 168 return ( 169 169 <ProfileGrid 170 + recId={data?.recId} 170 171 isSuggestionsLoading={isLoading} 171 172 profiles={filteredProfiles} 172 173 totalProfileCount={allProfiles.length}
+9 -1
src/components/ProgressGuide/FollowDialog.tsx
··· 249 249 moderationOpts={moderationOpts!} 250 250 noBorder={index === 0} 251 251 position={index} 252 + recSource={hasSearchText ? 'Search' : undefined} 252 253 recId={recIdForLogging} 253 254 isGuide={isGuide} 254 255 /> ··· 264 265 return null 265 266 } 266 267 }, 267 - [moderationOpts, recIdForLogging, isGuide], 268 + [moderationOpts, hasSearchText, recIdForLogging, isGuide], 268 269 ) 269 270 270 271 // Track seen profiles ··· 286 287 ) 287 288 ax.metric('suggestedUser:seen', { 288 289 logContext: isGuide ? 'ProgressGuide' : 'SeeMoreSuggestedUsers', 290 + recSource: hasSearchText ? 'Search' : undefined, 289 291 recId: recIdForLogging, 290 292 position: position !== -1 ? position : 0, 291 293 suggestedDid: item.profile.did, ··· 548 550 moderationOpts, 549 551 noBorder, 550 552 position, 553 + recSource, 551 554 recId, 552 555 isGuide, 553 556 }: { ··· 555 558 moderationOpts: ModerationOpts 556 559 noBorder?: boolean 557 560 position: number 561 + recSource?: 'Search' 558 562 recId?: string 559 563 isGuide: boolean 560 564 }): React.ReactNode => { ··· 564 568 moderationOpts={moderationOpts} 565 569 noBorder={noBorder} 566 570 position={position} 571 + recSource={recSource} 567 572 recId={recId} 568 573 isGuide={isGuide} 569 574 /> ··· 577 582 onFollow, 578 583 noBorder, 579 584 position, 585 + recSource, 580 586 recId, 581 587 isGuide, 582 588 }: { ··· 585 591 onFollow?: () => void 586 592 noBorder?: boolean 587 593 position: number 594 + recSource?: 'Search' 588 595 recId?: string 589 596 isGuide: boolean 590 597 }) { ··· 625 632 ? 'ProgressGuide' 626 633 : 'SeeMoreSuggestedUsers', 627 634 location: 'Card', 635 + recSource, 628 636 recId, 629 637 position, 630 638 suggestedDid: profile.did,
+7 -1
src/screens/Onboarding/StepSuggestedAccounts/index.tsx
··· 105 105 ax.metric('suggestedUser:follow', { 106 106 logContext: 'Onboarding', 107 107 location: 'FollowAll', 108 + recSource: !useFullExperience ? 'Search' : undefined, 108 109 recId: suggestedUsers?.recId, 109 110 position: i, 110 111 suggestedDid: did, ··· 155 156 seenProfilesRef.current.add(did) 156 157 ax.metric('suggestedUser:seen', { 157 158 logContext: 'Onboarding', 159 + recSource: !useFullExperience ? 'Search' : undefined, 158 160 recId: suggestedUsers?.recId, 159 161 position, 160 162 suggestedDid: did, ··· 162 164 }) 163 165 } 164 166 }, 165 - [ax, selectedInterest, suggestedUsers?.recId], 167 + [ax, selectedInterest, suggestedUsers?.recId, useFullExperience], 166 168 ) 167 169 168 170 useEffect(() => { ··· 248 250 position={index} 249 251 category={selectedInterest} 250 252 onSeen={onProfileSeen} 253 + recSource={!useFullExperience ? 'Search' : undefined} 251 254 recId={suggestedUsers.recId} 252 255 /> 253 256 ))} ··· 358 361 position, 359 362 category, 360 363 onSeen, 364 + recSource, 361 365 recId, 362 366 }: { 363 367 profile: bsky.profile.AnyProfileView ··· 365 369 position: number 366 370 category: string | null 367 371 onSeen: (did: string, position: number) => void 372 + recSource?: 'Search' 368 373 recId?: number | string 369 374 }) { 370 375 const t = useTheme() ··· 432 437 ax.metric('suggestedUser:follow', { 433 438 logContext: 'Onboarding', 434 439 location: 'Card', 440 + recSource, 435 441 recId, 436 442 position, 437 443 suggestedDid: profile.did,
+2 -1
src/screens/Search/Explore.tsx
··· 162 162 type: 'profile' 163 163 key: string 164 164 profile: AppBskyActorDefs.ProfileView 165 - recId?: number 165 + recId?: string 166 166 } 167 167 | { 168 168 type: 'profileEmpty' ··· 406 406 type: 'profile', 407 407 key: actor.did, 408 408 profile: actor, 409 + recId: suggestedUsers.recId, 409 410 }) 410 411 } 411 412 }
+1 -1
src/screens/Search/modules/ExploreSuggestedAccounts.tsx
··· 105 105 }: { 106 106 profile: bsky.profile.AnyProfileView 107 107 moderationOpts: ModerationOpts 108 - recId?: number 108 + recId?: string 109 109 position: number 110 110 }): React.ReactNode => { 111 111 const t = useTheme()
+4
src/state/queries/trending/useGetSuggestedOnboardingUsersQuery.ts
··· 5 5 import {type QueryClient, useQuery} from '@tanstack/react-query' 6 6 7 7 import {createBskyTopicsHeader} from '#/lib/api/feed/utils' 8 + import {logger} from '#/logger' 8 9 import {getContentLanguages} from '#/state/preferences/languages' 9 10 import {STALE} from '#/state/queries' 10 11 import {usePreferencesQuery} from '#/state/queries/preferences' ··· 54 55 }, 55 56 ) 56 57 58 + if (!data.recIdStr) { 59 + logger.debug('getSuggestedOnboardingUsers response missing recIdStr') 60 + } 57 61 return {...data, recId: data.recIdStr} 58 62 }, 59 63 })
+4
src/state/queries/trending/useGetSuggestedUsersForDiscoverQuery.ts
··· 8 8 aggregateUserInterests, 9 9 createBskyTopicsHeader, 10 10 } from '#/lib/api/feed/utils' 11 + import {logger} from '#/logger' 11 12 import {getContentLanguages} from '#/state/preferences/languages' 12 13 import {STALE} from '#/state/queries' 13 14 import {usePreferencesQuery} from '#/state/queries/preferences' ··· 46 47 }, 47 48 }, 48 49 ) 50 + if (!data.recIdStr) { 51 + logger.debug('getSuggestedUsersForDiscover response missing recIdStr') 52 + } 49 53 return {...data, recId: data.recIdStr} 50 54 }, 51 55 })
+4
src/state/queries/trending/useGetSuggestedUsersForExploreQuery.ts
··· 8 8 aggregateUserInterests, 9 9 createBskyTopicsHeader, 10 10 } from '#/lib/api/feed/utils' 11 + import {logger} from '#/logger' 11 12 import {getContentLanguages} from '#/state/preferences/languages' 12 13 import {STALE} from '#/state/queries' 13 14 import {usePreferencesQuery} from '#/state/queries/preferences' ··· 48 49 }, 49 50 ) 50 51 52 + if (!data.recIdStr) { 53 + logger.debug('getSuggestedUsersForExplore response missing recIdStr') 54 + } 51 55 return {...data, recId: data.recIdStr} 52 56 }, 53 57 })
+4
src/state/queries/trending/useGetSuggestedUsersForSeeMoreQuery.ts
··· 8 8 aggregateUserInterests, 9 9 createBskyTopicsHeader, 10 10 } from '#/lib/api/feed/utils' 11 + import {logger} from '#/logger' 11 12 import {getContentLanguages} from '#/state/preferences/languages' 12 13 import {STALE} from '#/state/queries' 13 14 import {usePreferencesQuery} from '#/state/queries/preferences' ··· 54 55 }, 55 56 ) 56 57 58 + if (!data.recIdStr) { 59 + logger.debug('getSuggestedUsersForSeeMore response missing recIdStr') 60 + } 57 61 return {...data, recId: data.recIdStr} 58 62 }, 59 63 })