Skip to content

ref(ui): Drop leftover unused optional args in issueDiff and pagination - #123247

Open
JonasBa wants to merge 1 commit into
getsentry:masterfrom
JonasBa:jonas/unused-args/leftover-components
Open

ref(ui): Drop leftover unused optional args in issueDiff and pagination#123247
JonasBa wants to merge 1 commit into
getsentry:masterfrom
JonasBa:jonas/unused-args/leftover-components

Conversation

@JonasBa

@JonasBa JonasBa commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Leftover unused-args findings after #123200#123237. These files were not in the first split (~92 LOC).

Summary

  • Drop optional props nothing passes under static/app/components.
  • IssueDiff always loads latest events; SplitDiff always diffs lines.
  • Pagination always uses location.pathname.
  • Keep public hook/component options, inherited bags, and API payloads.

Files

  • static/app/components/charts/releaseSeries.tsx
  • static/app/components/core/form/field/meta.tsx
  • static/app/components/core/pagination/pagination.spec.tsx
  • static/app/components/core/pagination/pagination.tsx
  • static/app/components/issueDiff/index.spec.tsx
  • static/app/components/issueDiff/index.tsx
  • static/app/components/splitDiff.tsx

Test plan

  • CI typecheck / frontend tests for this slice.
  • Spot-check issue diff, pagination, and release series call sites.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Follow-up leftovers after the unused-args split.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JonasBa
JonasBa requested review from a team as code owners August 31, 2026 21:19
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 31, 2026
@JonasBa

JonasBa commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

cc @TkDodo @nsdeschenes — leftover unused-args after the first split. Could not request review (fork token).

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f78e3c9. Configure here.

const resolvedTargetEventId =
targetEventId === 'latest' ? targetLatestQuery.data?.eventID : targetEventId;
const resolvedBaseEventId = baseLatestQuery.data?.eventID;
const resolvedTargetEventId = targetLatestQuery.data?.eventID;

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.

Compare diffs latest events only

High Severity

IssueDiff no longer accepts baseEventId and targetEventId and always loads latest for both issues. Merged-issue Compare passes two fingerprint event IDs on the same issue through openDiffModal, so the modal now diffs that issue's latest event against itself.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f78e3c9. Configure here.

Comment on lines 91 to 101
}
),
],
});

// 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 {

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.

Bug: Removing baseEventId and targetEventId from IssueDiff breaks the merged fingerprint comparison, as it will now always diff the 'latest' event against itself.
Severity: HIGH

Suggested Fix

Reinstate the baseEventId and targetEventId props in the IssueDiff component. The component's logic should prioritize using these props to fetch specific events when they are provided, and only fall back to fetching the 'latest' event if they are absent. This will restore the functionality for features like the merged fingerprint comparison.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/components/issueDiff/index.tsx#L71-L101

Potential issue: The removal of `baseEventId` and `targetEventId` props from the
`IssueDiff` component introduces a functional regression. The merged fingerprint
comparison feature, used in `mergedToolbar.tsx`, relies on passing these specific event
IDs to compare two different events within the same merged issue group. With this
change, `IssueDiff` will always fetch the 'latest' event for both the base and target
sides of the diff. Since the issue ID is the same for both in this scenario, the
component will end up fetching the same event twice and diffing it against itself,
rendering the comparison feature useless.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant