Skip to content

feat(cmdk): Add copy stack trace action to issue details#114275

Open
JonasBa wants to merge 2 commits intomasterfrom
jb/issues/cmdk
Open

feat(cmdk): Add copy stack trace action to issue details#114275
JonasBa wants to merge 2 commits intomasterfrom
jb/issues/cmdk

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 29, 2026

Add copy stack trace to cmdk

Add a command palette action that copies the raw stack trace of the
current event to the clipboard. The action only appears when the event
has a stack trace (exception, thread, or message entry) and uses
platform-aware formatting via getStacktraceBody.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JonasBa JonasBa requested a review from a team as a code owner April 29, 2026 03:18
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 29, 2026
Comment thread static/app/views/issueDetails/actions/index.tsx
Copy link
Copy Markdown
Contributor

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b1cf498. Configure here.

if (!event) {
return '';
}
return getStacktraceBody({event}).join('\n\n');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Potential crash from non-array getStacktraceBody return value

Medium Severity

getStacktraceBody can return a non-array falsy value (e.g., undefined or "") when the event has a message entry but data.formatted is falsy, due to the short-circuit msg?.data?.formatted && [msg.data.formatted] on line 52 of getStacktraceBody.tsx. Calling .join('\n\n') on that non-array value will throw a TypeError, crashing the component. The existing caller in sentryAppExternalIssueForm.tsx defensively checks contentArr && contentArr.length > 0 before use, which confirms this edge case is known.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b1cf498. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant