From c52b0f794bb40b96dc6d00ab0c1f78da89c15cac Mon Sep 17 00:00:00 2001 From: billy Date: Thu, 18 Jun 2026 19:36:38 +0000 Subject: [PATCH 1/4] fix(seer): show GitLab icon for GitLab SCM links in Seer evidence UI git_search tool links hardcoded for all providers. Adds getScmIcon(url) that inspects the URL hostname and returns for GitLab domains, falling back to . Fixes CW-1528 Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> --- .../events/autofix/v3/autofixEvidence.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/autofix/v3/autofixEvidence.tsx b/static/app/components/events/autofix/v3/autofixEvidence.tsx index c8097718622c97..60fd9497857a86 100644 --- a/static/app/components/events/autofix/v3/autofixEvidence.tsx +++ b/static/app/components/events/autofix/v3/autofixEvidence.tsx @@ -6,6 +6,7 @@ import {LinkButton} from '@sentry/scraps/button'; import {IconCompass} from 'sentry/icons/iconCompass'; import {IconFile} from 'sentry/icons/iconFile'; import {IconGithub} from 'sentry/icons/iconGithub'; +import {IconGitlab} from 'sentry/icons/iconGitlab'; import {IconIssues} from 'sentry/icons/iconIssues'; import {IconPlay} from 'sentry/icons/iconPlay'; import {IconProfiling} from 'sentry/icons/iconProfiling'; @@ -309,6 +310,18 @@ function getCodeSearchEvidenceProps({ return null; } +function getScmIcon(url: string): ReactNode { + try { + const {hostname} = new URL(url); + if (hostname.includes('gitlab')) { + return ; + } + } catch { + // fall through to default + } + return ; +} + function getGitSearchEvidenceProps({ toolLink, }: GetEvidencePropsPayload): EvidenceButtonProps | null { @@ -318,7 +331,7 @@ function getGitSearchEvidenceProps({ if (typeof commit_url === 'string' && typeof sha === 'string') { return { href: commit_url, - icon: , // TODO: support other SCMs + icon: getScmIcon(commit_url), label: t('Commit: %s', truncateText(getShortCommitHash(sha))), tooltip: sha, }; @@ -334,7 +347,7 @@ function getGitSearchEvidenceProps({ typeof file_path === 'string' ? extractFileName(file_path) : undefined; return { href: commits_url, - icon: , // TODO: support other SCMs + icon: getScmIcon(commits_url), label: t('Commits: %s', fileName ? truncateText(fileName) : repo_name), tooltip: ( From 2123f6bb9b97130f1cb1aecadf955077f1ca0b91 Mon Sep 17 00:00:00 2001 From: billy Date: Thu, 18 Jun 2026 19:58:00 +0000 Subject: [PATCH 2/4] fix(seer): use provider param for SCM icon in git_search evidence Use params.provider (e.g. 'integrations:gitlab') instead of hostname sniffing to pick the right icon. The URL-based approach breaks for self-hosted GitLab instances whose domain doesn't contain 'gitlab'. Depends on getsentry/seer#7031 adding provider to the tool link params. Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> --- .../events/autofix/v3/autofixEvidence.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/static/app/components/events/autofix/v3/autofixEvidence.tsx b/static/app/components/events/autofix/v3/autofixEvidence.tsx index 60fd9497857a86..815c2cedc7b831 100644 --- a/static/app/components/events/autofix/v3/autofixEvidence.tsx +++ b/static/app/components/events/autofix/v3/autofixEvidence.tsx @@ -310,14 +310,9 @@ function getCodeSearchEvidenceProps({ return null; } -function getScmIcon(url: string): ReactNode { - try { - const {hostname} = new URL(url); - if (hostname.includes('gitlab')) { - return ; - } - } catch { - // fall through to default +function getScmIcon(provider: string | undefined): ReactNode { + if (provider === 'integrations:gitlab') { + return ; } return ; } @@ -325,13 +320,13 @@ function getScmIcon(url: string): ReactNode { function getGitSearchEvidenceProps({ toolLink, }: GetEvidencePropsPayload): EvidenceButtonProps | null { - const {repo_name, commit_url, sha, commits_url, start_date, end_date, file_path} = + const {repo_name, commit_url, sha, commits_url, start_date, end_date, file_path, provider} = toolLink?.params ?? {}; if (typeof commit_url === 'string' && typeof sha === 'string') { return { href: commit_url, - icon: getScmIcon(commit_url), + icon: getScmIcon(provider), label: t('Commit: %s', truncateText(getShortCommitHash(sha))), tooltip: sha, }; @@ -347,7 +342,7 @@ function getGitSearchEvidenceProps({ typeof file_path === 'string' ? extractFileName(file_path) : undefined; return { href: commits_url, - icon: getScmIcon(commits_url), + icon: getScmIcon(provider), label: t('Commits: %s', fileName ? truncateText(fileName) : repo_name), tooltip: ( From cccd003ea2e0ad445843aada99530c6a30580c46 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Fri, 19 Jun 2026 12:42:43 -0400 Subject: [PATCH 3/4] style(seer): Apply formatter to autofixEvidence destructuring Reorder destructured keys to match the formatter's canonical output so the pre-commit `format` hook passes in CI. No behavior change. Co-Authored-By: Claude Opus 4.8 --- .../components/events/autofix/v3/autofixEvidence.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/autofix/v3/autofixEvidence.tsx b/static/app/components/events/autofix/v3/autofixEvidence.tsx index 815c2cedc7b831..516e4016684ff5 100644 --- a/static/app/components/events/autofix/v3/autofixEvidence.tsx +++ b/static/app/components/events/autofix/v3/autofixEvidence.tsx @@ -320,8 +320,16 @@ function getScmIcon(provider: string | undefined): ReactNode { function getGitSearchEvidenceProps({ toolLink, }: GetEvidencePropsPayload): EvidenceButtonProps | null { - const {repo_name, commit_url, sha, commits_url, start_date, end_date, file_path, provider} = - toolLink?.params ?? {}; + const { + repo_name, + commit_url, + sha, + commits_url, + start_date, + end_date, + file_path, + provider, + } = toolLink?.params ?? {}; if (typeof commit_url === 'string' && typeof sha === 'string') { return { From 3ec7cc57e6e6278b384cd95852c228278581af9d Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Mon, 22 Jun 2026 10:45:44 -0400 Subject: [PATCH 4/4] reusabnle component --- .../events/autofix/v3/autofixEvidence.tsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/static/app/components/events/autofix/v3/autofixEvidence.tsx b/static/app/components/events/autofix/v3/autofixEvidence.tsx index 516e4016684ff5..96f9855c912499 100644 --- a/static/app/components/events/autofix/v3/autofixEvidence.tsx +++ b/static/app/components/events/autofix/v3/autofixEvidence.tsx @@ -3,10 +3,9 @@ import type {LocationDescriptor} from 'history'; import {LinkButton} from '@sentry/scraps/button'; +import {RepoProviderIcon} from 'sentry/components/repositories/repoProviderIcon'; import {IconCompass} from 'sentry/icons/iconCompass'; import {IconFile} from 'sentry/icons/iconFile'; -import {IconGithub} from 'sentry/icons/iconGithub'; -import {IconGitlab} from 'sentry/icons/iconGitlab'; import {IconIssues} from 'sentry/icons/iconIssues'; import {IconPlay} from 'sentry/icons/iconPlay'; import {IconProfiling} from 'sentry/icons/iconProfiling'; @@ -310,13 +309,6 @@ function getCodeSearchEvidenceProps({ return null; } -function getScmIcon(provider: string | undefined): ReactNode { - if (provider === 'integrations:gitlab') { - return ; - } - return ; -} - function getGitSearchEvidenceProps({ toolLink, }: GetEvidencePropsPayload): EvidenceButtonProps | null { @@ -334,7 +326,7 @@ function getGitSearchEvidenceProps({ if (typeof commit_url === 'string' && typeof sha === 'string') { return { href: commit_url, - icon: getScmIcon(provider), + icon: , label: t('Commit: %s', truncateText(getShortCommitHash(sha))), tooltip: sha, }; @@ -350,7 +342,7 @@ function getGitSearchEvidenceProps({ typeof file_path === 'string' ? extractFileName(file_path) : undefined; return { href: commits_url, - icon: getScmIcon(provider), + icon: , label: t('Commits: %s', fileName ? truncateText(fileName) : repo_name), tooltip: (