-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
ref(ui): Drop leftover unused optional args in issueDiff and pagination #123247
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,7 @@ const SKELETON_ROW_COUNT = 8; | |
| interface IssueDiffProps { | ||
| baseIssueId: string; | ||
| targetIssueId: string; | ||
| baseEventId?: string; | ||
| hasSimilarityEmbeddingsProjectFeature?: boolean; | ||
| shouldBeGrouped?: string; | ||
| targetEventId?: string; | ||
| } | ||
|
|
||
| function getCombinedStacktrace({ | ||
|
|
@@ -57,10 +54,7 @@ function getCombinedStacktrace({ | |
| export function IssueDiff({ | ||
| baseIssueId, | ||
| targetIssueId, | ||
| baseEventId = 'latest', | ||
| targetEventId = 'latest', | ||
| hasSimilarityEmbeddingsProjectFeature, | ||
| shouldBeGrouped, | ||
| }: IssueDiffProps) { | ||
| const organization = useOrganization(); | ||
| const location = useLocation(); | ||
|
|
@@ -77,39 +71,31 @@ export function IssueDiff({ | |
| apiOptions.as<{eventID: string}>()( | ||
| '/organizations/$organizationIdOrSlug/issues/$issueId/events/$eventId/', | ||
| { | ||
| path: | ||
| baseEventId === 'latest' | ||
| ? { | ||
| organizationIdOrSlug: organization.slug, | ||
| issueId: baseIssueId, | ||
| eventId: 'latest', | ||
| } | ||
| : skipToken, | ||
| path: { | ||
| organizationIdOrSlug: organization.slug, | ||
| issueId: baseIssueId, | ||
| eventId: 'latest', | ||
| }, | ||
| staleTime: 60_000, | ||
| } | ||
| ), | ||
| apiOptions.as<{eventID: string}>()( | ||
| '/organizations/$organizationIdOrSlug/issues/$issueId/events/$eventId/', | ||
| { | ||
| path: | ||
| targetEventId === 'latest' | ||
| ? { | ||
| organizationIdOrSlug: organization.slug, | ||
| issueId: targetIssueId, | ||
| eventId: 'latest', | ||
| } | ||
| : skipToken, | ||
| path: { | ||
| organizationIdOrSlug: organization.slug, | ||
| issueId: targetIssueId, | ||
| eventId: 'latest', | ||
| }, | ||
| staleTime: 60_000, | ||
| } | ||
| ), | ||
| ], | ||
| }); | ||
|
|
||
| // Derive resolved IDs reactively from the query results | ||
| const resolvedBaseEventId = | ||
| baseEventId === 'latest' ? baseLatestQuery.data?.eventID : baseEventId; | ||
| const resolvedTargetEventId = | ||
| targetEventId === 'latest' ? targetLatestQuery.data?.eventID : targetEventId; | ||
| const resolvedBaseEventId = baseLatestQuery.data?.eventID; | ||
| const resolvedTargetEventId = targetLatestQuery.data?.eventID; | ||
|
|
||
| // Fetch actual event data once IDs are resolved | ||
| const { | ||
|
Comment on lines
91
to
101
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Removing Suggested FixReinstate the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
@@ -187,13 +173,11 @@ export function IssueDiff({ | |
| project_id: baseEventData?.projectID, | ||
| group_id: baseEventData?.groupID, | ||
| parent_group_id: targetEventData?.groupID, | ||
| shouldBeGrouped, | ||
| }); | ||
| }, [ | ||
| baseEventData, | ||
| hasSimilarityEmbeddingsFeature, | ||
| organization, | ||
| shouldBeGrouped, | ||
| targetEventData, | ||
| ]); | ||
|
|
||
|
|
@@ -215,7 +199,6 @@ export function IssueDiff({ | |
| LazyComponent={SplitDiffLazy} | ||
| base={combinedBase} | ||
| target={combinedTarget} | ||
| type="lines" | ||
| loadingFallback={<IssueDiffLoadingSkeletonRows />} | ||
| /> | ||
| </Stack> | ||
|
|
||
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.
Compare diffs latest events only
High Severity
IssueDiffno longer acceptsbaseEventIdandtargetEventIdand always loadslatestfor both issues. Merged-issue Compare passes two fingerprint event IDs on the same issue throughopenDiffModal, so the modal now diffs that issue's latest event against itself.Additional Locations (1)
static/app/components/issueDiff/index.tsx#L21-L26Reviewed by Cursor Bugbot for commit f78e3c9. Configure here.