Skip to content

Conversation

@rahulchhabria
Copy link
Contributor

%60%60%60%0A%3C!--%20Use%20this%20checklist%20to%20make%20sure%20your%20PR%20is%20ready%20for%20merge.%20You%20may%20delete%20any%20sections%20you%20don't%20need.%20--%3E%0A%0A%23%23%20DESCRIBE%20YOUR%20PR%0AThis%20PR%20introduces%20a%20new%20%22Copy%20for%20LLM%22%20button%20to%20documentation%20pages.%20Its%20purpose%20is%20to%20provide%20users%20with%20a%20quick%20way%20to%20copy%20the%20page's%20title%2C%20description%2C%20and%20main%20content%20to%20their%20clipboard%2C%20facilitating%20easy%20pasting%20into%20large%20language%20models.%20The%20button%20is%20positioned%20to%20the%20left%20of%20the%20%22view%20as%20Markdown%22%20button%2C%20matches%20its%20visual%20style%2C%20and%20provides%20a%20clear%20%22Copied%20to%20clipboard%22%20toast%20notification%20and%20icon%20change%20upon%20successful%20copy.%20This%20enhances%20user%20experience%20by%20streamlining%20content%20extraction%20for%20AI%20tools.%0A%0A%23%23%20IS%20YOUR%20CHANGE%20URGENT%3F%20%20%0A%0AHelp%20us%20prioritize%20incoming%20PRs%20by%20letting%20us%20know%20when%20the%20change%20needs%20to%20go%20live.%0A-%20%5B%20%5D%20Urgent%20deadline%20(GA%20date%2C%20etc.)%3A%20%3C!--%20ENTER%20DATE%20HERE%20--%3E%0A-%20%5B%20%5D%20Other%20deadline%3A%20%3C!--%20ENTER%20DATE%20HERE%20--%3E%0A-%20%5Bx%5D%20None%3A%20Not%20urgent%2C%20can%20wait%20up%20to%201%20week%2B%0A%0A%23%23%20SLA%0A%0A-%20Teamwork%20makes%20the%20dream%20work%2C%20so%20please%20add%20a%20reviewer%20to%20your%20PRs.%0A-%20Please%20give%20the%20docs%20team%20up%20to%201%20week%20to%20review%20your%20PR%20unless%20you've%20added%20an%20urgent%20due%20date%20to%20it.%0AThanks%20in%20advance%20for%20your%20help!%0A%0A%23%23%20PRE-MERGE%20CHECKLIST%0A%0AMake%20sure%20you've%20checked%20the%20following%20before%20merging%20your%20changes%3A%0A%0A-%20%5B%20%5D%20Checked%20Vercel%20preview%20for%20correctness%2C%20including%20links%0A-%20%5B%20%5D%20PR%20was%20reviewed%20and%20approved%20by%20any%20necessary%20SMEs%20(subject%20matter%20experts)%0A-%20%5B%20%5D%20PR%20was%20reviewed%20and%20approved%20by%20a%20member%20of%20the%20%5BSentry%20docs%20team%5D(https%3A%2F%2Fgithub.com%2Forgs%2Fgetsentry%2Fteams%2Fdocs)%0A%0A%23%23%20LEGAL%20BOILERPLATE%0A%0A%3C!--%20Sentry%20employees%20and%20contractors%20can%20delete%20or%20ignore%20this%20section.%20--%3E%0A%0ALook%2C%20I%20get%20it.%20The%20entity%20doing%20business%20as%20%22Sentry%22%20was%20incorporated%20in%20the%20State%20of%20Delaware%20in%202015%20as%20Functional%20Software%2C%20Inc.%20and%20is%20gonna%20need%20some%20rights%20from%20me%20in%20order%20to%20utilize%20my%20contributions%20in%20this%20here%20PR.%20So%20here's%20the%20deal%3A%20I%20retain%20all%20rights%2C%20title%20and%20interest%20in%20and%20to%20my%20contributions%2C%20and%20by%20keeping%20this%20boilerplate%20intact%20I%20confirm%20that%20Sentry%20can%2

@vercel
Copy link

vercel bot commented Jul 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ❌ Failed (Inspect) Jul 12, 2025 4:30pm
sentry-docs 🛑 Canceled (Inspect) Jul 12, 2025 4:30pm

@codecov
Copy link

codecov bot commented Jul 12, 2025

Bundle Report

Changes will increase total bundle size by 15.71kB (0.07%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 9.83MB 10.38kB (0.11%) ⬆️
sentry-docs-server-cjs 11.92MB 5.33kB (0.04%) ⬆️

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 879.57kB -0.0%
static/css/*.css 995 bytes 742.44kB 0.13%
static/chunks/1831-*.js -3 bytes 422.11kB -0.0%
server/app/api/ip-*.js 1.42kB 260.55kB 0.55%
server/app/_not-*.js 1.42kB 260.54kB 0.55%
server/app/[[...path]]/page_client-*.js 1.42kB 260.51kB 0.55%
server/app/platform-*.js 1.38kB 246.0kB 0.56%
static/chunks/app/[[...path]]/page-*.js 41 bytes 84.08kB 0.05%
static/chunks/2612-*.js (New) 45.09kB 45.09kB 100.0% 🚀
static/chunks/0e5ce63c-*.js 2.18kB 20.34kB 11.99% ⚠️
static/chunks/app/platform-*.js 41 bytes 13.14kB 0.31%
server/middleware-*.js -5.55kB 1.0kB -84.74%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
app-*.json 2 bytes 4.6kB 0.04%
static/N7E6gdsu6uKnhlPBunqRC/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/N7E6gdsu6uKnhlPBunqRC/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/chunks/404-*.js (Deleted) -43.6kB 0 bytes -100.0% 🗑️
static/QMZHrTsVnvKl9wH47tyuj/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/QMZHrTsVnvKl9wH47tyuj/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

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

  • ./src/components/copyForLLMButton.tsx → Total Size: 4.11kB
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js 2.53kB 1.67MB 0.15%
../instrumentation.js 354 bytes 997.14kB 0.04%
9523.js 354 bytes 973.07kB 0.04%
../app/[[...path]]/page.js.nft.json -2 bytes 705.83kB -0.0%
../app/platform-redirect/page.js.nft.json -2 bytes 705.74kB -0.0%
../app/[[...path]]/page.js 79 bytes 592.76kB 0.01%
585.js (New) 86.51kB 86.51kB 100.0% 🚀
../app/platform-redirect/page.js 80 bytes 31.74kB 0.25%
9273.js (Deleted) -84.57kB 0 bytes -100.0% 🗑️

Files in 585.js:

  • ./src/components/docPage/index.tsx → Total Size: 11.22kB

  • ./src/components/copyForLLMButton.tsx → Total Size: 3.22kB

  • ./src/components/platformSdkDetail/index.tsx → Total Size: 2.79kB

  • ./src/components/copyForLLMButton.tsx → Total Size: 502 bytes

  • ./src/components/sidebar/index.tsx → Total Size: 5.2kB

App Routes Affected:

App Route Size Change Total Size Change (%)
/[[...path]] 79 bytes 3.14MB 0.0%
/platform-redirect 80 bytes 2.58MB 0.0%

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Unmanaged Timeouts Cause State Issues

The setTimeout in handleCopy is not cleared. If the component unmounts before the 2-second timeout completes, it attempts to update state (setCopied, setShowToast) on an unmounted component, leading to React warnings and memory leaks. Furthermore, rapid multiple clicks will create multiple unmanaged timeouts, causing unpredictable state behavior. The timeout ID should be stored in a ref and cleared in a useEffect cleanup function, and also cleared before setting a new timeout.

src/components/copyForLLMButton.tsx#L35-L40

// Hide confirmation after 2 seconds
setTimeout(() => {
setCopied(false);
setShowToast(false);
}, 2000);

Fix in CursorFix in Web


Bug: Sentry DSN Fallback Fails on Empty Strings

The Sentry DSN fallback logic incorrectly uses the nullish coalescing operator (??) to assign dummy values. While the preceding if condition correctly identifies empty string DSNs as missing, ?? preserves empty strings instead of assigning the dummy fallback. This allows production builds with empty NEXT_PUBLIC_SENTRY_DSN or SENTRY_DSN to silently proceed with non-functional Sentry, breaking error reporting, as the build no longer fails fast for missing DSNs.

next.config.ts#L45-L52

) {
// When building for previews or local CI environments where real Sentry DSNs
// are not available, fall back to a dummy value so the build can proceed.
// Real production deployments must supply valid DSNs via env vars.
// eslint-disable-next-line no-console
console.warn('SENTRY DSN env vars missing; using dummy values for preview build');
process.env.NEXT_PUBLIC_SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN ?? 'https://[email protected]/0';
process.env.SENTRY_DSN = process.env.SENTRY_DSN ?? 'https://[email protected]/0';

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@rahulchhabria
Copy link
Contributor Author

closing this pr and staritng over. cursor fail.

@rahulchhabria rahulchhabria deleted the cursor/add-copy-for-llm-button-4d11 branch July 12, 2025 16:43
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants