codeant-ai-for-open-source[bot] commented on code in PR #43622:
URL: https://github.com/apache/superset/pull/43622#discussion_r3878734061
##########
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx:
##########
@@ -698,7 +719,11 @@ const PropertiesModal = ({
}}
title={t('Dashboard properties')}
isEditMode
- saveDisabled={dashboardInfo?.isManagedExternally || hasErrors}
+ saveDisabled={
+ dashboardInfo?.isManagedExternally ||
+ hasErrors ||
+ extraFields?.saveDisabled
Review Comment:
**Suggestion:** The new contract exposes `saveTooltip`, but this modal only
consumes `saveDisabled`; it passes the unrelated validation or
managed-dashboard message to `StandardModal`. When an extension disables
saving, its required explanation is consequently ignored. Use the extension
tooltip when the extension is the reason saving is disabled, and apply the same
handling in the chart modal. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Downstream fields can disable Save without explanation.
- ⚠️ Dashboard and chart extension users lose actionable feedback.
- ⚠️ Existing validation tooltip may describe the wrong condition.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=dc7c798dfa4c4bfe8c637b98292237c2&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=dc7c798dfa4c4bfe8c637b98292237c2&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
**Line:** 722:725
**Comment:**
*Api Mismatch: The new contract exposes `saveTooltip`, but this modal
only consumes `saveDisabled`; it passes the unrelated validation or
managed-dashboard message to `StandardModal`. When an extension disables
saving, its required explanation is consequently ignored. Use the extension
tooltip when the extension is the reason saving is disabled, and apply the same
handling in the chart modal.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43622&comment_hash=8cf1686199fa15d6be92fd3fc73ec2afd86551b5908dd96b755683ffc1f4ea6e&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43622&comment_hash=8cf1686199fa15d6be92fd3fc73ec2afd86551b5908dd96b755683ffc1f4ea6e&reaction=dislike'>👎</a>
##########
superset-frontend/src/explore/components/PropertiesModal/index.tsx:
##########
@@ -87,6 +101,24 @@ function PropertiesModal({
>(null);
const [tags, setTags] = useState<TagType[]>([]);
+ const extraFields = useMemo(
+ () =>
+ slice.id
+ ? renderExtraFields?.({
+ assetId: slice.id,
+ assetType: 'chart',
+ accessorCount:
+ (selectedEditors?.length ?? 0) + (selectedViewers?.length ?? 0),
+ })
+ : undefined,
Review Comment:
**Suggestion:** The render context is guarded by `slice.id`, but `Slice.id`
is optional and this modal consistently uses the required `slice.slice_id` for
fetching and saving. Normal chart props that contain only `slice_id` therefore
never invoke `renderExtraFields`, so downstream fields are silently missing.
Use the required chart identifier used by the rest of the modal. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Chart extension fields disappear for normal chart payloads.
- ⚠️ Folder or access fields cannot render in chart properties.
- ⚠️ The extension receives no chart identifier or save state.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=48c31875c3c04a46924742eeded5862a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=48c31875c3c04a46924742eeded5862a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/explore/components/PropertiesModal/index.tsx
**Line:** 104:113
**Comment:**
*Api Mismatch: The render context is guarded by `slice.id`, but
`Slice.id` is optional and this modal consistently uses the required
`slice.slice_id` for fetching and saving. Normal chart props that contain only
`slice_id` therefore never invoke `renderExtraFields`, so downstream fields are
silently missing. Use the required chart identifier used by the rest of the
modal.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43622&comment_hash=d1763719964ee95ce3c3793ec749eaf4c7fcacba8366c467a93739feb1b97016&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43622&comment_hash=d1763719964ee95ce3c3793ec749eaf4c7fcacba8366c467a93739feb1b97016&reaction=dislike'>👎</a>
--
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]