bito-code-review[bot] commented on code in PR #35005:
URL: https://github.com/apache/superset/pull/35005#discussion_r2320294639
##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -488,7 +488,7 @@ export default function transformProps(
const transformedSeries = transformSeries(
{
...entry,
- id: `${displayName || ''}`,
+ name: `${displayName || ''}`,
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Series identification system broken</b></div>
<div id="fix">
The change from `id` to `name` breaks series identification functionality.
The `mapSeriesIdToAxis` function expects `seriesOption.id` to exist for
tracking primary/secondary series, and the tooltip logic uses series IDs to
determine which formatter to apply. This will cause tooltip formatting errors
and axis mapping failures. Please revert to `id: \`${displayName || ''}\``.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```suggestion
id: `${displayName || ''}`,
```
</div>
</details>
</div>
<small><i>Code Review Run <a
href=https://github.com/apache/superset/pull/35005#issuecomment-3250883645>#6c978e</a></i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -488,7 +488,7 @@
const transformedSeries = transformSeries(
{
...entry,
- id: `${displayName || ''}`,
+ name: `${displayName || ''}`,
},
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing required id property breaks
functionality</b></div>
<div id="fix">
The change from `id` to `name` breaks functionality that depends on series
having an `id` property. The `mapSeriesIdToAxis` function expects
`seriesOption.id` and tooltip functionality relies on `seriesId`. Both
properties should be set to maintain compatibility.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```suggestion
const transformedSeries = transformSeries(
{
...entry,
id: `${displayName || ''}`,
name: `${displayName || ''}`,
},
```
</div>
</details>
</div>
<small><i>Code Review Run <a
href=https://github.com/apache/superset/pull/35005#issuecomment-3250883645>#6c978e</a></i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -721,7 +721,7 @@
extractForecastSeriesContext((entry.name || '') as string).type ===
ForecastSeriesEnum.Observation,
)
- .map(entry => entry.id || entry.name || '')
+ .map(entry => entry.name || '')
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing fallback for annotation series
identifiers</b></div>
<div id="fix">
Removing the fallback to `entry.id` could cause issues with annotation
series that have `id` but no `name` property. For example,
`transformEventAnnotation` creates series with only `id: 'Event - ${label}'`
but no `name`. This would result in empty strings in legend data instead of
meaningful identifiers. Please restore the fallback: `.map(entry => entry.id ||
entry.name || '')`
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```suggestion
.map(entry => entry.id || entry.name || '')
```
</div>
</details>
</div>
<small><i>Code Review Run <a
href=https://github.com/apache/superset/pull/35005#issuecomment-3250883645>#6c978e</a></i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]