diff --git a/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx b/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx index 6780edfee4f2..2c807879264d 100644 --- a/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx +++ b/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx @@ -53,7 +53,7 @@ describe('AgentHandoffProductPrompt', () => { expect(screen.getByRole('link', {name: 'View all instructions'})).toHaveAttribute( 'href', - 'https://sentry.io/agent-handoff.md' + 'https://sentry-jest-tests.example.com/agent-handoff.md' ); expect(screen.getByText(/Read and follow/)).toHaveTextContent( 'Read and follow https://sentry-jest-tests.example.com/agent-handoff.md verbatim to set up tracing. Your handoff code is sntryh_****.' diff --git a/static/app/components/agentHandoff/agentHandoffProductPrompt.tsx b/static/app/components/agentHandoff/agentHandoffProductPrompt.tsx index 88a659cb7a51..b6f30da71c1c 100644 --- a/static/app/components/agentHandoff/agentHandoffProductPrompt.tsx +++ b/static/app/components/agentHandoff/agentHandoffProductPrompt.tsx @@ -1,6 +1,5 @@ import {IconCopy} from '@sentry/icons/copy'; import {IconOpen} from '@sentry/icons/open'; -import {useStore} from 'zustand'; import {Button} from '@sentry/scraps/button'; import {Flex, Stack} from '@sentry/scraps/layout'; @@ -11,10 +10,9 @@ import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import {List} from 'sentry/components/list'; import {ListItem} from 'sentry/components/list/listItem'; import {t} from 'sentry/locale'; -import {ConfigStore} from 'sentry/stores/configStore'; +import {getHandoffGuideUrl} from './handoffPrompt'; import { - getHandoffPreviewUrl, HandoffAdvancedMenu, HandoffPromptAlerts, HandoffPromptBox, @@ -41,8 +39,7 @@ export function AgentHandoffProductPrompt({ onCopySuccess, onSelect, }: AgentHandoffProductPromptProps) { - const sentryUrl = useStore(ConfigStore, state => state.links.sentryUrl); - const previewUrl = getHandoffPreviewUrl(sentryUrl); + const guideUrl = getHandoffGuideUrl(); const {copyPrompt, copyDisabled, handoff, useIpPinning, toggleIpPinning} = useHandoffPromptCopy({ @@ -109,7 +106,7 @@ export function AgentHandoffProductPrompt({ )), - + {t('View all instructions')} diff --git a/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx b/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx index 6614a29cf719..3bb6f1d8010c 100644 --- a/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx +++ b/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx @@ -60,7 +60,7 @@ describe('AgentHandoffPrompt', () => { expect(screen.getByRole('link', {name: 'See the full instructions'})).toHaveAttribute( 'href', - 'https://sentry.io/agent-handoff.md' + 'https://sentry-jest-tests.example.com/agent-handoff.md' ); expect(screen.getByText(/Read and follow/)).toHaveTextContent( 'Read and follow https://sentry-jest-tests.example.com/agent-handoff.md verbatim. Your handoff code is sntryh_****.' diff --git a/static/app/components/agentHandoff/agentHandoffPrompt.tsx b/static/app/components/agentHandoff/agentHandoffPrompt.tsx index 27237b5fe11f..f8eacae016e2 100644 --- a/static/app/components/agentHandoff/agentHandoffPrompt.tsx +++ b/static/app/components/agentHandoff/agentHandoffPrompt.tsx @@ -1,6 +1,5 @@ import {IconCopy} from '@sentry/icons/copy'; import {IconOpen} from '@sentry/icons/open'; -import {useStore} from 'zustand'; import {Button} from '@sentry/scraps/button'; import {Flex, Stack} from '@sentry/scraps/layout'; @@ -9,10 +8,9 @@ import {Text} from '@sentry/scraps/text'; import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import {t} from 'sentry/locale'; -import {ConfigStore} from 'sentry/stores/configStore'; +import {getHandoffGuideUrl} from './handoffPrompt'; import { - getHandoffPreviewUrl, HandoffAdvancedMenu, HandoffPromptAlerts, HandoffPromptBox, @@ -36,8 +34,7 @@ export function AgentHandoffPrompt({ onCopySuccess, onSelect, }: AgentHandoffPromptProps) { - const sentryUrl = useStore(ConfigStore, state => state.links.sentryUrl); - const previewUrl = getHandoffPreviewUrl(sentryUrl); + const guideUrl = getHandoffGuideUrl(); const {copyPrompt, copyDisabled, handoff, useIpPinning, toggleIpPinning} = useHandoffPromptCopy({flow, context, onCopySuccess}); @@ -64,7 +61,7 @@ export function AgentHandoffPrompt({ - + {t('See the full instructions')} diff --git a/static/app/components/agentHandoff/handoffPromptParts.tsx b/static/app/components/agentHandoff/handoffPromptParts.tsx index bc69380b9736..f785155f637a 100644 --- a/static/app/components/agentHandoff/handoffPromptParts.tsx +++ b/static/app/components/agentHandoff/handoffPromptParts.tsx @@ -18,10 +18,6 @@ import {getHandoffGuideUrl, getHandoffPrompt} from './handoffPrompt'; import {AgentHandoffFlow, type AgentHandoffContext} from './types'; import {useHandoffPromptInteractions} from './useHandoffPromptInteractions'; -export function getHandoffPreviewUrl(sentryUrl: string): string { - return new URL('/agent-handoff.md', sentryUrl).href; -} - interface HandoffAdvancedMenuProps { disabled: boolean; onToggle: () => void; diff --git a/static/app/views/onboarding/onboarding.spec.tsx b/static/app/views/onboarding/onboarding.spec.tsx index 720edcffc608..993726b81b6e 100644 --- a/static/app/views/onboarding/onboarding.spec.tsx +++ b/static/app/views/onboarding/onboarding.spec.tsx @@ -553,7 +553,7 @@ describe('Onboarding', () => { expect(screen.getByRole('button', {name: 'Advanced options'})).toBeInTheDocument(); expect( screen.getByRole('link', {name: 'See the full instructions'}) - ).toHaveAttribute('href', 'https://sentry.io/agent-handoff.md'); + ).toHaveAttribute('href', 'https://sentry-jest-tests.example.com/agent-handoff.md'); expect(screen.getByRole('button', {name: /Set up manually/})).toBeInTheDocument(); expect(screen.queryByTestId('onboarding-welcome-start')).not.toBeInTheDocument(); expect(screen.queryByText('Error monitoring')).not.toBeInTheDocument();