From 2231795820fc6f30b82985e487c388c6f8608f5a Mon Sep 17 00:00:00 2001 From: Tillman Elser Date: Wed, 14 May 2025 09:46:20 -0700 Subject: [PATCH 1/7] update seer references --- .../events/autofix/autofixChanges.tsx | 2 +- .../events/autofix/autofixFeedback.tsx | 2 +- .../events/autofix/autofixInsightSources.tsx | 2 +- .../events/autofix/autofixRootCause.tsx | 2 +- .../autofix/autofixSetupWriteAccessModal.tsx | 4 ++-- .../events/autofix/autofixSolution.tsx | 6 +++--- .../events/autofix/autofixStartBox.tsx | 2 +- .../events/autofix/autofixSteps.tsx | 8 +++---- .../streamline/sidebar/seerDrawer.tsx | 6 +++--- .../streamline/sidebar/seerNotices.tsx | 21 ++++++++----------- .../sidebar/seerSectionCtaButton.tsx | 6 +++--- .../projectSeer/addAutofixRepoModal.tsx | 2 +- .../settings/projectSeer/autofixRepoItem.tsx | 8 +++---- .../projectSeer/autofixRepositories.tsx | 4 ++-- 14 files changed, 36 insertions(+), 39 deletions(-) diff --git a/static/app/components/events/autofix/autofixChanges.tsx b/static/app/components/events/autofix/autofixChanges.tsx index 1842a166e21628..7179f47d2539de 100644 --- a/static/app/components/events/autofix/autofixChanges.tsx +++ b/static/app/components/events/autofix/autofixChanges.tsx @@ -343,7 +343,7 @@ export function AutofixChanges({ : null } isAgentComment - blockName={t('Autofix is uncertain of the code changes...')} + blockName={t('Seer is uncertain of the code changes...')} /> )} diff --git a/static/app/components/events/autofix/autofixFeedback.tsx b/static/app/components/events/autofix/autofixFeedback.tsx index f3278d76a4a326..b0075df46125bc 100644 --- a/static/app/components/events/autofix/autofixFeedback.tsx +++ b/static/app/components/events/autofix/autofixFeedback.tsx @@ -18,7 +18,7 @@ function AutofixFeedback() { size="xs" onClick={() => openForm({ - messagePlaceholder: t('How can we make Autofix better for you?'), + messagePlaceholder: t('How can we make Seer better for you?'), tags: { ['feedback.source']: 'issue_details_ai_autofix', ['feedback.owner']: 'ml-ai', diff --git a/static/app/components/events/autofix/autofixInsightSources.tsx b/static/app/components/events/autofix/autofixInsightSources.tsx index 00504932ee5a09..f95e0a64746407 100644 --- a/static/app/components/events/autofix/autofixInsightSources.tsx +++ b/static/app/components/events/autofix/autofixInsightSources.tsx @@ -280,7 +280,7 @@ function AutofixInsightSources({sources, title, codeUrls}: AutofixInsightSources data-overlay="true" > - {t("Autofix's Thoughts")} + {t("Seer's Thoughts")} {title && "{title.trim()}"} diff --git a/static/app/components/events/autofix/autofixRootCause.tsx b/static/app/components/events/autofix/autofixRootCause.tsx index 03101e182d190f..d1104595fd8023 100644 --- a/static/app/components/events/autofix/autofixRootCause.tsx +++ b/static/app/components/events/autofix/autofixRootCause.tsx @@ -393,7 +393,7 @@ function AutofixRootCauseDisplay({ : null } isAgentComment - blockName={t('Autofix is uncertain of the root cause...')} + blockName={t('Seer is uncertain of the root cause...')} /> )} diff --git a/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx b/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx index c7e1ce88231789..3390b2474ad319 100644 --- a/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx +++ b/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx @@ -108,7 +108,7 @@ export function AutofixSetupWriteAccessModal({ return (
-

{t('Allow Autofix to Make Pull Requests')}

+

{t('Allow Seer to Make Pull Requests')}

@@ -122,7 +122,7 @@ export function AutofixSetupWriteAccessModal({ external priority="primary" > - {t('Install the Autofix GitHub App')} + {t('Install the Seer GitHub App')} diff --git a/static/app/components/events/autofix/autofixSolution.tsx b/static/app/components/events/autofix/autofixSolution.tsx index 921c16bc5f89f3..31a129c02ab965 100644 --- a/static/app/components/events/autofix/autofixSolution.tsx +++ b/static/app/components/events/autofix/autofixSolution.tsx @@ -434,11 +434,11 @@ function AutofixSolutionDisplay({ title={ hasNoRepos ? t( - 'You need to set up the GitHub integration and configure repository access for Autofix to write code for you.' + 'You need to set up the GitHub integration and configure repository access for Seer to write code for you.' ) : cantReadRepos ? t( - "We can't access any of your repos. Check your GitHub integration and configure repository access for Autofix to write code for you." + "We can't access any of your repos. Check your GitHub integration and configure repository access for Seer to write code for you." ) : undefined } @@ -472,7 +472,7 @@ function AutofixSolutionDisplay({ : null } isAgentComment - blockName={t('Autofix is uncertain of the solution...')} + blockName={t('Seer is uncertain of the solution...')} /> )} diff --git a/static/app/components/events/autofix/autofixStartBox.tsx b/static/app/components/events/autofix/autofixStartBox.tsx index 26d3bc8b97a852..f3fcf3b04dcb0a 100644 --- a/static/app/components/events/autofix/autofixStartBox.tsx +++ b/static/app/components/events/autofix/autofixStartBox.tsx @@ -95,7 +95,7 @@ export function AutofixStartBox({onSend, groupId}: AutofixStartBoxProps) { } analyticsParams={{group_id: groupId}} > - {t('Start Autofix')} + {t('Start Seer')} diff --git a/static/app/components/events/autofix/autofixSteps.tsx b/static/app/components/events/autofix/autofixSteps.tsx index e8e3c8d5858d81..eb758545be739d 100644 --- a/static/app/components/events/autofix/autofixSteps.tsx +++ b/static/app/components/events/autofix/autofixSteps.tsx @@ -174,19 +174,19 @@ export function AutofixSteps({data, groupId, runId}: AutofixStepsProps) { errorMessage.toLowerCase().includes('tokens') ) { customErrorMessage = t( - "Autofix worked so hard that it couldn't fit all its findings in its own memory. Please try again." + "Seer worked so hard that it couldn't fit all its findings in its own memory. Please try again." ); } else if (errorMessage.toLowerCase().includes('iterations')) { customErrorMessage = t( - 'Autofix was taking a ton of iterations, so we pulled the plug out of fear it might go rogue. Please try again.' + 'Seer was taking a ton of iterations, so we pulled the plug out of fear it might go rogue. Please try again.' ); } else if (errorMessage.toLowerCase().includes('timeout')) { customErrorMessage = t( - 'Autofix was taking way too long, so we pulled the plug to put it out of its misery. Please try again.' + 'Seer was taking way too long, so we pulled the plug to put it out of its misery. Please try again.' ); } else { customErrorMessage = t( - "Oops, Autofix went kaput. We've dispatched Autofix to fix Autofix. In the meantime, try again?" + "Oops, Seer went kaput. We've dispatched Seer to fix Seer. In the meantime, try again?" ); } diff --git a/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx b/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx index 1efbf6d83271dd..4a3caada11bac0 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx @@ -185,7 +185,7 @@ export function SeerDrawer({group, project, event}: SeerDrawerProps) { -
{t('Autofix')}
+
{t('Seer')}
} /> diff --git a/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx b/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx index 87138b2c80936b..b658cf60d71599 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx @@ -28,13 +28,13 @@ function GithubIntegrationSetupCard() { {t('Set Up the GitHub Integration')} - {tct('Autofix is [bold:a lot better] when it has your codebase as context.', { + {tct('Seer is [bold:a lot better] when it has your codebase as context.', { bold: , })} {tct( - 'Set up the [integrationLink:GitHub Integration] to allow Autofix to go deeper when troubleshooting and fixing your issues–including writing the code and opening PRs.', + 'Set up the [integrationLink:GitHub Integration] to allow Seer to go deeper when troubleshooting and fixing your issues–including writing the code and opening PRs.', { integrationLink: ( {t('Pick Repositories to Work In')} - {tct('Autofix is [bold:a lot better] when it has your codebase as context.', { + {tct('Seer is [bold:a lot better] when it has your codebase as context.', { bold: , })} {tct( - 'Select the repos Autofix can explore in this project to allow it to go deeper when troubleshooting and fixing your issues–including writing the code and opening PRs.', + 'Select the repos Seer can explore in this project to allow it to go deeper when troubleshooting and fixing your issues–including writing the code and opening PRs.', { integrationLink: ( {t( - 'You can also configure working branches and custom instructions so Autofix acts just how you like.' + 'You can also configure working branches and custom instructions so Seer acts just how you like.' )} @@ -134,7 +134,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice notices.push( - {tct("Autofix can't access these repositories: [repoList].", { + {tct("Seer can't access these repositories: [repoList].", { repoList: {unreadableRepos.map(repo => repo.name).join(', ')}, })} {githubRepos.length > 0 && ( @@ -153,10 +153,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice )} {nonGithubRepos.length > 0 && ( - - {' '} - {t('Autofix currently only supports GitHub repositories.')} - + {t('Seer currently only supports GitHub repositories.')} )} ); @@ -166,7 +163,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice {unreadableRepo.provider.includes('github') ? tct( - "Autofix can't access the [repo] repository, make sure the [integrationLink:GitHub integration] is correctly set up.", + "Seer can't access the [repo] repository, make sure the [integrationLink:GitHub integration] is correctly set up.", { repo: {unreadableRepo.name}, integrationLink: ( @@ -177,7 +174,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice } ) : tct( - "Autofix can't access the [repo] repository. It currently only supports GitHub repositories.", + "Seer can't access the [repo] repository. It currently only supports GitHub repositories.", {repo: {unreadableRepo.name}} )} diff --git a/static/app/views/issueDetails/streamline/sidebar/seerSectionCtaButton.tsx b/static/app/views/issueDetails/streamline/sidebar/seerSectionCtaButton.tsx index f18e6aaf67b2a1..b6eb57c5ad4512 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerSectionCtaButton.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerSectionCtaButton.tsx @@ -98,13 +98,13 @@ export function SeerSectionCtaButton({ ); if (prevProcessingStep && prevProcessingStep.status !== AutofixStatus.COMPLETED) { if (currentSteps.some(step => step.type === AutofixStepType.CHANGES)) { - addSuccessMessage(t('Autofix has finished coding.')); + addSuccessMessage(t('Seer has finished coding.')); } else if (currentSteps.some(step => step.type === AutofixStepType.SOLUTION)) { - addSuccessMessage(t('Autofix has found a solution.')); + addSuccessMessage(t('Seer has found a solution.')); } else if ( currentSteps.some(step => step.type === AutofixStepType.ROOT_CAUSE_ANALYSIS) ) { - addSuccessMessage(t('Autofix has found the root cause.')); + addSuccessMessage(t('Seer has found the root cause.')); } } } diff --git a/static/app/views/settings/projectSeer/addAutofixRepoModal.tsx b/static/app/views/settings/projectSeer/addAutofixRepoModal.tsx index af70785848f420..ab9988d27f6db1 100644 --- a/static/app/views/settings/projectSeer/addAutofixRepoModal.tsx +++ b/static/app/views/settings/projectSeer/addAutofixRepoModal.tsx @@ -114,7 +114,7 @@ export function AddAutofixRepoModalContent({ {showMaxLimitAlert && ( - {t('Autofix is currently limited to %s repositories.', maxReposLimit)} + {t('Seer is currently limited to %s repositories.', maxReposLimit)} )} diff --git a/static/app/views/settings/projectSeer/autofixRepoItem.tsx b/static/app/views/settings/projectSeer/autofixRepoItem.tsx index 962ebd34eb62af..e7a81cfee09698 100644 --- a/static/app/views/settings/projectSeer/autofixRepoItem.tsx +++ b/static/app/views/settings/projectSeer/autofixRepoItem.tsx @@ -99,10 +99,10 @@ export function AutofixRepoItem({repo, onRemove, settings, onSettingsChange}: Pr
- {t('Branch that Autofix works on')} + {t('Branch that Seer works on')} @@ -144,12 +144,12 @@ export function AutofixRepoItem({repo, onRemove, settings, onSettingsChange}: Pr - {t('Instructions for Autofix')} + {t('Instructions for Seer')} diff --git a/static/app/views/settings/projectSeer/autofixRepositories.tsx b/static/app/views/settings/projectSeer/autofixRepositories.tsx index 6ac2755324461b..575b1f065118d6 100644 --- a/static/app/views/settings/projectSeer/autofixRepositories.tsx +++ b/static/app/views/settings/projectSeer/autofixRepositories.tsx @@ -198,7 +198,7 @@ export function AutofixRepositories({project}: ProjectSeerProps) { {t('Autofix Repositories')} @@ -225,7 +225,7 @@ export function AutofixRepositories({project}: ProjectSeerProps) { {showSaveNotice && ( {t( - 'Changes will apply on the next Autofix run or hit "Start Over" in the Autofix panel to start a new run and use your changes.' + 'Changes will apply on the next Seer run or hit "Start Over" in the Seer panel to start a new run and use your changes.' )} )} From f0f82f113039bb0fd6b1f4ef83e1399b6c6927dd Mon Sep 17 00:00:00 2001 From: Rohan Agarwal <47861399+roaga@users.noreply.github.com> Date: Wed, 14 May 2025 10:08:46 -0700 Subject: [PATCH 2/7] Update static/app/components/events/autofix/autofixSteps.tsx Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> --- static/app/components/events/autofix/autofixSteps.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/components/events/autofix/autofixSteps.tsx b/static/app/components/events/autofix/autofixSteps.tsx index eb758545be739d..05d90ef22341e6 100644 --- a/static/app/components/events/autofix/autofixSteps.tsx +++ b/static/app/components/events/autofix/autofixSteps.tsx @@ -182,7 +182,7 @@ export function AutofixSteps({data, groupId, runId}: AutofixStepsProps) { ); } else if (errorMessage.toLowerCase().includes('timeout')) { customErrorMessage = t( - 'Seer was taking way too long, so we pulled the plug to put it out of its misery. Please try again.' + 'Seer was taking way too long, so we pulled the plug to turn it off and on again. Please try again.' ); } else { customErrorMessage = t( From e17661050e20f967f184fabc947c74fb886478c1 Mon Sep 17 00:00:00 2001 From: Tillman Elser Date: Thu, 15 May 2025 21:38:18 -0700 Subject: [PATCH 3/7] update tests --- .../autofixSetupWriteAccessModal.spec.tsx | 2 +- .../autofix/autofixSetupWriteAccessModal.tsx | 4 +-- .../streamline/sidebar/seerDrawer.spec.tsx | 30 +++++++++---------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/static/app/components/events/autofix/autofixSetupWriteAccessModal.spec.tsx b/static/app/components/events/autofix/autofixSetupWriteAccessModal.spec.tsx index 35d541cbb10d6d..032bdd273b23b3 100644 --- a/static/app/components/events/autofix/autofixSetupWriteAccessModal.spec.tsx +++ b/static/app/components/events/autofix/autofixSetupWriteAccessModal.spec.tsx @@ -53,7 +53,7 @@ describe('AutofixSetupWriteAccessModal', function () { expect(screen.getByText('getsentry/seer')).toBeInTheDocument(); expect( - screen.getByRole('button', {name: 'Install the Autofix GitHub App'}) + screen.getByRole('button', {name: 'Install the Seer GitHub App'}) ).toHaveAttribute('href', 'https://github.com/apps/sentry-autofix/installations/new'); }); diff --git a/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx b/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx index 3390b2474ad319..25e13e43303cc4 100644 --- a/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx +++ b/static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx @@ -59,7 +59,7 @@ function Content({groupId, closeModal}: {closeModal: () => void; groupId: string

{tct( - 'In order to create pull requests, install and grant write access to the [link:Sentry Autofix GitHub App] for the following repositories:', + 'In order to create pull requests, install and grant write access to the [link:Sentry Seer GitHub App] for the following repositories:', { link: ( void; groupId: string

{tct( - 'In order to create pull requests, install and grant write access to the [link:Sentry Autofix GitHub App] for the relevant repositories.', + 'In order to create pull requests, install and grant write access to the [link:Sentry Seer GitHub App] for the relevant repositories.', { link: ( { expect(screen.getByText(mockEvent.id)).toBeInTheDocument(); - expect(screen.getByText('Autofix')).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Seer'})).toBeInTheDocument(); expect(screen.getByTestId('ai-setup-data-consent')).toBeInTheDocument(); }); - it('renders initial state with Start Autofix button', async () => { + it('renders initial state with Start Seer button', async () => { MockApiClient.addMockResponse({ url: `/organizations/${mockProject.organization.slug}/issues/${mockGroup.id}/autofix/`, body: {autofix: null}, @@ -184,10 +184,10 @@ describe('SeerDrawer', () => { screen.queryByTestId('ai-setup-loading-indicator') ); - expect(screen.getByText('Autofix')).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Seer'})).toBeInTheDocument(); - // Verify the Start Autofix button is available - const startButton = screen.getByRole('button', {name: 'Start Autofix'}); + // Verify the Start Seer button is available + const startButton = screen.getByRole('button', {name: 'Start Seer'}); expect(startButton).toBeInTheDocument(); }); @@ -219,11 +219,11 @@ describe('SeerDrawer', () => { expect(screen.getByText('Set Up the GitHub Integration')).toBeInTheDocument(); expect(screen.getByText('Set Up Now')).toBeInTheDocument(); - const startButton = screen.getByRole('button', {name: 'Start Autofix'}); + const startButton = screen.getByRole('button', {name: 'Start Seer'}); expect(startButton).toBeInTheDocument(); }); - it('triggers autofix on clicking the Start button', async () => { + it('triggers Seer on clicking the Start button', async () => { MockApiClient.addMockResponse({ url: `/organizations/${mockProject.organization.slug}/issues/${mockGroup.id}/autofix/`, method: 'POST', @@ -245,7 +245,7 @@ describe('SeerDrawer', () => { screen.queryByTestId('ai-setup-loading-indicator') ); - const startButton = screen.getByRole('button', {name: 'Start Autofix'}); + const startButton = screen.getByRole('button', {name: 'Start Seer'}); await userEvent.click(startButton); expect(await screen.findByRole('button', {name: 'Start Over'})).toBeInTheDocument(); @@ -415,9 +415,7 @@ describe('SeerDrawer', () => { }); expect(await screen.findByRole('button', {name: 'Start Over'})).toBeInTheDocument(); - expect( - await screen.findByRole('button', {name: 'Start Autofix'}) - ).toBeInTheDocument(); + expect(await screen.findByRole('button', {name: 'Start Seer'})).toBeInTheDocument(); expect(screen.getByRole('button', {name: 'Start Over'})).toBeDisabled(); }); @@ -436,7 +434,7 @@ describe('SeerDrawer', () => { await userEvent.click(startOverButton); await waitFor(() => { - expect(screen.getByRole('button', {name: 'Start Autofix'})).toBeInTheDocument(); + expect(screen.getByRole('button', {name: 'Start Seer'})).toBeInTheDocument(); }); }); @@ -471,7 +469,7 @@ describe('SeerDrawer', () => { screen.queryByTestId('ai-setup-loading-indicator') ); - expect(screen.getByText('Autofix')).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Seer'})).toBeInTheDocument(); // Since "Install the GitHub Integration" text isn't found, let's check for // the "Set Up the GitHub Integration" text which is what the component is actually showing @@ -505,7 +503,7 @@ describe('SeerDrawer', () => { ); // We don't expect to see any notice about repositories since all are readable - expect(screen.queryByText(/Autofix can't access/)).not.toBeInTheDocument(); + expect(screen.queryByText(/Seer can't access/)).not.toBeInTheDocument(); }); it('renders warning for unreadable GitHub repository', async () => { @@ -533,7 +531,7 @@ describe('SeerDrawer', () => { screen.queryByTestId('ai-setup-loading-indicator') ); - expect(screen.getByText(/Autofix can't access the/)).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access the/)).toBeInTheDocument(); expect(screen.getByText('org/repo')).toBeInTheDocument(); expect(screen.getByText(/GitHub integration/)).toBeInTheDocument(); }); @@ -563,7 +561,7 @@ describe('SeerDrawer', () => { screen.queryByTestId('ai-setup-loading-indicator') ); - expect(screen.getByText(/Autofix can't access the/)).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access the/)).toBeInTheDocument(); expect(screen.getByText('org/gitlab-repo')).toBeInTheDocument(); expect( screen.getByText(/It currently only supports GitHub repositories/) From 6d0fbf61e834607f3308b4737dc2f503ef709104 Mon Sep 17 00:00:00 2001 From: Tillman Elser Date: Thu, 15 May 2025 22:03:40 -0700 Subject: [PATCH 4/7] update tsts --- .../events/autofix/autofixChanges.spec.tsx | 2 +- .../events/autofix/autofixChanges.tsx | 2 +- .../autofix/autofixInsightCards.spec.tsx | 2 +- .../events/autofix/autofixInsightCards.tsx | 44 ++++++++++--------- .../autofix/autofixOutputStream.spec.tsx | 2 +- .../events/autofix/autofixOutputStream.tsx | 2 +- .../events/autofix/autofixSteps.spec.tsx | 2 +- .../events/autofix/autofixSteps.tsx | 2 +- .../streamline/sidebar/seerDrawer.spec.tsx | 18 ++++++-- .../streamline/sidebar/seerDrawer.tsx | 2 +- .../streamline/sidebar/seerNotices.spec.tsx | 42 ++++++++++-------- .../views/settings/projectSeer/index.spec.tsx | 2 +- 12 files changed, 71 insertions(+), 51 deletions(-) diff --git a/static/app/components/events/autofix/autofixChanges.spec.tsx b/static/app/components/events/autofix/autofixChanges.spec.tsx index a868a943ed35e8..e633d5cdec7622 100644 --- a/static/app/components/events/autofix/autofixChanges.spec.tsx +++ b/static/app/components/events/autofix/autofixChanges.spec.tsx @@ -91,7 +91,7 @@ describe('AutofixChanges', () => { ); expect( - screen.getByText('Autofix had trouble applying its code changes.') + screen.getByText('Seer had trouble applying its code changes.') ).toBeInTheDocument(); }); diff --git a/static/app/components/events/autofix/autofixChanges.tsx b/static/app/components/events/autofix/autofixChanges.tsx index 7179f47d2539de..1d88649639ee7e 100644 --- a/static/app/components/events/autofix/autofixChanges.tsx +++ b/static/app/components/events/autofix/autofixChanges.tsx @@ -230,7 +230,7 @@ export function AutofixChanges({ diff --git a/static/app/components/events/autofix/autofixInsightCards.spec.tsx b/static/app/components/events/autofix/autofixInsightCards.spec.tsx index 20dbf1b8f95913..30498658828d8f 100644 --- a/static/app/components/events/autofix/autofixInsightCards.spec.tsx +++ b/static/app/components/events/autofix/autofixInsightCards.spec.tsx @@ -181,7 +181,7 @@ describe('AutofixInsightCards', () => { await waitFor(() => { expect(addErrorMessage).toHaveBeenCalledWith( - 'Something went wrong when sending Autofix your message.' + 'Something went wrong when sending Seer your message.' ); }); }); diff --git a/static/app/components/events/autofix/autofixInsightCards.tsx b/static/app/components/events/autofix/autofixInsightCards.tsx index bdb5ee85e75356..ccbbc04075b0fd 100644 --- a/static/app/components/events/autofix/autofixInsightCards.tsx +++ b/static/app/components/events/autofix/autofixInsightCards.tsx @@ -507,33 +507,37 @@ function useUpdateInsightCard({groupId, runId}: {groupId: string; runId: string} const orgSlug = useOrganization().slug; return useMutation({ - mutationFn: (params: { + mutationFn: async (params: { message: string; retain_insight_card_index: number | null; step_index: number; }) => { - return api.requestPromise( - `/organizations/${orgSlug}/issues/${groupId}/autofix/update/`, - { - method: 'POST', - data: { - run_id: runId, - payload: { - type: 'restart_from_point_with_feedback', - message: params.message.trim(), - step_index: params.step_index, - retain_insight_card_index: params.retain_insight_card_index, + try { + const response = await api.requestPromise( + `/organizations/${orgSlug}/issues/${groupId}/autofix/update/`, + { + method: 'POST', + data: { + run_id: runId, + payload: { + type: 'restart_from_point_with_feedback', + message: params.message.trim(), + step_index: params.step_index, + retain_insight_card_index: params.retain_insight_card_index, + }, }, - }, - } - ); - }, - onSuccess: _ => { - queryClient.invalidateQueries({queryKey: makeAutofixQueryKey(orgSlug, groupId)}); - addSuccessMessage(t('Rethinking this...')); + } + ); + queryClient.invalidateQueries({queryKey: makeAutofixQueryKey(orgSlug, groupId)}); + addSuccessMessage(t('Rethinking this...')); + return response; + } catch (e) { + addErrorMessage(t('Something went wrong when sending Seer your message.')); + throw e; + } }, onError: () => { - addErrorMessage(t('Something went wrong when sending Autofix your message.')); + addErrorMessage(t('Something went wrong when sending Seer your message.')); }, }); } diff --git a/static/app/components/events/autofix/autofixOutputStream.spec.tsx b/static/app/components/events/autofix/autofixOutputStream.spec.tsx index f59e6056ea293b..519527ef28343c 100644 --- a/static/app/components/events/autofix/autofixOutputStream.spec.tsx +++ b/static/app/components/events/autofix/autofixOutputStream.spec.tsx @@ -120,7 +120,7 @@ describe('AutofixOutputStream', () => { await waitFor(() => { expect(addErrorMessage).toHaveBeenCalledWith( - 'Something went wrong when sending Autofix your message.' + 'Something went wrong when sending Seer your message.' ); }); }); diff --git a/static/app/components/events/autofix/autofixOutputStream.tsx b/static/app/components/events/autofix/autofixOutputStream.tsx index 60c74170daf74f..68b10dcc92078d 100644 --- a/static/app/components/events/autofix/autofixOutputStream.tsx +++ b/static/app/components/events/autofix/autofixOutputStream.tsx @@ -148,7 +148,7 @@ export function AutofixOutputStream({ addSuccessMessage('Thanks for the input.'); }, onError: () => { - addErrorMessage(t('Something went wrong when sending Autofix your message.')); + addErrorMessage(t('Something went wrong when sending Seer your message.')); }, }); diff --git a/static/app/components/events/autofix/autofixSteps.spec.tsx b/static/app/components/events/autofix/autofixSteps.spec.tsx index f846753bebe415..cc63737091dfd0 100644 --- a/static/app/components/events/autofix/autofixSteps.spec.tsx +++ b/static/app/components/events/autofix/autofixSteps.spec.tsx @@ -126,7 +126,7 @@ describe('AutofixSteps', () => { render(); expect( await screen.findByText( - 'Autofix encountered an error. Restarting step from scratch...' + 'Seer encountered an error. Restarting step from scratch...' ) ).toBeInTheDocument(); }); diff --git a/static/app/components/events/autofix/autofixSteps.tsx b/static/app/components/events/autofix/autofixSteps.tsx index 05d90ef22341e6..419fd9a8debb99 100644 --- a/static/app/components/events/autofix/autofixSteps.tsx +++ b/static/app/components/events/autofix/autofixSteps.tsx @@ -79,7 +79,7 @@ function Step({ {hasErroredStepBefore && hasStepAbove && ( - {t('Autofix encountered an error. Restarting step from scratch...')} + {t('Seer encountered an error. Restarting step from scratch...')} )} {step.type === AutofixStepType.DEFAULT && ( diff --git a/static/app/views/issueDetails/streamline/sidebar/seerDrawer.spec.tsx b/static/app/views/issueDetails/streamline/sidebar/seerDrawer.spec.tsx index c123ab47858a7f..344614df55982e 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerDrawer.spec.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerDrawer.spec.tsx @@ -318,7 +318,7 @@ describe('SeerDrawer', () => { ); // The feedback button should be visible, but not the Start Over button - expect(screen.getByTestId('autofix-button-bar')).toBeInTheDocument(); + expect(screen.getByTestId('seer-button-bar')).toBeInTheDocument(); expect(screen.queryByRole('button', {name: 'Start Over'})).not.toBeInTheDocument(); // Restore the original implementation @@ -352,7 +352,7 @@ describe('SeerDrawer', () => { ); // Both buttons should be visible, but Start Over should be disabled - expect(screen.getByTestId('autofix-button-bar')).toBeInTheDocument(); + expect(screen.getByTestId('seer-button-bar')).toBeInTheDocument(); const startOverButton = screen.getByRole('button', {name: 'Start Over'}); expect(startOverButton).toBeInTheDocument(); expect(startOverButton).toBeDisabled(); @@ -385,7 +385,7 @@ describe('SeerDrawer', () => { ); // Both buttons should be visible, and Start Over should be enabled - expect(screen.getByTestId('autofix-button-bar')).toBeInTheDocument(); + expect(screen.getByTestId('seer-button-bar')).toBeInTheDocument(); const startOverButton = screen.getByRole('button', {name: 'Start Over'}); expect(startOverButton).toBeInTheDocument(); expect(startOverButton).toBeEnabled(); @@ -401,6 +401,10 @@ describe('SeerDrawer', () => { organization, }); + await waitForElementToBeRemoved(() => + screen.queryByTestId('ai-setup-loading-indicator') + ); + expect(await screen.findByRole('button', {name: 'Start Over'})).toBeInTheDocument(); }); @@ -414,6 +418,10 @@ describe('SeerDrawer', () => { organization, }); + await waitForElementToBeRemoved(() => + screen.queryByTestId('ai-setup-loading-indicator') + ); + expect(await screen.findByRole('button', {name: 'Start Over'})).toBeInTheDocument(); expect(await screen.findByRole('button', {name: 'Start Seer'})).toBeInTheDocument(); expect(screen.getByRole('button', {name: 'Start Over'})).toBeDisabled(); @@ -429,6 +437,10 @@ describe('SeerDrawer', () => { organization, }); + await waitForElementToBeRemoved(() => + screen.queryByTestId('ai-setup-loading-indicator') + ); + const startOverButton = await screen.findByRole('button', {name: 'Start Over'}); expect(startOverButton).toBeInTheDocument(); await userEvent.click(startOverButton); diff --git a/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx b/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx index 4a3caada11bac0..18a235cadf2ca8 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx @@ -228,7 +228,7 @@ export function SeerDrawer({group, project, event}: SeerDrawerProps) { /> {!aiConfig.needsGenAiAcknowledgement && ( - + ); - expect(screen.getByText(/Autofix can't access the/)).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access the/)).toBeInTheDocument(); expect(screen.getByText('org/repo')).toBeInTheDocument(); expect(screen.getByText(/GitHub integration/)).toBeInTheDocument(); }); @@ -102,7 +102,7 @@ describe('SeerNotices', function () { render(); - expect(screen.getByText(/Autofix can't access the/)).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access the/)).toBeInTheDocument(); expect(screen.getByText('org/gitlab-repo')).toBeInTheDocument(); expect( screen.getByText(/It currently only supports GitHub repositories/) @@ -121,9 +121,7 @@ describe('SeerNotices', function () { render(); - expect( - screen.getByText(/Autofix can't access these repositories:/) - ).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access these repositories:/)).toBeInTheDocument(); expect(screen.getByText('org/repo1, org/repo2')).toBeInTheDocument(); expect(screen.getByText(/For best performance, enable the/)).toBeInTheDocument(); expect(screen.getByText(/GitHub integration/)).toBeInTheDocument(); @@ -149,12 +147,10 @@ describe('SeerNotices', function () { render(); - expect( - screen.getByText(/Autofix can't access these repositories:/) - ).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access these repositories:/)).toBeInTheDocument(); expect(screen.getByText('org/gitlab-repo1, org/bitbucket-repo2')).toBeInTheDocument(); expect( - screen.getByText(/Autofix currently only supports GitHub repositories/) + screen.getByText(/Seer currently only supports GitHub repositories/) ).toBeInTheDocument(); }); @@ -170,14 +166,12 @@ describe('SeerNotices', function () { render(); - expect( - screen.getByText(/Autofix can't access these repositories:/) - ).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access these repositories:/)).toBeInTheDocument(); expect(screen.getByText('org/github-repo, org/gitlab-repo')).toBeInTheDocument(); expect(screen.getByText(/For best performance, enable the/)).toBeInTheDocument(); expect(screen.getByText(/GitHub integration/)).toBeInTheDocument(); expect( - screen.getByText(/Autofix currently only supports GitHub repositories/) + screen.getByText(/Seer currently only supports GitHub repositories/) ).toBeInTheDocument(); }); @@ -198,9 +192,7 @@ describe('SeerNotices', function () { expect(screen.getByText('Set Up Now')).toBeInTheDocument(); // Unreadable repos warning - expect( - screen.getByText(/Autofix can't access these repositories:/) - ).toBeInTheDocument(); + expect(screen.getByText(/Seer can't access these repositories:/)).toBeInTheDocument(); expect(screen.getByText('org/repo1, org/repo2')).toBeInTheDocument(); }); @@ -235,7 +227,7 @@ describe('SeerNotices', function () { // Should have both the GitHub setup card and the unreadable repos warning const setupCard = screen.getByText('Set Up the GitHub Integration').closest('div'); const warningAlert = screen - .getByText(/Autofix can't access these repositories:/) + .getByText(/Seer can't access these repositories:/) .closest('div'); expect(setupCard).toBeInTheDocument(); @@ -262,5 +254,17 @@ describe('SeerNotices', function () { await waitFor(() => { expect(screen.getByText('Pick Repositories to Work In')).toBeInTheDocument(); }); + + const titleElement = screen.getByText('Pick Repositories to Work In'); + const cardDescriptionElement = titleElement.nextElementSibling; + const firstSpanInDescription = + cardDescriptionElement?.querySelector('span:first-child'); + expect(firstSpanInDescription?.textContent?.replace(/\s+/g, ' ').trim()).toBe( + 'Seer is a lot better when it has your codebase as context.' + ); + + expect( + screen.getByText(/Open the Project Settings menu in the top right/) + ).toBeInTheDocument(); }); }); diff --git a/static/app/views/settings/projectSeer/index.spec.tsx b/static/app/views/settings/projectSeer/index.spec.tsx index bd466c44a44a7f..64acdae444ad0b 100644 --- a/static/app/views/settings/projectSeer/index.spec.tsx +++ b/static/app/views/settings/projectSeer/index.spec.tsx @@ -184,7 +184,7 @@ describe('ProjectSeer', function () { // Find input fields const branchInput = screen.getByPlaceholderText('Default branch'); const instructionsInput = screen.getByPlaceholderText( - 'Any special instructions for Autofix in this repository...' + 'Any special instructions for Seer in this repository...' ); await userEvent.type(branchInput, 'develop'); From 083834722f1d3fe0416182d631f5f384a4f2397d Mon Sep 17 00:00:00 2001 From: Tillman Elser Date: Fri, 16 May 2025 10:53:39 -0700 Subject: [PATCH 5/7] revert random change --- .../events/autofix/autofixInsightCards.tsx | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/static/app/components/events/autofix/autofixInsightCards.tsx b/static/app/components/events/autofix/autofixInsightCards.tsx index ccbbc04075b0fd..ce202d355ce612 100644 --- a/static/app/components/events/autofix/autofixInsightCards.tsx +++ b/static/app/components/events/autofix/autofixInsightCards.tsx @@ -507,34 +507,30 @@ function useUpdateInsightCard({groupId, runId}: {groupId: string; runId: string} const orgSlug = useOrganization().slug; return useMutation({ - mutationFn: async (params: { + mutationFn: (params: { message: string; retain_insight_card_index: number | null; step_index: number; }) => { - try { - const response = await api.requestPromise( - `/organizations/${orgSlug}/issues/${groupId}/autofix/update/`, - { - method: 'POST', - data: { - run_id: runId, - payload: { - type: 'restart_from_point_with_feedback', - message: params.message.trim(), - step_index: params.step_index, - retain_insight_card_index: params.retain_insight_card_index, - }, + return api.requestPromise( + `/organizations/${orgSlug}/issues/${groupId}/autofix/update/`, + { + method: 'POST', + data: { + run_id: runId, + payload: { + type: 'restart_from_point_with_feedback', + message: params.message.trim(), + step_index: params.step_index, + retain_insight_card_index: params.retain_insight_card_index, }, - } - ); - queryClient.invalidateQueries({queryKey: makeAutofixQueryKey(orgSlug, groupId)}); - addSuccessMessage(t('Rethinking this...')); - return response; - } catch (e) { - addErrorMessage(t('Something went wrong when sending Seer your message.')); - throw e; - } + }, + } + ); + }, + onSuccess: _ => { + queryClient.invalidateQueries({queryKey: makeAutofixQueryKey(orgSlug, groupId)}); + addSuccessMessage(t('Rethinking this...')); }, onError: () => { addErrorMessage(t('Something went wrong when sending Seer your message.')); From 24d1053c5289104095b714e693c351cf98fe7b7c Mon Sep 17 00:00:00 2001 From: Tillman Elser Date: Fri, 16 May 2025 10:56:01 -0700 Subject: [PATCH 6/7] revert other linting change --- .../views/issueDetails/streamline/sidebar/seerNotices.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx b/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx index b658cf60d71599..f72ddb6c45725b 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx @@ -153,7 +153,10 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice )} {nonGithubRepos.length > 0 && ( - {t('Seer currently only supports GitHub repositories.')} + + {' '} + {t('Seer currently only supports GitHub repositories.')} + )} ); From bc89939bd55e492855d2a8c1c4ae9f0213a7a7c2 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 17:57:02 +0000 Subject: [PATCH 7/7] :hammer_and_wrench: apply pre-commit fixes --- .../views/issueDetails/streamline/sidebar/seerNotices.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx b/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx index f72ddb6c45725b..ac8c087b35abbc 100644 --- a/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx @@ -4,7 +4,7 @@ import styled from '@emotion/styled'; import onboardingInstall from 'sentry-images/spot/onboarding-install.svg'; import {Alert} from 'sentry/components/core/alert'; -import {LinkButton} from 'sentry/components/core/button'; +import {LinkButton} from 'sentry/components/core/button/linkButton'; import {useProjectSeerPreferences} from 'sentry/components/events/autofix/preferences/hooks/useProjectSeerPreferences'; import {useAutofixRepos} from 'sentry/components/events/autofix/useAutofix'; import ExternalLink from 'sentry/components/links/externalLink'; @@ -153,10 +153,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice )} {nonGithubRepos.length > 0 && ( - - {' '} - {t('Seer currently only supports GitHub repositories.')} - + {t('Seer currently only supports GitHub repositories.')} )} );