Skip to content

fix(api-conventions): Remove callback API requests from group action creators - #126268

Open
sentry[bot] wants to merge 4 commits into
masterfrom
seer/fix/group-actions-api-callbacks
Open

sentry[bot] wants to merge 4 commits into
masterfrom
seer/fix/group-actions-api-callbacks

Conversation

@sentry

@sentry sentry Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses the no-callback-api-request convention violation in static/app/actionCreators/group.tsx.

The bulkUpdate and mergeGroups functions were partially migrated to use api.requestPromise with async/await, but they still accepted and forwarded RequestCallbacks (success, error, complete options). This led to a hybrid pattern that violated the coding convention.

Changes include:

  • Removed the options: RequestCallbacks parameter from bulkUpdate and mergeGroups in static/app/actionCreators/group.tsx.
  • Updated all call sites to await the returned promise inside try/catch/finally. Analytics and cache resets that used to run right after the request was fired now run before the await, so they still happen immediately. Affected files include:
    • static/app/views/issueList/actions/utils.tsx
    • static/app/views/issueDetails/groupPriority.tsx
    • static/app/views/issueDetails/actions/index.tsx
    • static/app/views/issueList/actions/index.tsx
    • static/app/views/issueDetails/actions/shareModal.tsx
    • static/app/views/issueDetails/utils.tsx
    • static/app/views/issueList/pages/inbox/issuePreview/issuePreviewActions.tsx
    • static/app/views/issueDetails/groupSimilarIssues/similarStackTrace/index.tsx
  • Re-added the RequestCallbacks import to static/app/actionCreators/group.tsx as it is still required by the bulkDelete function.
  • Updated static/app/actionCreators/group.spec.tsx to drop the obsolete third argument and await each call.
  • Call sites that previously had no error callback now have an empty catch, because GroupStore already shows the error alert and the functions now reject on failure.

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.

Fixes CODING-CONVENTIONS-4KW

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

@sentry
sentry Bot requested review from a team as code owners October 1, 2026 22:48
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 1, 2026

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

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 87c8fc7. Configure here.

Comment thread static/app/views/issueDetails/actions/index.tsx Outdated
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.66% 95.66% ±0%
Typed 142,467 142,459 🔴 -8
Untyped 6,466 6,464 🟢 -2
🔍 2 new type safety issues introduced

any-typed symbols (2 new)

File Line Detail
static/app/actionCreators/group.tsx 138 response (var)
static/app/actionCreators/group.tsx 162 response (var)

This is informational only and does not block the PR.

Replace the .then/.catch/.finally chains with try/catch/finally around
an awaited call. Analytics and cache resets that used to run right after
the request was fired now run before the await, so they still happen
immediately instead of waiting on the response.

This branch was successfully deployed

1 active deployment
Preview — e652159b Deployed Oct 2, 2026 by vercel[bot]
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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant