bito-code-review[bot] commented on code in PR #39257:
URL: https://github.com/apache/superset/pull/39257#discussion_r3651655986
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -435,9 +456,16 @@ const StyledButtonWrapper = styled.span`
`;
const checkboxGenerator = (
- d: boolean,
- onChange: (value: boolean) => void,
-): ReactNode => <CheckboxControl value={d} onChange={onChange} />;
+ d: unknown,
+ onChange: (value: unknown) => void,
+): ReactNode => (
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Checkbox type mismatch</b></div>
<div id="fix">
`checkboxGenerator` was refactored from `(d: boolean, onChange: (value:
boolean) => void)` to `(d: unknown, onChange: (value: unknown) => void)`,
losing type information. The consumer `CheckboxControl` expects `value?:
boolean` and `onChange?: (value: boolean) => void` — `unknown` bypasses this
contract. The old signature was correctly typed for all callers (`is_dttm`,
`filterable`, `groupby` renderers at lines 761–763 and 802–804). The diff-wide
motivation (SQL expression support) does not affect these checkbox fields.
</div>
</div>
<small><i>Code Review Run #d1d8a5</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]