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


##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -1662,6 +1662,35 @@ test('should assign distinct dash patterns for multiple 
time offsets consistentl
   expect(symbol1).not.toEqual(symbol2);
 });
 
+test('should adjust dataZoom bottom when chart height changes', () => {
+  const smallChart = createTestChartProps({
+    height: 300,
+    formData: { zoomable: true },
+  });
+  const largeChart = createTestChartProps({
+    height: 600,
+    formData: { zoomable: true },
+  });
+
+  const smallResult = transformProps(smallChart);
+  const largeResult = transformProps(largeChart);
+
+  const smallDataZoom = smallResult.echartOptions.dataZoom as any[];
+  const largeDataZoom = largeResult.echartOptions.dataZoom as any[];

Review Comment:
   **Suggestion:** Replace these `any[]` assertions with a specific data-zoom 
option type (or a narrow local interface with only the accessed fields) so the 
test remains type-safe. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This is a real violation of the custom TypeScript rule: the new test code 
uses `any[]` in type assertions. The rule explicitly requires a concrete type, 
reusable existing type, or narrower generic instead of `any`.
   </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=2eba6e058a8f4687aae4afb24f3edab3&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=2eba6e058a8f4687aae4afb24f3edab3&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/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
   **Line:** 1678:1679
   **Comment:**
        *Custom Rule: Replace these `any[]` assertions with a specific 
data-zoom option type (or a narrow local interface with only the accessed 
fields) so the test remains type-safe.
   
   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%2F38657&comment_hash=ecca10222b1496ebca5315fa44034419b04a66aa5214fc7bd130064c3194bfc0&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38657&comment_hash=ecca10222b1496ebca5315fa44034419b04a66aa5214fc7bd130064c3194bfc0&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