codeant-ai-for-open-source[bot] commented on code in PR #32958:
URL: https://github.com/apache/superset/pull/32958#discussion_r3591691714


##########
superset/dashboards/schemas.py:
##########
@@ -196,6 +196,7 @@ class DashboardJSONMetadataSchema(Schema):
     # deprecated wrt dashboard-native filters
     filter_scopes = fields.Dict()
     expanded_slices = fields.Dict()
+    expand_all_slices = fields.Boolean()

Review Comment:
   **Suggestion:** Add an explicit type annotation to this newly introduced 
schema attribute so the added Python code complies with the project’s type-hint 
requirement. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The new class attribute is added without any type annotation, and the rule 
explicitly requires type hints for new or modified Python code where variables 
can be annotated. This is a real violation under the stated rule.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=a195d08907a646b1a388a75a7a08fe72&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=a195d08907a646b1a388a75a7a08fe72&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/dashboards/schemas.py
   **Line:** 199:199
   **Comment:**
        *Custom Rule: Add an explicit type annotation to this newly introduced 
schema attribute so the added Python code complies with the project’s type-hint 
requirement.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=9c0f501f6b9210491220ba60b7359ea558c34f470a2579c61e747fcd0859fb72&reaction=like'>πŸ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=9c0f501f6b9210491220ba60b7359ea558c34f470a2579c61e747fcd0859fb72&reaction=dislike'>πŸ‘Ž</a>



##########
tests/integration_tests/import_export_tests.py:
##########
@@ -489,6 +489,56 @@ def test_import_override_dashboard_2_slices(self):
             "native_filter_configuration": [],
         } == json.loads(imported_dash.json_metadata)
 
+    def test_import_dashboard_expand_all_slices_false(self):

Review Comment:
   **Suggestion:** Add an explicit return type annotation to this new test 
method to satisfy the project’s type-hint requirement. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The new method lacks a return type annotation even though it is a newly 
added Python function definition that can be annotated, which matches the 
type-hint rule.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=01c5d60efbbb4c5d816a50e2953b3743&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=01c5d60efbbb4c5d816a50e2953b3743&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/import_export_tests.py
   **Line:** 492:492
   **Comment:**
        *Custom Rule: Add an explicit return type annotation to this new test 
method to satisfy the project’s type-hint requirement.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=97f47be127ac54e8df86da600bcab3538adfb64bde7b93dc1e642367520a4fa3&reaction=like'>πŸ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=97f47be127ac54e8df86da600bcab3538adfb64bde7b93dc1e642367520a4fa3&reaction=dislike'>πŸ‘Ž</a>



##########
tests/integration_tests/import_export_tests.py:
##########
@@ -489,6 +489,56 @@ def test_import_override_dashboard_2_slices(self):
             "native_filter_configuration": [],
         } == json.loads(imported_dash.json_metadata)
 
+    def test_import_dashboard_expand_all_slices_false(self):
+        dash = self.create_dashboard("dash", slcs=[], id=10005)
+        dash.json_metadata = json.dumps(
+            {
+                "remote_id": 10005,
+                "expand_all_slices": False,
+            }
+        )
+
+        imported_dash_id = import_dashboard(dash, import_time=1991)
+        imported_dash = self.get_dash(imported_dash_id)
+
+        expected_dash = self.create_dashboard("dash", slcs=[], id=10005)
+        make_transient(expected_dash)
+        self.assert_dash_equals(
+            imported_dash, expected_dash, check_position=False, 
check_slugs=False
+        )
+        expected_json_metadata = {
+            "remote_id": 10005,
+            "import_time": 1991,
+            "expand_all_slices": False,
+            "native_filter_configuration": [],
+        }
+        assert expected_json_metadata == 
json.loads(imported_dash.json_metadata)
+
+    def test_import_dashboard_expand_all_slices_true(self):

Review Comment:
   **Suggestion:** Add an explicit return type annotation to this new test 
method to comply with required Python type hints. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The new method definition has no return type hint, so it violates the custom 
requirement to add type hints to new or modified Python functions and methods.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=2490cfc3b46247c9bb3f33a4b272c863&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=2490cfc3b46247c9bb3f33a4b272c863&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/import_export_tests.py
   **Line:** 517:517
   **Comment:**
        *Custom Rule: Add an explicit return type annotation to this new test 
method to comply with required Python type hints.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=88ee3e2058e14a93c8f4e708ed7890db04dd42f5df153cdd2704c80915d00147&reaction=like'>πŸ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=88ee3e2058e14a93c8f4e708ed7890db04dd42f5df153cdd2704c80915d00147&reaction=dislike'>πŸ‘Ž</a>



##########
superset-frontend/spec/fixtures/mockDashboardState.js:
##########
@@ -114,6 +114,6 @@ export const overwriteConfirmMetadata = {
     editors: [],
     viewers: [],
     json_metadata:
-      
'{"timed_refresh_immune_slices":[],"expanded_slices":{},"refresh_frequency":0,"default_filters":"{}","color_scheme":"supersetColors","label_colors":{"0":"#FCC700","1":"#A868B7","15":"#3CCCCB","30":"#A38F79","45":"#8FD3E4","age":"#1FA8C9","Yes,":"#1FA8C9","Female":"#454E7C","Prefer":"#5AC189","No,":"#FF7F44","Male":"#666666","Prefer
 not to say":"#E04355","Ph.D.":"#FCC700","associate\'s 
degree":"#A868B7","bachelor\'s degree":"#3CCCCB","high school diploma or 
equivalent (GED)":"#A38F79","master\'s degree (non-professional)":"#8FD3E4","no 
high school (secondary school)":"#A1A6BD","professional degree (MBA, MD, JD, 
etc.)":"#ACE1C4","some college credit, no degree":"#FEC0A1","some high 
school":"#B2B2B2","trade, technical, or vocational training":"#EFA1AA","No, not 
an ethnic minority":"#1FA8C9","Yes, an ethnic 
minority":"#454E7C","<NULL>":"#5AC189","Yes":"#FF7F44","No":"#666666","last_yr_income":"#E04355","More":"#A1A6BD","Less":"#ACE1C4","I":"#FEC0A1","expected_earn":"#B2B2B2","Yes:
  Willing To":"#EFA1AA","No: Not Willing to":"#FDE380","No 
Answer":"#D3B3DA","In an Office (with Other Developers)":"#9EE5E5","No 
Preference":"#D1C6BC","From 
Home":"#1FA8C9"},"color_scheme_domain":["#1FA8C9","#454E7C","#5AC189","#FF7F44","#666666","#E04355","#FCC700","#A868B7","#3CCCCB","#A38F79","#8FD3E4","#A1A6BD","#ACE1C4","#FEC0A1","#B2B2B2","#EFA1AA","#FDE380","#D3B3DA","#9EE5E5","#D1C6BC"],"shared_label_colors":["Male",
 "Female","<NULL>","Prefer not to say","No Answer","Yes, an ethnic 
minority","No, not an ethnic 
minority","age"],"cross_filters_enabled":false,"filter_scopes":{},"chart_configuration":{},"positions":{}}',
+      
'{"timed_refresh_immune_slices":[],"expanded_slices":{},"expand_all_slices":"false","refresh_frequency":0,"default_filters":"{}","color_scheme":"supersetColors","label_colors":{"0":"#FCC700","1":"#A868B7","15":"#3CCCCB","30":"#A38F79","45":"#8FD3E4","age":"#1FA8C9","Yes,":"#1FA8C9","Female":"#454E7C","Prefer":"#5AC189","No,":"#FF7F44","Male":"#666666","Prefer
 not to say":"#E04355","Ph.D.":"#FCC700","associate\'s 
degree":"#A868B7","bachelor\'s degree":"#3CCCCB","high school diploma or 
equivalent (GED)":"#A38F79","master\'s degree (non-professional)":"#8FD3E4","no 
high school (secondary school)":"#A1A6BD","professional degree (MBA, MD, JD, 
etc.)":"#ACE1C4","some college credit, no degree":"#FEC0A1","some high 
school":"#B2B2B2","trade, technical, or vocational training":"#EFA1AA","No, not 
an ethnic minority":"#1FA8C9","Yes, an ethnic 
minority":"#454E7C","<NULL>":"#5AC189","Yes":"#FF7F44","No":"#666666","last_yr_income":"#E04355","More":"#A1A6BD","Less":"#ACE1C4","I":"#FEC0A1","ex
 pected_earn":"#B2B2B2","Yes: Willing To":"#EFA1AA","No: Not Willing 
to":"#FDE380","No Answer":"#D3B3DA","In an Office (with Other 
Developers)":"#9EE5E5","No Preference":"#D1C6BC","From 
Home":"#1FA8C9"},"color_scheme_domain":["#1FA8C9","#454E7C","#5AC189","#FF7F44","#666666","#E04355","#FCC700","#A868B7","#3CCCCB","#A38F79","#8FD3E4","#A1A6BD","#ACE1C4","#FEC0A1","#B2B2B2","#EFA1AA","#FDE380","#D3B3DA","#9EE5E5","#D1C6BC"],"shared_label_colors":["Male",
 "Female","<NULL>","Prefer not to say","No Answer","Yes, an ethnic 
minority","No, not an ethnic 
minority","age"],"cross_filters_enabled":false,"filter_scopes":{},"chart_configuration":{},"positions":{}}',

Review Comment:
   **Suggestion:** Move this updated frontend fixture to a TypeScript file 
(`.ts`) and type its exported objects instead of adding new changes in a `.js` 
file. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The file is a changed frontend fixture that remains in a `.js` file, which 
matches the rule forbidding newly added or converted frontend code in 
JavaScript instead of TypeScript.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 17)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=75f2b0eb2b304798a028b0208641ed52&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=75f2b0eb2b304798a028b0208641ed52&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/spec/fixtures/mockDashboardState.js
   **Line:** 117:117
   **Comment:**
        *Custom Rule: Move this updated frontend fixture to a TypeScript file 
(`.ts`) and type its exported objects instead of adding new changes in a `.js` 
file.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=cbecc8ae9bebb3db5fb89ff14d92c920c058a73a35ae70be6f740b17f2b211cc&reaction=like'>πŸ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=cbecc8ae9bebb3db5fb89ff14d92c920c058a73a35ae70be6f740b17f2b211cc&reaction=dislike'>πŸ‘Ž</a>



##########
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx:
##########
@@ -145,17 +145,80 @@ test('should render a ChartContainer', () => {
   expect(getByTestId('chart-container')).toBeInTheDocument();
 });
 
-test('should render a description if it has one and isExpanded=true', () => {
-  const { container } = setup(
-    {},
-    {
-      dashboardState: {
-        ...defaultState.dashboardState,
-        expandedSlices: { [props.id]: true },
-      },
-    },
-  );
-  expect(container.querySelector('.slice_description')).toBeInTheDocument();
+describe('no description set', () => {
+  for (const sliceExpanded of [undefined, false, true]) {
+    for (const allExpanded of [undefined, false, true]) {
+      test(`should not render a description, expandedSlices=${sliceExpanded} 
and expandAllSlices=${allExpanded}`, () => {
+        const { container } = setup(
+          {},
+          {
+            dashboardState: {
+              ...defaultState.dashboardState,
+              expandedSlices: { [props.id]: sliceExpanded },
+              expandAllSlices: allExpanded,
+            },
+            sliceEntities: {
+              ...sliceEntities,
+              slices: {
+                [queryId]: {
+                  ...sliceEntities.slices[queryId],
+                  description_markeddown: undefined,
+                  owners: [],
+                  viz_type: VizType.Table,
+                },
+              },
+            },
+          },
+        );
+        expect(
+          container.querySelector('.slice_description'),
+        ).not.toBeInTheDocument();
+      });
+    }
+  }
+});

Review Comment:
   **Suggestion:** Remove this grouping block and keep these assertions as 
direct parameterized `test()` cases so no new `describe()` wrapper is 
introduced. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   This is a component test file, and the new code introduces a `describe()` 
wrapper around parameterized `test()` cases. The custom rule explicitly flags 
new component test code that adds `describe()` blocks when `test()` cases would 
suffice, so this is a real violation.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .github/copilot-instructions.md (line 43)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=10f25446090d41cfaf2b81e93d0bc6bc&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=10f25446090d41cfaf2b81e93d0bc6bc&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx
   **Line:** 148:179
   **Comment:**
        *Custom Rule: Remove this grouping block and keep these assertions as 
direct parameterized `test()` cases so no new `describe()` wrapper is 
introduced.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=1682d2e706137403fb99b237d7e12ceaeb6775790ddeb32b381de3e052f87aca&reaction=like'>πŸ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=1682d2e706137403fb99b237d7e12ceaeb6775790ddeb32b381de3e052f87aca&reaction=dislike'>πŸ‘Ž</a>



##########
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx:
##########
@@ -145,17 +145,80 @@ test('should render a ChartContainer', () => {
   expect(getByTestId('chart-container')).toBeInTheDocument();
 });
 
-test('should render a description if it has one and isExpanded=true', () => {
-  const { container } = setup(
-    {},
-    {
-      dashboardState: {
-        ...defaultState.dashboardState,
-        expandedSlices: { [props.id]: true },
-      },
-    },
-  );
-  expect(container.querySelector('.slice_description')).toBeInTheDocument();
+describe('no description set', () => {
+  for (const sliceExpanded of [undefined, false, true]) {
+    for (const allExpanded of [undefined, false, true]) {
+      test(`should not render a description, expandedSlices=${sliceExpanded} 
and expandAllSlices=${allExpanded}`, () => {
+        const { container } = setup(
+          {},
+          {
+            dashboardState: {
+              ...defaultState.dashboardState,
+              expandedSlices: { [props.id]: sliceExpanded },
+              expandAllSlices: allExpanded,
+            },
+            sliceEntities: {
+              ...sliceEntities,
+              slices: {
+                [queryId]: {
+                  ...sliceEntities.slices[queryId],
+                  description_markeddown: undefined,
+                  owners: [],
+                  viz_type: VizType.Table,
+                },
+              },
+            },
+          },
+        );
+        expect(
+          container.querySelector('.slice_description'),
+        ).not.toBeInTheDocument();
+      });
+    }
+  }
+});
+
+describe('description set', () => {
+  const chartDescriptionRenderInputs = [
+    { expandSlice: undefined, expandAllSlices: undefined, result: false },
+    { expandSlice: undefined, expandAllSlices: false, result: false },
+    { expandSlice: undefined, expandAllSlices: true, result: true },
+    { expandSlice: false, expandAllSlices: undefined, result: false },
+    { expandSlice: false, expandAllSlices: false, result: false },
+    { expandSlice: false, expandAllSlices: true, result: false },
+    { expandSlice: true, expandAllSlices: undefined, result: true },
+    { expandSlice: true, expandAllSlices: false, result: true },
+    { expandSlice: true, expandAllSlices: true, result: true },
+  ];
+
+  for (const {
+    expandSlice,
+    expandAllSlices,
+    result,
+  } of chartDescriptionRenderInputs) {
+    test(`should ${result ? '' : 'not '}render a description if it has one, 
expandedSlices=${expandSlice} and expandAllSlices=${expandAllSlices}`, () => {
+      const { container } = setup(
+        {},
+        {
+          dashboardState: {
+            ...defaultState.dashboardState,
+            expandedSlices: { [props.id]: expandSlice },
+            expandAllSlices,
+          },
+        },
+      );
+
+      if (result) {
+        expect(
+          container.querySelector('.slice_description'),
+        ).toBeInTheDocument();
+      } else {
+        expect(
+          container.querySelector('.slice_description'),
+        ).not.toBeInTheDocument();
+      }
+    });
+  }
 });

Review Comment:
   **Suggestion:** Refactor this section to use standalone or table-driven 
`test()` entries without a `describe()` wrapper. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   This is also a newly added `describe()` block inside a component test file, 
wrapping table-driven `test()` cases. That matches the custom rule against 
introducing `describe()` when plain `test()` cases would suffice, so the 
suggestion is verified.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .github/copilot-instructions.md (line 43)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e7fd0232f33a4c1ca11b24d5a4899e34&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e7fd0232f33a4c1ca11b24d5a4899e34&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx
   **Line:** 181:222
   **Comment:**
        *Custom Rule: Refactor this section to use standalone or table-driven 
`test()` entries without a `describe()` wrapper.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=456834f487e1dd578d626186bb6ce47367e34e0ee522a3787632ce92a6093710&reaction=like'>πŸ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F32958&comment_hash=456834f487e1dd578d626186bb6ce47367e34e0ee522a3787632ce92a6093710&reaction=dislike'>πŸ‘Ž</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to