Skip to content

feat: Add inline 'Copy Prompt' button to platform links on getting-started pages#18337

Merged
sfanahata merged 4 commits into
masterfrom
sf/interstitial-agent-setup-prompt
Jun 10, 2026
Merged

feat: Add inline 'Copy Prompt' button to platform links on getting-started pages#18337
sfanahata merged 4 commits into
masterfrom
sf/interstitial-agent-setup-prompt

Conversation

@sfanahata

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Add an inline "Copy Prompt" button next to platform links on interstitial getting-started pages (Logs, Metrics, Profiling). Platforms that have an associated agent-assisted setup skill now show a small purple button that copies the agent setup prompt to the clipboard, giving users immediate access to the AI agent prompt without needing to click through to the platform page first.

What changed

  • src/components/agentSkillsCallout/shared.ts (new): Extracted shared prompt-building utilities (buildPrompt, buildPromptUrl, buildDotagentsCommand, buildNpxSkillsCommand, constants) so both AgentSkillsCallout and the new CopyPromptButton reuse the same logic.

  • src/components/copyPromptButton/ (new): Client component that renders an inline "Copy Prompt" button with:

    • Clipboard copy of the agent setup prompt
    • Radix tooltip ("Copy setup prompt for AI agents") matching the onboarding tooltip style
    • Plausible analytics + Sentry metrics tracking (reuses existing Copy AI Prompt event)
    • Light/dark mode support via next-themes
    • Hidden on mobile (< 768px)
  • src/components/linkWithPlatformIcon.tsx: Added optional skill prop. When present, renders a CopyPromptButton inline after the platform link.

  • src/components/agentSkillsCallout/index.tsx: Refactored to import from shared.ts. No behavioral change.

  • docs/product/explore/logs/getting-started/index.mdx: Added skill props to platform links.

  • docs/product/explore/metrics/getting-started/index.mdx: Added skill props to platform links.

  • docs/product/explore/profiling/getting-started.mdx: Added skill props to platform links.

Skill mapping

  • Server-side JS frameworks -> sentry-node-sdk
  • Browser-only JS frameworks -> sentry-browser-sdk
  • Framework-specific skills where they exist (Next.js, Nest.js, React, Svelte, Cloudflare, React Router, TanStack Start)
  • Non-JS platforms: Python, Ruby, Go, PHP, .NET, Android, Apple, Flutter, React Native, Elixir
  • Intentionally omitted: Astro, Nuxt, Remix, SolidStart, Electron, Capacitor (ambiguous SDK mapping), Java, Native, Gaming (no skills exist)

IS YOUR CHANGE URGENT?

  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Shannon Anahata added 2 commits June 9, 2026 14:22
…arted pages

Add an optional `skill` prop to `LinkWithPlatformIcon` that renders an
inline copy-prompt button next to platform links that have agent-assisted
setup skills. Clicking the button copies the agent setup prompt to the
clipboard (e.g., `Use curl to download, read and follow: https://skills.sentry.dev/{skill}/SKILL.md`).

Changes:
- Extract shared prompt-building utilities into `agentSkillsCallout/shared.ts`
- Create `CopyPromptButton` client component with Radix tooltip, Plausible
  analytics, and Sentry metrics tracking
- Update `LinkWithPlatformIcon` to accept optional `skill` prop
- Add `skill` props to 20 platform links on the logs getting-started page
…rofiling pages

Add copy-prompt buttons to additional platform links:

- Logs page: add sentry-node-sdk for server-side JS frameworks (Express,
  Fastify, Hapi, Koa, Connect, Hono, Bun, AWS Lambda, GCP Functions,
  Azure Functions) and sentry-browser-sdk for browser-only frameworks
  (Angular, Ember, Gatsby, Solid, Vue, Wasm)
- Metrics page: add skill props to all 47 applicable platform links
  across JS, Python, Ruby, Go, PHP, .NET, Mobile, and Elixir sections
- Profiling page: add skill props to 11 applicable platform links across
  Continuous, UI, and Transaction-based profiling sections

Frameworks with ambiguous SDK mappings (Astro, Nuxt, Remix, SolidStart,
Electron, Capacitor) are intentionally left without a skill prop until
framework-specific skills are created.
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Jun 10, 2026 5:52pm
sentry-docs Ready Ready Preview, Comment Jun 10, 2026 5:52pm

Request Review

Every sub-framework now inherits its parent platform's skill:
- JS full-stack frameworks (Astro, Nuxt, Remix, SolidStart) -> sentry-node-sdk
- Electron -> sentry-node-sdk
- Capacitor -> sentry-browser-sdk
- PHP sub-frameworks (Symfony, Laravel) -> sentry-php-sdk
- Ruby sub-frameworks (Rails) -> sentry-ruby-sdk
- All .NET sub-frameworks -> sentry-dotnet-sdk

Only entries without an available skill remain: Java and Gaming.

@sergical sergical left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Add a `source` attribute to the `docs.copy_ai_prompt` Sentry metric to
distinguish between the full AgentSkillsCallout banner ('callout') and
the new inline platform link buttons ('inline_link'). Existing callers
default to 'callout' so no changes are needed in AgentSkillsCallout.
@sfanahata sfanahata merged commit bbacd13 into master Jun 10, 2026
23 checks passed
@sfanahata sfanahata deleted the sf/interstitial-agent-setup-prompt branch June 10, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants