-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(issues): rm replay id from event highlights #76316
Conversation
@@ -165,7 +170,11 @@ function HighlightsData({ | |||
[] | |||
); | |||
|
|||
const highlightTagItems = getHighlightTagData({event, highlightTags}); | |||
const highlightTagItems = getHighlightTagData({ |
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.
this removes it from the UI if the user has previously pinned replayId
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 this approach works to avoid people clicking dead links to replays but these highlights are set by users which means we'll be going against their wishes for displaying the link at the top of the page. Looking at the DB, there's about 26 projects in SaaS which have set replayId
or replay_id
to appear in their highlights.
Is there any harm in retaining these links for highlights? I think it might make more sense to figure out a way to prevent linking to missing replays and instead display some mention that the replay wasn't found rather than omitting it entirely.
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.
cc @jas-kas
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.
Is there any harm in retaining these links for highlights? I think it might make more sense to figure out a way to prevent linking to missing replays and instead display some mention that the replay wasn't found rather than omitting it entirely.
I'm okay with retaining these links in Issue Details highlights. Are you suggesting to keep them there if the user has pinned replay_id
or in general for Issue Details highlights (for all users)? I'm good with either case but want to confirm the behaviour.
I think it might make more sense to figure out a way to prevent linking to missing replays and instead display some mention that the replay wasn't found rather than omitting it entirely.
This would be ideal (in the world where a user has explicitly pinned replay_id
) -- that's what we do in the Replay section inside Issue Details as you know. :)
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.
addressed in #76619
const highlightContextDataItems = getHighlightContextData({ | ||
event, | ||
project, | ||
organization, | ||
highlightContext, | ||
highlightContext: { |
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.
this removes it from the UI if the user has previously pinned replay_id
useState<HighlightContext>(prevHighlightContext); | ||
const [highlightTags, setHighlightTags] = useState<HighlightTags>(prevHighlightTags); | ||
const {replay, ...rest} = prevHighlightContext; | ||
const [highlightContext, setHighlightContext] = useState<HighlightContext>({ |
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.
this removes replay_id
from the preview UI up top when in the highlight modal, if the user has previously pinned it
...(replay && {replay: replay?.filter(k => k !== 'replay_id')}), | ||
...rest, | ||
}); | ||
const [highlightTags, setHighlightTags] = useState<HighlightTags>( |
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.
this removes replayId
from the preview UI up top when in the highlight modal, if the user has previously pinned it
const filteredContextKeys = contextKeys.filter( | ||
contextKey => contextKey.includes(ctxFilter) || contextType.includes(ctxFilter) | ||
contextKey => |
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.
this removes replay_id
as an addable option
const tagData = event.tags | ||
.filter(tag => tag.key?.includes(tagFilter)) | ||
.filter(tag => tag.key?.includes(tagFilter) && tag.key !== 'replayId') |
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.
this removes replayId
as an addable option
286502e
to
893681f
Compare
#76619) redo of #76316: instead of completely removing the replay ID from the event highlights, we now do an extra check to see if there was a `fetchError` with this replay ID (e.g. whether this ID is actually valid or not). if it's not valid, then don't render the replay ID to avoid linking to an invalid replay. the link will take you to a page like this: <img width="1126" alt="SCR-20240827-kqxv" src="https://github.com/user-attachments/assets/d5dc991f-e649-4ada-8a64-64db8fc94a50"> before: issue details replay processing error (blue banner shows up) but the event highlights still contains the replay ID <img width="880" alt="SCR-20240827-krda" src="https://github.com/user-attachments/assets/c4a0cbd6-9143-4043-b3f2-0516704999dd"> <img width="897" alt="SCR-20240827-kqac" src="https://github.com/user-attachments/assets/cb802d18-9dbf-47ee-99ab-dcd4baf5e2e0"> after: replayId is shown as `--` and no link <img width="795" alt="SCR-20240827-kpwz" src="https://github.com/user-attachments/assets/709d0c64-9779-4e4b-8641-49d1cc3359cb">
remove replay id from the issue details event highlights edit modal. it also removes replay id (both tag and context options) from the view if it was previously pinned by any user.
see also
reasoning for removing
before
after