Skip to content

Conversation

@ArthurKnaus
Copy link
Member

@ArthurKnaus ArthurKnaus commented Oct 30, 2025

@ArthurKnaus ArthurKnaus requested a review from a team as a code owner October 30, 2025 11:48
@ArthurKnaus ArthurKnaus requested a review from a team October 30, 2025 11:48
@linear
Copy link

linear bot commented Oct 30, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 30, 2025
@linear
Copy link

linear bot commented Oct 30, 2025

)?.content;
return typeof lastUserMessage === 'string'
? lastUserMessage
: lastUserMessage[0].text.toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Unsafe Type Handling in getLastUserMessage

The getLastUserMessage function makes an unsafe assumption that if lastUserMessage isn't a string, it's an array with a text property at its first element. This can cause runtime errors if lastUserMessage is null, undefined, an empty array, or if lastUserMessage[0] lacks text.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

there is a try catch around it

DrawerUrlParams.SELECTED_SPAN,
parseAsString.withOptions({history: 'replace'})
);

Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Inconsistent State After Drawer Closure

The removeQueryParams function clears selectedTrace but not selectedSpan. Since the hook now manages both trace and span URL parameters, closing the drawer can leave stale spanIds in the URL, causing inconsistent state.

Fix in Cursor Fix in Web

Copy link
Member

@obostjancic obostjancic left a comment

Choose a reason for hiding this comment

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

🚀 🚢

@ArthurKnaus ArthurKnaus merged commit 2d4d1de into master Oct 31, 2025
49 checks passed
@ArthurKnaus ArthurKnaus deleted the arthurknaus/tet-1286-ai-generations-page-table branch October 31, 2025 09:09
isabellaenriquez pushed a commit that referenced this pull request Oct 31, 2025
<img width="1205" height="305" alt="Screenshot 2025-10-30 at 12 47 31"
src="https://github.com/user-attachments/assets/3b601055-3848-44e8-b669-a5f7458c144f"
/>

- closes [TET-1286: AI Generations Page -
Table](https://linear.app/getsentry/issue/TET-1286/ai-generations-page-table)
- closes [TET-1287: AI Generations Page - Input/Output
Columns](https://linear.app/getsentry/issue/TET-1287/ai-generations-page-inputoutput-columns)
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.

3 participants