This is an automated email from the ASF dual-hosted git repository.

sadpandajoe pushed a commit to branch fix/refresh-interval-warning
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 22c0aa2f43fb82c1bac285d94f303e554b177c5a
Author: Joe Li <[email protected]>
AuthorDate: Wed Sep 30 15:36:04 2026 -0700

    fix(dashboard): show the configured refresh warning alongside the limit 
error
    
    RefreshIntervalModal suppressed the configured refresh warning whenever a
    refresh-limit error was showing, but the warning is only produced under the
    same condition as the error (0 < frequency < limit), so it could never 
render.
    Render the warning independently of the error.
    
    Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
 .../components/RefreshIntervalModal.test.tsx       | 37 ++++++++++++++++++++++
 .../dashboard/components/RefreshIntervalModal.tsx  |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git 
a/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx 
b/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx
index 54423d55777..4ddb72f6eee 100644
--- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx
+++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx
@@ -86,6 +86,43 @@ test('an interval below the configured limit blocks save 
with an error', async (
   expect(defaultProps.onChange).not.toHaveBeenCalled();
 });
 
+test('an interval below the limit shows the configured warning alongside the 
error', async () => {
+  setup(
+    {},
+    {
+      SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT: 60,
+      SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE:
+        'Frequent refreshes put load on the database',
+    },
+  );
+
+  await userEvent.click(screen.getByRole('radio', { name: '10 seconds' }));
+
+  expect(
+    screen.getByText('Refresh frequency must be at least 60 seconds'),
+  ).toBeInTheDocument();
+  expect(
+    screen.getByText('Frequent refreshes put load on the database'),
+  ).toBeInTheDocument();
+});
+
+test('the configured warning is hidden when the interval meets the limit', 
async () => {
+  setup(
+    {},
+    {
+      SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT: 60,
+      SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE:
+        'Frequent refreshes put load on the database',
+    },
+  );
+
+  await userEvent.click(screen.getByRole('radio', { name: '5 minutes' }));
+
+  expect(
+    screen.queryByText('Frequent refreshes put load on the database'),
+  ).not.toBeInTheDocument();
+});
+
 test('an interval at or above the configured limit does not block save', async 
() => {
   setup({}, { SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT: 60 });
 
diff --git 
a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx 
b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx
index a4ec52d7313..47f926946f8 100644
--- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx
+++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx
@@ -130,7 +130,7 @@ const RefreshIntervalModal = ({
                 ? t('Set the automatic refresh frequency for this dashboard.')
                 : t('Set refresh frequency for current session only.'))
             }
-            extra={refreshErrors[0] ? null : refreshWarningMessage}
+            extra={refreshWarningMessage}
             validateStatus={refreshErrors.length ? 'error' : undefined}
           >
             <RefreshFrequencySelect

Reply via email to