codeant-ai-for-open-source[bot] commented on code in PR #40919:
URL: https://github.com/apache/superset/pull/40919#discussion_r4165941047
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts:
##########
@@ -331,7 +331,7 @@ export default function transformProps(
value = row[breakdownName];
}
if (!value) {
- value = NULL_STRING;
+ value = NULL_STRING();
}
Review Comment:
**Suggestion:** The truthiness check converts a valid zero, `false`, or
empty-string category into the null label, changing the waterfall x-axis
category.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Falsy zero check`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=117cd098d42e4392a2ae2ad60208f9fd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=117cd098d42e4392a2ae2ad60208f9fd&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/Waterfall/transformProps.ts
**Line:** 333:335
**Comment:**
*Falsy Zero Check: The truthiness check converts a valid zero, `false`,
or empty-string category into the null label, changing the waterfall x-axis
category.
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%2F40919&comment_hash=e04399e213c448d9bfd9542276252ceeda4fa716fd3e6ea85f26b51d987ce079&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40919&comment_hash=e04399e213c448d9bfd9542276252ceeda4fa716fd3e6ea85f26b51d987ce079&reaction=dislike'>๐</a>
##########
superset-frontend/plugins/plugin-chart-echarts/src/Bubble/transformProps.ts:
##########
@@ -163,7 +163,7 @@ export default function transformProps(chartProps:
EchartsBubbleChartProps) {
data.forEach(datum => {
const dataName = seriesLabel ? datum[seriesLabel] : datum[entityLabel];
- const name = dataName ? String(dataName) : NULL_STRING;
+ const name = dataName ? String(dataName) : NULL_STRING();
Review Comment:
**Suggestion:** The truthiness check converts valid zero, `false`, and
empty-string dimension values into the null label, mislabeling or merging
bubble series.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Falsy zero check`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e8edcc4a99a44283b0ea1afc14b17a1f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e8edcc4a99a44283b0ea1afc14b17a1f&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/Bubble/transformProps.ts
**Line:** 166:166
**Comment:**
*Falsy Zero Check: The truthiness check converts valid zero, `false`,
and empty-string dimension values into the null label, mislabeling or merging
bubble series.
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%2F40919&comment_hash=4c01ae1c0b2ef05b3476bf7d598b998420f9bc256baa1ae9429235360142ef67&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40919&comment_hash=4c01ae1c0b2ef05b3476bf7d598b998420f9bc256baa1ae9429235360142ef67&reaction=dislike'>๐</a>
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -730,7 +730,7 @@ export function extractSeries(
});
normalized[xAxis] =
datum[xAxis] === null && xAxisType === AxisType.Category
- ? NULL_STRING
+ ? NULL_STRING()
: normalized[xAxis];
Review Comment:
**Suggestion:** Null categorical values become a translated string before
`removeNulls` runs, so `removeNulls: true` no longer removes those rows.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Rarely` ยท ๐ท๏ธ `Logic error`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=4665acfbde4944ab97aaa3e643b86ea9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=4665acfbde4944ab97aaa3e643b86ea9&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:** 731:734
**Comment:**
*Logic Error: Null categorical values become a translated string before
`removeNulls` runs, so `removeNulls: true` no longer removes those rows.
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%2F40919&comment_hash=a6068b6dce4de8aaa4d995db0288ca1199a8e78c70ae836c1f21d59ab1face6b&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40919&comment_hash=a6068b6dce4de8aaa4d995db0288ca1199a8e78c70ae836c1f21d59ab1face6b&reaction=dislike'>๐</a>
##########
superset-frontend/src/components/FilterableTable/useCellContentParser.ts:
##########
@@ -17,10 +17,11 @@
* under the License.
*/
import { useCallback, useMemo } from 'react';
+import { t } from '@apache-superset/core/translation';
export type CellDataType = string | number | null;
-export const NULL_STRING = 'NULL';
+export const NULL_STRING = () => t('NULL');
Review Comment:
**Suggestion:** This uses the translation key `NULL`, while the chart
constant uses `<NULL>`, so custom translations configured for `<NULL>` are not
applied in filterable tables.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Api mismatch`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=6ed619919c5c4013bc6c785ced50997c&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=6ed619919c5c4013bc6c785ced50997c&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/src/components/FilterableTable/useCellContentParser.ts
**Line:** 24:24
**Comment:**
*Api Mismatch: This uses the translation key `NULL`, while the chart
constant uses `<NULL>`, so custom translations configured for `<NULL>` are not
applied in filterable tables.
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%2F40919&comment_hash=b8283c4501dab808ebbdecd68d6170348e742f061836db505f6c4035008211fa&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40919&comment_hash=b8283c4501dab808ebbdecd68d6170348e742f061836db505f6c4035008211fa&reaction=dislike'>๐</a>
##########
superset-frontend/src/utils/common.ts:
##########
@@ -68,16 +69,16 @@ export function storeQuery(query: JsonObject):
Promise<string> {
export function optionLabel(opt: OptionValue): string {
if (opt === null) {
- return NULL_STRING;
+ return NULL_STRING();
}
if (opt === '') {
- return EMPTY_STRING;
+ return EMPTY_STRING();
}
if (opt === true) {
- return TRUE_STRING;
+ return TRUE_STRING();
}
if (opt === false) {
- return FALSE_STRING;
+ return FALSE_STRING();
}
Review Comment:
**Suggestion:** These translated display labels are reused by SQL
generation, so customizing them produces invalid or incorrect filter
expressions instead of preserving the original null, empty, and boolean values.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Api mismatch`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=89697b0a188747d48441ee93de32e54d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=89697b0a188747d48441ee93de32e54d&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/src/utils/common.ts
**Line:** 71:82
**Comment:**
*Api Mismatch: These translated display labels are reused by SQL
generation, so customizing them produces invalid or incorrect filter
expressions instead of preserving the original null, empty, and boolean values.
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%2F40919&comment_hash=bba1809b5ef8818fe4e7658db3801d8b66f4637b1e06306b6f78a9d2352e1d7c&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40919&comment_hash=bba1809b5ef8818fe4e7658db3801d8b66f4637b1e06306b6f78a9d2352e1d7c&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]