-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(triage signals): Auto Trigger default settings change [feature flagged] #103992
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
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 |
|---|---|---|
|
|
@@ -327,8 +327,11 @@ function ProjectSeerGeneralForm({project}: {project: Project}) { | |
| }, | ||
| ]; | ||
|
|
||
| // When triage signals flag is on, toggle defaults to checked unless explicitly 'off' | ||
| // - New orgs (undefined): shows checked, persists on form interaction | ||
| // - Existing orgs with 'off': shows unchecked, preserves their choice | ||
| const automationTuning = isTriageSignalsFeatureOn | ||
| ? (project.autofixAutomationTuning ?? 'off') !== 'off' | ||
| ? project.autofixAutomationTuning !== 'off' | ||
Mihir-Mavalankar marked this conversation as resolved.
Show resolved
Hide resolved
Member
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. Why does this branch return a
Contributor
Author
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. If the feature flag is on "Auto-Trigger Fixes" is a toggle and if it's off it's a dropdown. Since it's a toggle when it's on I used bool here and I convert it to a string later. I could make it a string though a toggle being a string might be weird. |
||
| : (project.autofixAutomationTuning ?? 'off'); | ||
|
|
||
| return ( | ||
|
|
@@ -346,6 +349,7 @@ function ProjectSeerGeneralForm({project}: {project: Project}) { | |
| initialData={{ | ||
| seerScannerAutomation: project.seerScannerAutomation ?? false, | ||
| // Same DB field, different UI: toggle (boolean) vs dropdown (string) | ||
| // When triage signals flag is on, default to true (ON) | ||
Mihir-Mavalankar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| autofixAutomationTuning: automationTuning, | ||
| automated_run_stopping_point: preference?.automation_handoff | ||
| ? 'cursor_handoff' | ||
|
|
||
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.
Bug: Existing
autofixAutomationTuningvalues are silently downgraded to'medium'when the feature flag is enabled.Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
When the
triage-signals-v0feature flag is enabled, existingautofixAutomationTuningvalues (e.g.,'high','low') are converted to a booleantruefor UI display. If the user does not interact with the form, thegetDatafunction converts thistrueback to'medium'upon submission, silently downgrading the original setting without user consent. This is evident from removed tests and new test fixtures explicitly using'medium'to avoid this scenario.💡 Suggested Fix
Ensure
getDatapreserves existingautofixAutomationTuningstring values when the toggle is displayed as checked, rather than unconditionally converting them to'medium'.🤖 Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID:
3611850There 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.
Yes that's the point of the feature.