From 7c9e3b302bd6db8a1d5b6ea7fb446409244ba54a Mon Sep 17 00:00:00 2001 From: nsdeschenes Date: Wed, 19 Nov 2025 07:28:34 -0400 Subject: [PATCH 1/4] :sparkles: Set title to saved query name --- static/app/views/explore/spans/content.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/static/app/views/explore/spans/content.tsx b/static/app/views/explore/spans/content.tsx index 2239f5b5fb24ec..920112d3a09158 100644 --- a/static/app/views/explore/spans/content.tsx +++ b/static/app/views/explore/spans/content.tsx @@ -39,9 +39,8 @@ export function ExploreContent() { Sentry.setTag('explore.visited', 'yes'); const organization = useOrganization(); - const datePageFilterProps = limitMaxPickableDays(organization); - const onboardingProject = useOnboardingProject(); + const datePageFilterProps = limitMaxPickableDays(organization); return ( @@ -119,11 +118,17 @@ function ExploreTagsProvider({children}: SpansTabContextProps) { function SpansTabHeader() { const id = useQueryParamsId(); const title = useQueryParamsTitle(); + const organization = useOrganization(); const {data: savedQuery} = useGetSavedQuery(id); + const isSavedQuery = defined(id) && defined(savedQuery); + return ( + {isSavedQuery ? ( + + ) : null} {title && defined(id) ? ( ) : null} From 8fe80edb940a5349f82e580cfbe1949bd4ca1b90 Mon Sep 17 00:00:00 2001 From: nsdeschenes Date: Wed, 19 Nov 2025 07:46:18 -0400 Subject: [PATCH 2/4] :necktie: Ensure that a custom title is actually present --- static/app/views/explore/spans/content.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/app/views/explore/spans/content.tsx b/static/app/views/explore/spans/content.tsx index 920112d3a09158..0be2edd9ced2b2 100644 --- a/static/app/views/explore/spans/content.tsx +++ b/static/app/views/explore/spans/content.tsx @@ -121,12 +121,13 @@ function SpansTabHeader() { const organization = useOrganization(); const {data: savedQuery} = useGetSavedQuery(id); - const isSavedQuery = defined(id) && defined(savedQuery); + const showCustomTitle = + defined(title) && title.length > 0 && defined(id) && defined(savedQuery); return ( - {isSavedQuery ? ( + {showCustomTitle ? ( ) : null} {title && defined(id) ? ( From 4fbb092120af757fe3edaceae799fb86f17c9f86 Mon Sep 17 00:00:00 2001 From: nsdeschenes Date: Wed, 19 Nov 2025 07:56:15 -0400 Subject: [PATCH 3/4] :necktie: Used saved query name rather than title --- static/app/views/explore/spans/content.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/views/explore/spans/content.tsx b/static/app/views/explore/spans/content.tsx index 0be2edd9ced2b2..30eb313f88edfd 100644 --- a/static/app/views/explore/spans/content.tsx +++ b/static/app/views/explore/spans/content.tsx @@ -122,13 +122,13 @@ function SpansTabHeader() { const {data: savedQuery} = useGetSavedQuery(id); const showCustomTitle = - defined(title) && title.length > 0 && defined(id) && defined(savedQuery); + defined(id) && defined(savedQuery) && savedQuery.name.length > 0; return ( {showCustomTitle ? ( - + ) : null} {title && defined(id) ? ( From 9f4f4debb36d29e2dae469d7f35d9464dd24f1c4 Mon Sep 17 00:00:00 2001 From: nsdeschenes Date: Wed, 19 Nov 2025 09:08:59 -0400 Subject: [PATCH 4/4] :recycle: Use better naming conventions --- static/app/views/explore/spans/content.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/views/explore/spans/content.tsx b/static/app/views/explore/spans/content.tsx index 30eb313f88edfd..da69c049274b98 100644 --- a/static/app/views/explore/spans/content.tsx +++ b/static/app/views/explore/spans/content.tsx @@ -121,13 +121,13 @@ function SpansTabHeader() { const organization = useOrganization(); const {data: savedQuery} = useGetSavedQuery(id); - const showCustomTitle = + const hasSavedQueryTitle = defined(id) && defined(savedQuery) && savedQuery.name.length > 0; return ( - {showCustomTitle ? ( + {hasSavedQueryTitle ? ( ) : null} {title && defined(id) ? (