-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(issue details): Correctly copy issue details for threaded stacktraces #105434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
JoshFerge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core of the logic looks good to me! will defer to frontend folks on state management, etc.
| const markdownText = useMemo(() => { | ||
| return issueAndEventToMarkdown(group, event, groupSummaryData, autofixData); | ||
| }, [group, event, groupSummaryData, autofixData]); | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps -- activeThreadId triggers recomputation when thread changes | ||
| }, [group, event, groupSummaryData, autofixData, activeThreadId]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe pass the activeThreadId to issueAndEventToMarkdown so that we don't have to disable this rule
scttcper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not super excited about the singleton pattern being added to store that id but i'm also not sure a context just for that value would be better
Problem:
Current "Copy As Markdown" button in issue details doesn't handle threaded stacktraces and ignores the user selected thread.
Solution:
Following this commit, added setting and getting of active thread value from ui and included a threads section in the markdown with the relevant stacktrace. Also extracted the formatStacktraceToMarkdown method for easy reuse.
Testing:
Works locally with both button and hotkeys. Tooltip also updates with correct length based on thread selected.
Watchdog thread selected, added portion after change:

Main thread selected, added portion after change:
