-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(replay): Add AI Summary tab for replay details [INTERNAL] #93224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(replay): Add AI Summary tab for replay details [INTERNAL] #93224
Conversation
AI Summary Tab Implementation for Replay DetailsOverviewAdded a new "AI Summary" tab to the Replay Details page that is visible only when the Changes Made1. Updated TabKey EnumFile:
2. Updated FocusTabs ComponentFile:
3. Updated FocusArea ComponentFile:
4. Created AISummary ComponentFile:
API Integration DetailsQuery Key Structurefunction createAISummaryQueryKey(orgSlug: string, replayId: string): ApiQueryKey {
return [
`/organizations/${orgSlug}/replays/summary/`,
{
method: 'POST',
data: {
replayId,
},
},
];
} useApiQuery Configurationconst {data, isLoading, isError} = useApiQuery<SummaryResponse>(
createAISummaryQueryKey(organization.slug, replayRecord?.id ?? ''),
{
staleTime: 5 * 60 * 1000, // 5 minutes
enabled: Boolean(replayRecord?.id),
}
); Endpoint
Request Body{
"replayId": "replay-id-here"
} Expected Response{
"summary": "AI-generated summary text here"
} Benefits of useApiQuery Implementation
User Experience
TestingThe implementation includes:
Dependencies
|
2effe11
to
a624275
Compare
Co-authored-by: Michelle Zhang <[email protected]>
8293b30
to
4fc16dc
Compare
<span>{title}</span> | ||
|
||
<ReplayTimestamp> | ||
<TimestampButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have to prompt to have it return the correct timestamp because my results are coming back in seconds vs ms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah, that's probably a good call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we prompt it to return in MS?
white-space: pre-wrap; | ||
`; | ||
|
||
const ChapterList = styled('div')``; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! when the breadcrumbs are expanded the scroll can get janky but that's fine for now
A new "AI Summary" tab was added to the Replay Details page for internal testing only. It is only visible to the Replay team. This will not be the final design.  * The `TabKey` enum in `static/app/utils/replays/hooks/useActiveReplayTab.tsx` was updated to include `AI_SUMMARY`, and it was added to `supportedVideoTabs` for mobile compatibility. * In `static/app/views/replays/detail/layout/focusTabs.tsx`, the `getReplayTabs` function was modified to conditionally render the "AI Summary" tab based on the `organizations:replay-ai-summaries` feature flag, positioning it before the `Breadcrumbs` tab. * A new `AISummary` component was created in `static/app/views/replays/detail/aiSummary/index.tsx`. This component: * Makes a POST request to `/organizations/{organization_slug}/replays/summary/` on initial load. * Displays a `LoadingIndicator` while the request is in flight. * Shows an error message if the request fails. * Renders the `summary` content upon successful completion. * The `static/app/views/replays/detail/layout/focusArea.tsx` file was updated to import and render the new `AISummary` component when the `AI_SUMMARY` tab is active. Closes REPLAY-388 --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com> Co-authored-by: Michelle Zhang <[email protected]>
A new "AI Summary" tab was added to the Replay Details page for internal testing only. It is only visible to the Replay team. This will not be the final design.
TabKey
enum instatic/app/utils/replays/hooks/useActiveReplayTab.tsx
was updated to includeAI_SUMMARY
, and it was added tosupportedVideoTabs
for mobile compatibility.static/app/views/replays/detail/layout/focusTabs.tsx
, thegetReplayTabs
function was modified to conditionally render the "AI Summary" tab based on theorganizations:replay-ai-summaries
feature flag, positioning it before theBreadcrumbs
tab.AISummary
component was created instatic/app/views/replays/detail/aiSummary/index.tsx
. This component:/organizations/{organization_slug}/replays/summary/
on initial load.LoadingIndicator
while the request is in flight.summary
content upon successful completion.static/app/views/replays/detail/layout/focusArea.tsx
file was updated to import and render the newAISummary
component when theAI_SUMMARY
tab is active.Closes REPLAY-388