Skip to content

fix(alerts): don't show a never-run report as a green success (#29622)#41121

Merged
rusackas merged 4 commits into
masterfrom
fix/29622-report-not-yet-run-status
Jun 18, 2026
Merged

fix(alerts): don't show a never-run report as a green success (#29622)#41121
rusackas merged 4 commits into
masterfrom
fix/29622-report-not-yet-run-status

Conversation

@rusackas

Copy link
Copy Markdown
Member

SUMMARY

Fixes #29622. A report or alert that has never executed has last_state = "Not triggered" (ReportState.NOOP is the column default in superset/reports/models.py). AlertStatusIcon rendered that state with a green CheckOutlined icon and the success color — so an unexecuted report looked identical to a successfully-sent one.

This renders the Not triggered / unknown state with a neutral CalendarOutlined icon (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 Grace are 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.tsx covering each state, including a regression test that the Not triggered state renders the calendar icon and not the success check icon.

npm run test -- src/features/alerts/components/AlertStatusIcon.test.tsx

ADDITIONAL INFORMATION

🤖 Generated with Claude Code

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>
@dosubot dosubot Bot added the alert-reports Namespace | Anything related to the Alert & Reports feature label Jun 16, 2026
@bito-code-review

bito-code-review Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #bcefc3

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 1479637..1479637
    • superset-frontend/src/features/alerts/components/AlertStatusIcon.test.tsx
    • superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@netlify

netlify Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 1ebeccf
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a321f2f416d130008410f82
😎 Deploy Preview https://deploy-preview-41121--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.35%. Comparing base (3e2174b) to head (3c0d7ef).
⚠️ Report is 52 commits behind head on master.

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     
Flag Coverage Δ
javascript 68.47% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

AlertStatusIcon.tsx:27getStatusColor 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

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.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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?

Comment thread superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx Outdated
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jun 18, 2026
@rusackas

Copy link
Copy Markdown
Member Author

@aminghadersohi dropped the dead isReportEnabled param from getStatusColor and its call site, and deduped the Noop label into a noopLabel const — both in the latest push. Left the label-wording and the alert-side test points for me to mull over.

…plit

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bito-code-review

bito-code-review Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #1ae2a3

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 1479637..3c0d7ef
    • superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx
    • superset-frontend/src/features/alerts/components/AlertStatusIcon.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

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

Label divergence ( filter vs tooltip) makes sense — the filter is type-agnostic by necessity, the tooltip is per-row contextual. Design rationale accepted.

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

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.

@rusackas rusackas merged commit 3eae8cd into master Jun 18, 2026
65 checks passed
@rusackas rusackas deleted the fix/29622-report-not-yet-run-status branch June 18, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alert-reports Namespace | Anything related to the Alert & Reports feature size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A report not yet executed is marked like a success

3 participants