Skip to content

Commit 747010a

Browse files
trevor-eandrewshie-sentry
authored andcommitted
feat(preprod): add version and code to page title (#98968)
Can add some more customization later on, but should at least help differentiate when looking at different builds. I was considering adding the app ID but that might make it too long.
1 parent 34476c6 commit 747010a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

static/app/views/preprod/buildDetails/buildDetails.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as Layout from 'sentry/components/layouts/thirds';
22
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
3+
import {t} from 'sentry/locale';
34
import {useApiQuery, type UseApiQueryResult} from 'sentry/utils/queryClient';
45
import type RequestError from 'sentry/utils/requestError/requestError';
56
import {UrlParamBatchProvider} from 'sentry/utils/url/urlParamBatchContext';
@@ -40,8 +41,22 @@ export default function BuildDetails() {
4041
}
4142
);
4243

44+
const buildDetails = buildDetailsQuery.data;
45+
const version = buildDetails?.app_info?.version;
46+
const buildNumber = buildDetails?.app_info?.build_number;
47+
48+
let title = t('Build details');
49+
if (
50+
version !== undefined &&
51+
version !== '' &&
52+
buildNumber !== undefined &&
53+
buildNumber !== ''
54+
) {
55+
title = t('Build details v%s (%s)', version, buildNumber);
56+
}
57+
4358
return (
44-
<SentryDocumentTitle title="Build details">
59+
<SentryDocumentTitle title={title}>
4560
<Layout.Page>
4661
<Layout.Header>
4762
<BuildDetailsHeaderContent

0 commit comments

Comments
 (0)