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


##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -919,8 +921,14 @@ export function getLegendProps(
         }
       : {}),
     selected: legendState ?? {},
-    selector: ['all', 'inverse'],
+    // `selectorLabel.show` only hides the button text. `selector: false` 
removes
+    // the All/Inv buttons themselves.
+    selector: [
+      { type: "all", title: t("All") },
+      { type: "inverse", title: t("Inv") },
+    ],

Review Comment:
   **Suggestion:** `selector` is set regardless of `showSelectorLegend`, so 
disabling the option still renders blank All/Inv controls.
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Often` ยท ๐Ÿท๏ธ `Incomplete 
implementation`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![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=ff295b040ffe469caf7d89a67829e72e&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=ff295b040ffe469caf7d89a67829e72e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <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/src/utils/series.ts
   **Line:** 926:929
   **Comment:**
        *Incomplete Implementation: `selector` is set regardless of 
`showSelectorLegend`, so disabling the option still renders blank All/Inv 
controls.
   
   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%2F45172&comment_hash=6ca99651838d5dee47a1c9a5d9df212dbd899245df176fb7e3c1978fe6c05576&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45172&comment_hash=6ca99651838d5dee47a1c9a5d9df212dbd899245df176fb7e3c1978fe6c05576&reaction=dislike'>๐Ÿ‘Ž</a>



##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -724,9 +725,9 @@ export function extractSeries(
     // calculations (getBaselineSeriesForStream) run, so BigInt and Number
     // values can be combined without throwing (see #36401).
     const normalized: DataRecord = {};
-    Object.keys(datum).forEach(key => {
+    Object.keys(datum).forEach((key) => {
       const value = datum[key];
-      normalized[key] = typeof value === 'bigint' ? Number(value) : value;
+      normalized[key] = typeof value === "bigint" ? Number(value) : value;
     });

Review Comment:
   **Suggestion:** `extractSeries` also converts x-axis `BigInt` values; 
distinct categorical or numeric values above `Number.MAX_SAFE_INTEGER` can 
become the same coordinate and merge chart points.
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Rarely` ยท ๐Ÿท๏ธ `Logic error`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![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=9af6611f98fc4aebb95a638f3751342d&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=9af6611f98fc4aebb95a638f3751342d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <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/src/utils/series.ts
   **Line:** 728:731
   **Comment:**
        *Logic Error: `extractSeries` also converts x-axis `BigInt` values; 
distinct categorical or numeric values above `Number.MAX_SAFE_INTEGER` can 
become the same coordinate and merge chart points.
   
   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%2F45172&comment_hash=32ad2cd347b8664aaca20a50a7f0d75c68ef5f2c913bd74835756f0cb43b000d&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45172&comment_hash=32ad2cd347b8664aaca20a50a7f0d75c68ef5f2c913bd74835756f0cb43b000d&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