bito-code-review[bot] commented on code in PR #36332:
URL: https://github.com/apache/superset/pull/36332#discussion_r2674148589
##########
superset-frontend/src/explore/components/SaveModal.tsx:
##########
@@ -95,9 +102,13 @@ class SaveModal extends Component<SaveModalProps,
SaveModalState> {
this.state = {
newSliceName: props.sliceName,
datasetName: props.datasource?.name,
- action: this.canOverwriteSlice() ? 'overwrite' : 'saveas',
+ action: this.canOverwriteSlice()
+ ? ChartStatusType.overwrite
+ : ChartStatusType.saveas,
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Inconsistent enum vs string usage</b></div>
<div id="fix">
The refactoring introduces ChartStatusType enum but inconsistently mixes it
with string literals for action values. While functionally equivalent since
enum values are strings, this creates maintenance risk if enum values change.
For example, comparisons like `this.state.action === 'overwrite'` should use
`ChartStatusType.overwrite` for type safety.
</div>
</div>
<small><i>Code Review Run #bcacb9</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]