Skip to content

Commit 5c7675a

Browse files
authored
fix(replay): Alias screen, screens, urls to url when fetching search suggestions (#97531)
Fixes REPLAY-594 <img width="379" height="174" alt="SCR-20250808-nmqr" src="https://github.com/user-attachments/assets/5373818f-111f-4459-9c4c-b6023470509f" />
1 parent ef92b1f commit 5c7675a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

static/app/utils/fields/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,6 +2572,12 @@ export const REPLAY_FIELDS = [
25722572
FieldKey.OTA_UPDATES_UPDATE_ID,
25732573
];
25742574

2575+
export const REPLAY_TAG_ALIASES = {
2576+
[ReplayFieldKey.SCREEN]: ReplayFieldKey.URL,
2577+
[ReplayFieldKey.SCREENS]: ReplayFieldKey.URL,
2578+
[ReplayFieldKey.URLS]: ReplayFieldKey.URL,
2579+
};
2580+
25752581
const REPLAY_FIELD_DEFINITIONS: Record<ReplayFieldKey, FieldDefinition> = {
25762582
[ReplayFieldKey.ACTIVITY]: {
25772583
desc: t('Amount of activity in the replay from 0 to 10'),

static/app/views/replays/list/replaySearchBar.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
getFieldDefinition,
1919
REPLAY_CLICK_FIELDS,
2020
REPLAY_FIELDS,
21+
REPLAY_TAG_ALIASES,
2122
} from 'sentry/utils/fields';
2223
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
2324
import useApi from 'sentry/utils/useApi';
@@ -159,10 +160,15 @@ function ReplaySearchBar(props: Props) {
159160
statsPeriod,
160161
};
161162

163+
const searchName =
164+
tag.key in REPLAY_TAG_ALIASES
165+
? REPLAY_TAG_ALIASES[tag.key as keyof typeof REPLAY_TAG_ALIASES]
166+
: tag.key;
167+
162168
return fetchTagValues({
163169
api,
164170
orgSlug: organization.slug,
165-
tagKey: tag.key,
171+
tagKey: searchName,
166172
search: searchQuery,
167173
projectIds: projectIds?.map(String),
168174
endpointParams,

0 commit comments

Comments
 (0)