Skip to content

feat(sentry-apps): Add disable/enable toggle to _admin sentry app details#114910

Merged
Christinarlong merged 9 commits intomasterfrom
Christinarlong/sentry-app-admin-disable
May 7, 2026
Merged

feat(sentry-apps): Add disable/enable toggle to _admin sentry app details#114910
Christinarlong merged 9 commits intomasterfrom
Christinarlong/sentry-app-admin-disable

Conversation

@Christinarlong
Copy link
Copy Markdown
Contributor

@Christinarlong Christinarlong commented May 5, 2026

Adds a disable/enable sentry app to the Sentry Apps Actions dropdown in _admin.

Requires the optionsentry-apps.disabled-enforcementto be on first
Also requires #114980 to go in first

Refs ISWF-1234

Images

not disabled + disable button

image

Disabled + enable button

image

…ails

Add a Disable/Enable action to the sentry app admin details page that
calls PUT /api/0/sentry-apps/{slug}/ with {isDisabled: true/false}.

Also adds:
- A red "disabled" badge next to the status badge when the app is disabled
- An isDisabled yes/no row in the details list

ISWF-1234
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 5, 2026

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.45%

…ails

Add a Disable/Enable action to the sentry app admin details page that
calls PUT /api/0/sentry-apps/{slug}/ with {isDisabled: true/false}.

Also adds:
- A red "disabled" badge next to the status badge when the app is disabled
- An isDisabled yes/no row in the details list
- Tests for the disable/enable action and badge rendering

ISWF-1234
…ests

Actions are inside a CompactSelect dropdown — need to click the trigger
button (data-test-id="detail-actions") first to make them visible.

ISWF-1234
…test

CompactSelect options need to be selected via their role, not plain
text click, for the onChange handler to fire and open the confirm modal.

ISWF-1234
…test

The CompactSelect + openAdminConfirmModal flow is difficult to test in
isolation. Replace with a simpler test that verifies isDisabled appears
in the detail labels. The action rendering is already covered by the
other two tests.

ISWF-1234
DetailLabel renders as <dt>isDisabled:</dt> — search for the full
text including the colon.

ISWF-1234
@Christinarlong Christinarlong marked this pull request as ready for review May 6, 2026 18:57
@Christinarlong Christinarlong requested a review from a team as a code owner May 6, 2026 18:57
@Christinarlong Christinarlong requested a review from a team May 6, 2026 18:57
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits; but this is _admin so it's a bit less critical.

Comment thread static/gsAdmin/views/sentryAppDetails.tsx Outdated
Comment thread static/gsAdmin/views/sentryAppDetails.spec.tsx Outdated
Comment thread static/gsAdmin/views/sentryAppDetails.spec.tsx
…lper, add mutation test

- Rename DetailLabel from "isDisabled" to "Enabled" with inverted
  boolean for positive-case readability
- Extract renderSentryAppDetails helper to DRY up test setup
- Add mutation test verifying PUT sends correct isDisabled value

ISWF-1234
…lper, add mutation test

- Rename DetailLabel from "isDisabled" to "Enabled" with inverted
  boolean for positive-case readability
- Extract renderSentryAppDetails helper to DRY up test setup
- Add mutation test using renderGlobalModal to test the full
  dropdown → confirm modal → PUT flow
- Add Enabled: yes/no assertions for both states

ISWF-1234
When isDisabled is true, both isAlertable and Enabled render 'no' tags.
Assert exactly 2 matches instead of getByText which errors on multiple.

ISWF-1234
@Christinarlong Christinarlong merged commit 39e0416 into master May 7, 2026
71 checks passed
@Christinarlong Christinarlong deleted the Christinarlong/sentry-app-admin-disable branch May 7, 2026 20:14
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.

2 participants