Skip to content

feat(issue-search): Update suggested issue.type values to include all issue types #83529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions static/app/types/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@ export enum IssueType {
REPLAY_HYDRATION_ERROR = 'replay_hydration_error',
}

// Update this if adding an issue type that you don't want to show up in search!
export const VISIBLE_ISSUE_TYPES = Object.values(IssueType).filter(
type =>
![
IssueType.PROFILE_FRAME_DROP_EXPERIMENTAL,
IssueType.PROFILE_FUNCTION_REGRESSION_EXPERIMENTAL,
].includes(type)
);

export enum IssueTitle {
ERROR = 'Error',

// Performance
PERFORMANCE_CONSECUTIVE_DB_QUERIES = 'Consecutive DB Queries',
PERFORMANCE_CONSECUTIVE_HTTP = 'Consecutive HTTP',
Expand Down Expand Up @@ -136,6 +147,8 @@ export enum IssueTitle {
}

const ISSUE_TYPE_TO_ISSUE_TITLE = {
error: IssueTitle.ERROR,

performance_consecutive_db_queries: IssueTitle.PERFORMANCE_CONSECUTIVE_DB_QUERIES,
performance_consecutive_http: IssueTitle.PERFORMANCE_CONSECUTIVE_HTTP,
performance_file_io_main_thread: IssueTitle.PERFORMANCE_FILE_IO_MAIN_THREAD,
Expand Down
17 changes: 2 additions & 15 deletions static/app/views/issueList/utils/useFetchIssueTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {useLegacyStore} from 'sentry/stores/useLegacyStore';
import {
getIssueTitleFromType,
IssueCategory,
IssueType,
PriorityLevel,
type Tag,
type TagCollection,
VISIBLE_ISSUE_TYPES,
} from 'sentry/types/group';
import type {Organization} from 'sentry/types/organization';
import type {User} from 'sentry/types/user';
Expand Down Expand Up @@ -267,20 +267,7 @@ function builtInIssuesFields(
[FieldKey.ISSUE_TYPE]: {
...PREDEFINED_FIELDS[FieldKey.ISSUE_TYPE]!,
name: 'Issue Type',
values: [
IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
IssueType.PERFORMANCE_N_PLUS_ONE_API_CALLS,
IssueType.PERFORMANCE_CONSECUTIVE_DB_QUERIES,
IssueType.PERFORMANCE_SLOW_DB_QUERY,
IssueType.PERFORMANCE_RENDER_BLOCKING_ASSET,
IssueType.PERFORMANCE_UNCOMPRESSED_ASSET,
IssueType.PERFORMANCE_ENDPOINT_REGRESSION,
IssueType.PROFILE_FILE_IO_MAIN_THREAD,
IssueType.PROFILE_IMAGE_DECODE_MAIN_THREAD,
IssueType.PROFILE_JSON_DECODE_MAIN_THREAD,
IssueType.PROFILE_REGEX_MAIN_THREAD,
IssueType.PROFILE_FUNCTION_REGRESSION,
].map(value => ({
values: VISIBLE_ISSUE_TYPES.map(value => ({
icon: null,
title: value,
name: value,
Expand Down
Loading