fix(alerts): don't show a never-run report as a green success (#29622)#41121
Conversation
A report or alert that has never executed has last_state="Not triggered" (ReportState.NOOP, the backend column default). AlertStatusIcon rendered that state with a green CheckOutlined icon and the success color, so an unexecuted report looked exactly like a successful one. Render the "Not triggered" / unknown state with a neutral CalendarOutlined icon (per the suggestion on the issue) and a neutral color instead of the green success styling, and label it "Report not yet run" for reports. Success/Working/ Error/Grace states are unchanged. Adds AlertStatusIcon.test.tsx covering each state, including a regression test that the "Not triggered" state no longer renders the success check icon. Fixes #29622 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Code Review Agent Run #bcefc3Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41121 +/- ##
==========================================
+ Coverage 64.30% 64.35% +0.05%
==========================================
Files 2652 2651 -1
Lines 144817 144586 -231
Branches 33419 33379 -40
==========================================
- Hits 93128 93053 -75
+ Misses 50023 49888 -135
+ Partials 1666 1645 -21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aminghadersohi
left a comment
There was a problem hiding this comment.
AlertStatusIcon.tsx:27 — getStatusColor accepts isReportEnabled: boolean but never reads it in any branch. Now that Noop uses a single neutral color regardless of report/alert type, the parameter is permanently dead — remove it and the corresponding argument at line 125.
| lastStateConfig.icon = Icons.CheckOutlined; | ||
| lastStateConfig.label = t('Nothing triggered'); | ||
| lastStateConfig.icon = Icons.CalendarOutlined; | ||
| lastStateConfig.label = isReportEnabled |
There was a problem hiding this comment.
[MEDIUM] New tooltip label 'Report not yet run' for reports doesn't match the list-view filter option AlertStateLabel[AlertState.Noop] = t('Not triggered') in AlertReportList/index.tsx:78. Three different strings now exist for the same backend state (Not triggered in filter, Report not yet run in icon tooltip for reports, Nothing triggered in icon tooltip for alerts). Either update AlertStateLabel to align with this wording, or keep the tooltip consistent with the existing filter term.
There was a problem hiding this comment.
The filter dropdown is one shared control that can't tell a report from an alert, so it stays generic (Not triggered); the icon tooltip is per-row and knows the type, which is the whole point of #29622 — a never-run report reading Nothing triggered is what looked wrong. Happy to rename the filter to match if you think the divergence is more confusing than helpful — preference?
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@aminghadersohi dropped the dead |
…plit Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #1ae2a3Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
aminghadersohi
left a comment
There was a problem hiding this comment.
Label divergence ( filter vs tooltip) makes sense — the filter is type-agnostic by necessity, the tooltip is per-row contextual. Design rationale accepted.
aminghadersohi
left a comment
There was a problem hiding this comment.
Label divergence ("Not triggered" filter vs "Report not yet run" tooltip) makes sense — the filter is type-agnostic by necessity, the tooltip is per-row contextual. Design rationale accepted.
SUMMARY
Fixes #29622. A report or alert that has never executed has
last_state = "Not triggered"(ReportState.NOOPis the column default insuperset/reports/models.py).AlertStatusIconrendered that state with a greenCheckOutlinedicon and the success color — so an unexecuted report looked identical to a successfully-sent one.This renders the
Not triggered/ unknown state with a neutralCalendarOutlinedicon (per @yousoph's suggestion on the issue) and a neutral color instead of the green success styling, and labels it "Report not yet run" for reports (alerts keep "Nothing triggered", which also covers the ran-but-condition-not-met case).Success/Working/Error/On Graceare unchanged.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: a never-run report shows a green ✓ (looks like success).
After: a never-run report shows a neutral calendar icon with the tooltip "Report not yet run".
TESTING INSTRUCTIONS
Create a new alert/report and don't let it run yet (or check one that hasn't run). In the Alerts & Reports list, the "Last Run" status should now show a neutral calendar icon, not a green check.
Automated: adds
AlertStatusIcon.test.tsxcovering each state, including a regression test that theNot triggeredstate renders the calendar icon and not the success check icon.ADDITIONAL INFORMATION
🤖 Generated with Claude Code