Skip to content

Commit 5136da9

Browse files
feat(triage signals): Remove Scan Issues setting [feature flagged] (#103205)
## PR Details + Removing the Scan issues setting for projects under the triage signals feature flag. + Post launch, new orgs will have it set to True since the default is True and existing orgs that explicitly set it to False will still have it as False + Implementation notion doc [link](https://www.notion.so/sentry/Triage-Signals-V0-Technical-Implementation-Details-2a18b10e4b5d8086a7ceddaf4194849a?source=copy_link#2a18b10e4b5d80869424fb52219c3ce9)
1 parent 6ccbe6a commit 5136da9

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

static/app/views/settings/projectSeer/index.spec.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,4 +549,38 @@ describe('ProjectSeer', () => {
549549
);
550550
});
551551
});
552+
553+
it('hides Scan Issues toggle when triage-signals-v0 feature flag is enabled', async () => {
554+
const projectWithFeatureFlag = ProjectFixture({
555+
features: ['triage-signals-v0'],
556+
});
557+
558+
render(<ProjectSeer />, {
559+
organization,
560+
outletContext: {project: projectWithFeatureFlag},
561+
});
562+
563+
// Wait for the page to load
564+
await screen.findByText(/Automation/i);
565+
566+
// The Scan Issues toggle should NOT be visible
567+
expect(
568+
screen.queryByRole('checkbox', {
569+
name: /Scan Issues/i,
570+
})
571+
).not.toBeInTheDocument();
572+
});
573+
574+
it('shows Scan Issues toggle when triage-signals-v0 feature flag is disabled', async () => {
575+
render(<ProjectSeer />, {
576+
organization,
577+
outletContext: {project},
578+
});
579+
580+
// The Scan Issues toggle should be visible
581+
const toggle = await screen.findByRole('checkbox', {
582+
name: /Scan Issues/i,
583+
});
584+
expect(toggle).toBeInTheDocument();
585+
});
552586
});

static/app/views/settings/projectSeer/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ function ProjectSeerGeneralForm({project}: {project: Project}) {
195195
model?.getValue('autofixAutomationTuning') !== 'off',
196196
} satisfies FieldObject;
197197

198+
const isTriageSignalsFeatureOn = project.features.includes('triage-signals-v0');
199+
198200
const seerFormGroups: JsonFormObject[] = [
199201
{
200202
title: (
@@ -219,7 +221,7 @@ function ProjectSeerGeneralForm({project}: {project: Project}) {
219221
</div>
220222
),
221223
fields: [
222-
seerScannerAutomationField,
224+
...(isTriageSignalsFeatureOn ? [] : [seerScannerAutomationField]),
223225
autofixAutomatingTuningField,
224226
automatedRunStoppingPointField,
225227
],

0 commit comments

Comments
 (0)