Skip to content

Conversation

@nikolovlazar
Copy link
Member

@nikolovlazar nikolovlazar commented Nov 7, 2025

Besides the existing "Copy Page" and "View as Markdown", I've added two more buttons in the dropdown so users can open that page in ChatGPT or Claude and ask questions about it:

image

Both buttons are static links that open ChatGPT / Claude with predefined prompt.

Example: https://chatgpt.com/?hint=search&q=Read+from+https://docs.sentry.io/platforms/javascript/+so+I+can+ask+questions+about+its+contents

Besides the existing "Copy Page" and "View as Markdown", I've added two
more buttons in the dropdown so users can open that page in ChatGPT or
Claude and ask questions about it.
@vercel
Copy link

vercel bot commented Nov 7, 2025

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

Project Deployment Preview Comments Updated (UTC)
develop-docs Ready Ready Preview Comment Nov 10, 2025 6:13pm
sentry-docs Ready Ready Preview Comment Nov 10, 2025 6:13pm

Copy link
Member

@sergical sergical left a comment

Choose a reason for hiding this comment

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

small comment but non-blocking, this is super helpful!

</div>
</Link>

<a
Copy link
Member

Choose a reason for hiding this comment

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

not sure if using Link here is better since it's an external link

Copy link
Member Author

Choose a reason for hiding this comment

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

That's actually why I used a instead of Link. Isn't Next.js's Link for soft nav within the app?

Copy link
Member

Choose a reason for hiding this comment

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

it can be used for external links too as it'll render an anchor tag anyway, was just thinking since Link was already imported in the file, just for standardization but leave it as is :)

Copy link
Member Author

Choose a reason for hiding this comment

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

No I know. Here's what my thought was:

  • we def have an external link and that's not going to change;
  • we don't want the current behaviour to change as well (with the a tag);
  • Next.js's Link component probably checks in with the router before navigating (extra steps for external navigation) and it has a preloading mechanism built in for perf optimization on soft navs. It's definitely built for local soft navigation;
  • Next.js's Link component is third-party and prone to change;

The a approach seemed like the cleanest.

Copy link
Member

Choose a reason for hiding this comment

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

100% aligned, great call

@codecov
Copy link

codecov bot commented Nov 7, 2025

Bundle Report

Changes will decrease total bundle size by 4.45kB (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 10.17MB 6.03kB (0.06%) ⬆️
sentry-docs-server-cjs 12.6MB -10.48kB (-0.08%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 882.71kB -0.0%
static/chunks/8321-*.js -3 bytes 425.87kB -0.0%
server/app/api/ip-*.js 1 bytes 267.83kB 0.0%
server/app/_not-*.js 1 bytes 267.82kB 0.0%
server/app/[[...path]]/page_client-*.js 1 bytes 267.79kB 0.0%
server/app/platform-*.js 1 bytes 252.37kB 0.0%
static/chunks/3938-*.js (New) 57.23kB 57.23kB 100.0% 🚀
static/wOIR-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/wOIR-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/chunks/4145-*.js (Deleted) -51.2kB 0 bytes -100.0% 🗑️
static/oKgcQ7SIdeZfnYQBN0jx4/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/oKgcQ7SIdeZfnYQBN0jx4/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Files in static/chunks/3938-*.js:

  • ./src/hooks/usePlausibleEvent.tsx → Total Size: 611 bytes
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.74MB -0.0%
../instrumentation.js -3 bytes 1.07MB -0.0%
9523.js -3 bytes 1.04MB -0.0%
../app/[[...path]]/page.js.nft.json -5.48kB 761.84kB -0.71%
../app/platform-redirect/page.js.nft.json -5.48kB 761.76kB -0.71%
../app/sitemap.xml/route.js.nft.json -5.48kB 758.99kB -0.72%
../app/[[...path]]/page.js 1 bytes 619.86kB 0.0%
4236.js (New) 98.52kB 98.52kB 100.0% 🚀
../app/platform-redirect/page.js 1 bytes 32.22kB 0.0%
4873.js (Deleted) -92.54kB 0 bytes -100.0% 🗑️

Files in 4236.js:

  • ./src/hooks/usePlausibleEvent.tsx → Total Size: 611 bytes

  • ./src/components/copyMarkdownButton.tsx → Total Size: 494 bytes

App Routes Affected:

App Route Size Change Total Size Change (%)
/[[...path]] 1 bytes 3.37MB 0.0%
/platform-redirect 1 bytes 2.78MB 0.0%

@nikolovlazar
Copy link
Member Author

@sentry review

viewBox="0 0 24 24"
width={width}
height={height}
className="ml-1 inline"
Copy link
Member

Choose a reason for hiding this comment

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

id control this as props in case we want to use the external link as the first item

@nikolovlazar nikolovlazar merged commit 3be3d5f into master Nov 10, 2025
16 checks passed
@nikolovlazar nikolovlazar deleted the feat/open-in-ai-buttons branch November 10, 2025 19:03
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.

4 participants