From e7d9154629662763859ad245b793ac618a85c0af Mon Sep 17 00:00:00 2001
From: "sentry-junior[bot]"
<264270552+sentry-junior[bot]@users.noreply.github.com>
Date: Thu, 19 Nov 2026 17:00:24 +0000
Subject: [PATCH 1/2] fix(agent-handoff): Remove links to the retired
instructions preview
The "See the full instructions" and "View all instructions" links pointed
at /agent-handoff.md?preview=1&flow=..., but the backend stopped honoring
the preview mode in #131499. The links now open the generic CLI install
guide instead of the flow's instructions, so remove them.
Co-Authored-By: Evan Purkhiser <1421724+evanpurkhiser@users.noreply.github.com>
---
.../agentHandoffProductPrompt.spec.tsx | 4 --
.../agentHandoffProductPrompt.tsx | 34 +++-----------
.../agentHandoff/agentHandoffPrompt.spec.tsx | 4 --
.../agentHandoff/agentHandoffPrompt.tsx | 44 +++++--------------
.../agentHandoff/handoffPromptParts.tsx | 4 --
.../app/views/onboarding/onboarding.spec.tsx | 6 ---
6 files changed, 19 insertions(+), 77 deletions(-)
diff --git a/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx b/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx
index e90fb58f7a45..5c78d8494107 100644
--- a/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx
+++ b/static/app/components/agentHandoff/agentHandoffProductPrompt.spec.tsx
@@ -51,10 +51,6 @@ describe('AgentHandoffProductPrompt', () => {
{organization}
);
- expect(screen.getByRole('link', {name: 'View all instructions'})).toHaveAttribute(
- 'href',
- 'https://sentry.io/agent-handoff.md?preview=1&flow=add_feature'
- );
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 bee7edb0564b..a038ab668311 100644
--- a/static/app/components/agentHandoff/agentHandoffProductPrompt.tsx
+++ b/static/app/components/agentHandoff/agentHandoffProductPrompt.tsx
@@ -1,20 +1,15 @@
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';
-import {ExternalLink} from '@sentry/scraps/link';
import {Text} from '@sentry/scraps/text';
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 {
- getHandoffPreviewUrl,
HandoffAdvancedMenu,
HandoffPromptAlerts,
HandoffPromptBox,
@@ -24,8 +19,8 @@ import {useHandoffPromptCopy} from './useHandoffPromptCopy';
interface AgentHandoffProductPromptProps {
/**
- * Short phrases describing what the agent will do, shown as checkmark bullets above
- * "View all instructions". Keep to 3–5 items.
+ * Short phrases describing what the agent will do, shown as checkmark bullets. Keep
+ * to 3–5 items.
*/
agentSteps: string[];
context: AddFeatureContext | null;
@@ -41,9 +36,6 @@ export function AgentHandoffProductPrompt({
onCopySuccess,
onSelect,
}: AgentHandoffProductPromptProps) {
- const sentryUrl = useStore(ConfigStore, state => state.links.sentryUrl);
- const previewUrl = getHandoffPreviewUrl(AgentHandoffFlow.ADD_FEATURE, sentryUrl);
-
const {copyPrompt, copyDisabled, handoff, useIpPinning, toggleIpPinning} =
useHandoffPromptCopy({
flow: AgentHandoffFlow.ADD_FEATURE,
@@ -101,23 +93,11 @@ export function AgentHandoffProductPrompt({
{t('Your agent will:')}
- {[
- ...agentSteps.map(step => (
-
- {step}
-
- )),
-
-
-
-
- {t('View all instructions')}
-
-
-
-
- ,
- ]}
+ {agentSteps.map(step => (
+
+ {step}
+
+ ))}
diff --git a/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx b/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx
index fce2b41b60e3..bd80b3fcd515 100644
--- a/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx
+++ b/static/app/components/agentHandoff/agentHandoffPrompt.spec.tsx
@@ -58,10 +58,6 @@ describe('AgentHandoffPrompt', () => {
{organization}
);
- expect(screen.getByRole('link', {name: 'See the full instructions'})).toHaveAttribute(
- 'href',
- 'https://sentry.io/agent-handoff.md?preview=1&flow=onboarding'
- );
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 0febd0a197ab..f8f64538ee73 100644
--- a/static/app/components/agentHandoff/agentHandoffPrompt.tsx
+++ b/static/app/components/agentHandoff/agentHandoffPrompt.tsx
@@ -1,18 +1,12 @@
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';
-import {ExternalLink} from '@sentry/scraps/link';
-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 {
- getHandoffPreviewUrl,
HandoffAdvancedMenu,
HandoffPromptAlerts,
HandoffPromptBox,
@@ -36,9 +30,6 @@ export function AgentHandoffPrompt({
onCopySuccess,
onSelect,
}: AgentHandoffPromptProps) {
- const sentryUrl = useStore(ConfigStore, state => state.links.sentryUrl);
- const previewUrl = getHandoffPreviewUrl(flow, sentryUrl);
-
const {copyPrompt, copyDisabled, handoff, useIpPinning, toggleIpPinning} =
useHandoffPromptCopy({flow, context, onCopySuccess});
@@ -62,30 +53,19 @@ 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 d4361969f220..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(flow: AgentHandoffFlow, sentryUrl: string): string {
- return new URL(`/agent-handoff.md?preview=1&flow=${flow}`, 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 6185b12bc16f..5028e7cb2054 100644
--- a/static/app/views/onboarding/onboarding.spec.tsx
+++ b/static/app/views/onboarding/onboarding.spec.tsx
@@ -552,12 +552,6 @@ describe('Onboarding', () => {
screen.getByText('Detects your stack and installs the Sentry CLI')
).toBeInTheDocument();
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?preview=1&flow=onboarding'
- );
expect(screen.getByRole('button', {name: /Set up manually/})).toBeInTheDocument();
expect(screen.queryByTestId('onboarding-welcome-start')).not.toBeInTheDocument();
expect(screen.queryByText('Error monitoring')).not.toBeInTheDocument();
From 7f62e2a78f5e41d670c369e40a395f31fd2c567e Mon Sep 17 00:00:00 2001
From: "sentry-junior[bot]"
<264270552+sentry-junior[bot]@users.noreply.github.com>
Date: Thu, 19 Nov 2026 17:46:00 +0000
Subject: [PATCH 2/2] ref(agent-handoff): Link the instructions to the handoff
guide URL
Keep the "See the full instructions" and "View all instructions" links,
but point them at getHandoffGuideUrl(), the same /agent-handoff.md URL the
copied prompt sends the agent to, and drop the leftover
getHandoffPreviewUrl helper.
---
.../agentHandoff/agentHandoffProductPrompt.spec.tsx | 2 +-
.../agentHandoff/agentHandoffProductPrompt.tsx | 9 +++------
.../components/agentHandoff/agentHandoffPrompt.spec.tsx | 2 +-
.../app/components/agentHandoff/agentHandoffPrompt.tsx | 9 +++------
.../app/components/agentHandoff/handoffPromptParts.tsx | 4 ----
static/app/views/onboarding/onboarding.spec.tsx | 2 +-
6 files changed, 9 insertions(+), 19 deletions(-)
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();