Skip to content

feat(seer): Add structured LLM context for replay list and detail pages#116045

Merged
Mihir-Mavalankar merged 4 commits into
masterfrom
feat/seer-replay-structured-context
May 26, 2026
Merged

feat(seer): Add structured LLM context for replay list and detail pages#116045
Mihir-Mavalankar merged 4 commits into
masterfrom
feat/seer-replay-structured-context

Conversation

@Mihir-Mavalankar
Copy link
Copy Markdown
Contributor

  • 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.

@Mihir-Mavalankar Mihir-Mavalankar requested a review from JonasBa May 21, 2026 18:53
@Mihir-Mavalankar Mihir-Mavalankar self-assigned this May 21, 2026
@Mihir-Mavalankar Mihir-Mavalankar requested review from a team as code owners May 21, 2026 18:53
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 21, 2026
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>
Comment thread static/app/views/explore/replays/details.tsx
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

📊 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>
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;
}
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.

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(...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
Comment thread static/app/views/explore/replays/list.tsx Outdated
Rename ReplaysListContainerInner to ReplaysListContainer and move it
below ReplaysListBody per review feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Mihir-Mavalankar Mihir-Mavalankar merged commit 9831785 into master May 26, 2026
71 checks passed
@Mihir-Mavalankar Mihir-Mavalankar deleted the feat/seer-replay-structured-context branch May 26, 2026 18:11
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.

2 participants