Skip to content

feat(api): add endpoint for AI conversation details#106071

Merged
constantinius merged 5 commits intomasterfrom
constantinius/feat/api/add-ai-conversation-details-endpoint
Jan 13, 2026
Merged

feat(api): add endpoint for AI conversation details#106071
constantinius merged 5 commits intomasterfrom
constantinius/feat/api/add-ai-conversation-details-endpoint

Conversation

@constantinius
Copy link
Copy Markdown
Contributor

  • Introduced a new URL pattern for accessing details of specific AI conversations.
  • Added a corresponding constant in the Referrer class for the new endpoint.
  • Refactored tests to extend from a base test case for better organization and maintainability.

Closes https://linear.app/getsentry/issue/TET-1703/conversation-details-endpoint

- Introduced a new URL pattern for accessing details of specific AI conversations.
- Added a corresponding constant in the Referrer class for the new endpoint.
- Refactored tests to extend from a base test case for better organization and maintainability.
@constantinius constantinius requested review from a team as code owners January 12, 2026 13:20
@linear
Copy link
Copy Markdown

linear bot commented Jan 12, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 12, 2026
@constantinius constantinius requested a review from a team January 12, 2026 13:21
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

name="sentry-api-0-organization-ai-conversations",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/ai-conversations/(?P<conversation_id>(?:\d+|[A-Za-z0-9-_]+))/$",
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.

URL regex allows unintended characters due to hyphen placement

Medium Severity

The regex pattern [A-Za-z0-9-_] has the hyphen positioned between 9 and _, which creates an unintended character range from - (ASCII 45) to _ (ASCII 95). This matches many more characters than intended, including :, ;, <, >, ?, @, [, \, ], and ^. Elsewhere in the codebase (e.g., cursor/webhooks/handler.py), the correct pattern [a-zA-Z0-9_-] is used with the hyphen at the end. The unintended characters like : could affect query parsing when the conversation_id is interpolated into the query string in _fetch_conversation_spans.

Fix in Cursor Fix in Web

@constantinius constantinius merged commit 3d3ceb8 into master Jan 13, 2026
66 checks passed
@constantinius constantinius deleted the constantinius/feat/api/add-ai-conversation-details-endpoint branch January 13, 2026 08:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants