feat(cmdk): Add copy stack trace action to issue details#114275
feat(cmdk): Add copy stack trace action to issue details#114275
Conversation
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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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'); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit b1cf498. Configure here.


Add copy stack trace to cmdk