feat(releases): Add mobile tab to releases#104376
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| numberOfMobileBuilds === 0 ? ( | ||
| <BadgeWrapper> | ||
| <FeatureBadge type="new" /> | ||
| <FeatureBadge type="beta" /> |
There was a problem hiding this comment.
Unifying on "Beta" per Max and I's discussion
| selection={selection} | ||
| /> | ||
| <ReleasesPageFilterBar condensed> | ||
| <Layout.Header noActionWrap> |
| )} | ||
|
|
||
| {selectedTab === 'releases' && ( | ||
| <Fragment> |
There was a problem hiding this comment.
All content here is the same, just gated behind the selectedTab being 'releases'
| const ReleasesPageFilterBar = styled(PageFilterBar)` | ||
| margin-bottom: ${space(2)}; | ||
| const ReleasesPageFilterBar = styled(PageFilterBar)<{shouldShowMobileBuildsTab: boolean}>` | ||
| ${p => !p.shouldShowMobileBuildsTab && `margin-bottom: ${p.theme.space.xl};`} |
| ([...mobile, ...desktop] as string[]).includes(releaseProjectPlatform); | ||
| export const isMobileRelease = ( | ||
| releaseProjectPlatform: PlatformKey, | ||
| includeDesktop = true |
There was a problem hiding this comment.
that's a funny prop
isMobile .... or sometimes desktop. lol
There was a problem hiding this comment.
I agree but I admittedly don't have context here. Appears this change is just styling but will follow up and remove this weird includeDesktop behavior if I get the greenlight to from @mtopo27
ryan953
left a comment
There was a problem hiding this comment.
works for me. some nits if that's your thing.
when you're ready!
|
@sentry review |
|
cursor review |
| return 'releases'; | ||
| } | ||
| return (decodeScalar(location.query.tab) as ReleaseTab | undefined) || 'releases'; | ||
| }, [shouldShowMobileBuildsTab, location.query.tab]); |
There was a problem hiding this comment.
Invalid tab URL parameter causes empty page body
The selectedTab computation at line 230 casts the URL tab parameter directly to ReleaseTab without validation. If a user manually enters an invalid tab value like ?tab=invalid, decodeScalar returns "invalid" (truthy, so the || 'releases' fallback doesn't trigger). Since neither selectedTab === 'mobile-builds' nor selectedTab === 'releases' matches, the page body renders empty. Other similar patterns in the codebase (e.g., configureIntegration.tsx) properly validate against a list of valid tabs.
Additional Locations (1)
| 'preprod.builds.release.build_row_clicked': BasePreprodBuildEvent; | ||
| 'preprod.releases.mobile-builds.tab-clicked': { | ||
| organization: Organization; | ||
| }; |
There was a problem hiding this comment.
Analytics event defined but never tracked
The analytics event 'preprod.releases.mobile-builds.tab-clicked' is defined in preprodBuildAnalyticsEvents.tsx with its corresponding event map entry, but no trackAnalytics call is made when the Mobile Builds tab is clicked. The tab navigation uses the to prop for routing without an onClick handler to track the analytics event. This means tab click analytics will not be collected despite the event being set up.



context: https://www.notion.so/sentry/Integrating-with-releases-short-term-fix-2b08b10e4b5d80cbb28ccbdefe46f7f8#2b58b10e4b5d80acb810f8af7c651bac
When mobile project selected:


When non-mobile project is selected (also tested to confirm default releases page is handled when switching from mobile back to non-mobile):
