feat(seer): Add structured LLM context for replay list and detail pages#116045
Merged
Conversation
Register /explore/replays/ and /explore/replays/:replaySlug/ in STRUCTURED_CONTEXT_ROUTES so Seer receives structured JSON context instead of an ASCII screenshot fallback on these pages. The replay list page provides search query, sort order, date range, and dead/rage click widget visibility. The replay detail page provides replay metadata including user, browser, OS, duration, error and click counts, environment, and platform. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2aa66ce to
4ed6ea0
Compare
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.56% |
The userName field sent the recorded end-user's display_name (which can be an email, username, or IP) to the LLM backend as PII. The replayId is sufficient for Seer to resolve user details server-side. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nsdeschenes
requested changes
May 26, 2026
Comment on lines
+100
to
+119
| function ReplayListLLMContextData({ | ||
| showDeadRageClickCards, | ||
| widgetIsOpen, | ||
| }: { | ||
| showDeadRageClickCards: boolean; | ||
| widgetIsOpen: boolean; | ||
| }) { | ||
| const searchQuery = useQueryParamsSearch().formatString(); | ||
| const pageFilters = usePageFilters(); | ||
| const {sortType} = useReplayTableSort(); | ||
| useLLMContext({ | ||
| contextHint: | ||
| 'Sentry session replay list page. Users search and filter recorded browser sessions by attributes like error count, rage clicks, dead clicks, browser, OS, and user. You can search events with a replays filter to find sessions matching specific criteria, or look up an individual replay by its ID for full session details.', | ||
| searchQuery, | ||
| sort: `${sortType.kind === 'desc' ? '-' : ''}${sortType.field}`, | ||
| currentSelectedDateRange: pageFilters.selection.datetime, | ||
| deadRageClickWidgetsVisible: showDeadRageClickCards && widgetIsOpen, | ||
| }); | ||
| return null; | ||
| } |
Contributor
There was a problem hiding this comment.
Is there a reason why this needs to be a component instead of a custom hook?
We're just making calls to hooks so this could instead just be a custom hook like useReplayListLLMContextData(...)
Contributor
Author
There was a problem hiding this comment.
Okay, I have changed it but now it's custom hook but since we use useQueryParamsSearch I need to call in inside the component.
Tbh this is really not my forte so I will defer to whatever you suggest is best.
Convert the renderless ReplayListLLMContextData component into a useReplayListLLMContextData hook. Split ReplaysListContainerInner into an outer shell (providers) and an inner ReplaysListBody so the hook can be called from within the ReplayQueryParamsProvider context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nsdeschenes
approved these changes
May 26, 2026
Rename ReplaysListContainerInner to ReplaysListContainer and move it below ReplaysListBody per review feedback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Register /explore/replays/ and /explore/replays/:replaySlug/ in STRUCTURED_CONTEXT_ROUTES so Seer receives structured JSON context instead of an ASCII screenshot fallback on these pages.
The replay list page provides search query, sort order, date range, and dead/rage click widget visibility. The replay detail page provides replay metadata including user, browser, OS, duration, error and click counts, environment, and platform.