feat(conversations): Show saved query name in breadcrumbs#118988
Merged
constantinius merged 3 commits intoJul 6, 2026
Merged
Conversation
Replace the custom SaveConversationQueryModal with the shared openSaveQueryModal so the dialog is identical to logs/traces. Add conversations-specific analytics: widen the modal's source type to 'conversations' so it fires conversations.save_query_modal instead of misattributing to traces. Persist the agent filter: the save button reads the agent URL param and includes it in the POST. The URL builder restores it using comma-separated format for nuqs compatibility. Depends on #118982 being merged and deployed (backend serializer support for the agent field). Contributes to TET-2552
When a saved conversation query is loaded (id and title URL params present), show a breadcrumb with 'Conversations > <query name>' instead of the plain 'AI Conversations' title. Clicking 'Conversations' navigates back to the landing page. Matches the pattern used in logs, traces, and metrics. Contributes to TET-2552
obostjancic
approved these changes
Jul 3, 2026
b4d8902 to
8a86580
Compare
Base automatically changed from
constantinius/ref/explore/TET-2552-reuse-save-query-modal
to
master
July 6, 2026 07:38
Comment on lines
+172
to
+174
| const savedQueryId = decodeScalar(location.query.id); | ||
|
|
||
| if (defined(savedQueryId) && defined(savedQueryTitle) && savedQueryTitle.length > 0) { |
Contributor
There was a problem hiding this comment.
Bug: The breadcrumb for a saved conversation query is rendered based on URL parameters (savedQueryId, savedQueryTitle) without validating that the query actually exists on the server.
Severity: LOW
Suggested Fix
To align with the pattern used in logs and traces, the component should use the useGetSavedQuery(savedQueryId) hook. The breadcrumb should only be rendered if the hook returns a valid savedQuery object from the API, and the breadcrumb title should be sourced from savedQuery.name instead of the URL parameter.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/views/explore/conversations/layout.tsx#L172-L174
Potential issue: The code in `ConversationsLandingTitle` renders a breadcrumb based on
`savedQueryId` and `savedQueryTitle` from the URL query parameters. However, it only
checks for the presence of these parameters (`defined(savedQueryId)`) and not their
validity. This allows for the creation of URLs with arbitrary `id` and `title` values,
which will render a fake breadcrumb for a non-existent saved query. This behavior is
inconsistent with parallel implementations for logs and traces, which validate the ID
against the server using `useGetSavedQuery` before rendering the breadcrumb. While not a
security risk, it's incorrect UI behavior.
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a saved conversation query is loaded, show a breadcrumb with Conversations > <query name> instead of the plain title. Clicking Conversations navigates back to the landing page. Matches the pattern used in logs, traces, and metrics.
Stacked on #118921.
Contributes to TET-2552