bito-code-review[bot] commented on code in PR #42483:
URL: https://github.com/apache/superset/pull/42483#discussion_r3758669514
##########
superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx:
##########
@@ -229,7 +253,16 @@ const DndMetricSelect = (props: any) => {
const isMetricAlreadyInValues =
item.type === 'metric' ? value.includes(item.value.metric_name) :
false;
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Type mismatch inconsistency</b></div>
<div id="fix">
Use `DndItemType.Metric` instead of the string literal `'metric'` to be
consistent with the enum check on line 258 (`DndItemType.Column`). Both
`item.type` and `DndItemType.Metric` are `'metric'`, so behavior is correct,
but mixing raw strings with enum references is error-prone.
</div>
</div>
<small><i>Code Review Run #8caafe</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]