bito-code-review[bot] commented on code in PR #40679:
URL: https://github.com/apache/superset/pull/40679#discussion_r4042271865
##########
superset-frontend/src/dashboard/components/SliceHeaderControls/types.ts:
##########
@@ -23,6 +23,11 @@ export interface SliceHeaderControlsProps {
description: string;
viz_type: string;
slice_name: string;
+ // The name as rendered in the header: the localized value, or the panel's
+ // own title override. Used for strings the viewer reads; slice_name stays
+ // the canonical value for edits, filenames and extension payloads.
+ // Kept in step with the copy of this interface in ./index.tsx.
+ display_name?: string;
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Duplicated interface definition</b></div>
<div id="fix">
`SliceHeaderControlsProps` is defined twice — `types.ts:21` and
`index.tsx:106` — and the copies have already diverged (`index.tsx` adds
`chartHolderRef`, `defaultOpen`, `exportPivotExcel`). This change adds
`display_name` to both and the comment "Kept in step with the copy" documents
the manual sync burden. Consider importing the interface from `types.ts` into
`index.tsx` so the field is maintained once.
</div>
</div>
<small><i>Code Review Run #437e8a</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]