codeant-ai-for-open-source[bot] commented on code in PR #38584:
URL: https://github.com/apache/superset/pull/38584#discussion_r3662410668
##########
superset-frontend/src/types/Dashboard.ts:
##########
@@ -35,6 +35,7 @@ export interface Dashboard {
charts: string[]; // just chart names, unfortunately...
editors?: Subject[];
viewers?: Subject[];
+ is_managed_externally: boolean;
Review Comment:
**Suggestion:** The new required property breaks existing `Dashboard` object
literals that represent older or partial dashboard responses, including the
`dashboard` fixture in `permissionUtils.test.ts`, which now fails TypeScript
compilation because it does not provide `is_managed_externally`. Make the field
optional or update every typed fixture and construction site in the same
change. [type error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Frontend type-checking fails in `permissionUtils.test.ts`.
- ⚠️ Dashboard fixtures and typed construction sites require synchronized
updates.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Run the frontend TypeScript test or type-check compilation after applying
the PR; the
affected type is declared in
`superset-frontend/src/types/Dashboard.ts:22-44`.
2. The permission utility test imports `Dashboard` at
`superset-frontend/src/dashboard/util/permissionUtils.test.ts:23`.
3. That test declares `const dashboard: Dashboard` at
`superset-frontend/src/dashboard/util/permissionUtils.test.ts:94-107`, but
the object
contains no `is_managed_externally` property.
4. TypeScript reports that the object is not assignable to `Dashboard`
because the
required property introduced at
`superset-frontend/src/types/Dashboard.ts:38` is missing;
add the property to the fixture and audit other typed literals, or make the
field optional
if older responses remain supported.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=427f4345f04841b5badad1f25bdf2c65&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=427f4345f04841b5badad1f25bdf2c65&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/types/Dashboard.ts
**Line:** 38:38
**Comment:**
*Type Error: The new required property breaks existing `Dashboard`
object literals that represent older or partial dashboard responses, including
the `dashboard` fixture in `permissionUtils.test.ts`, which now fails
TypeScript compilation because it does not provide `is_managed_externally`.
Make the field optional or update every typed fixture and construction site in
the same change.
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%2F38584&comment_hash=12798f8e53c32de06978e4dbbe20f5631d18e512ad16a194df51d238fadd50b3&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38584&comment_hash=12798f8e53c32de06978e4dbbe20f5631d18e512ad16a194df51d238fadd50b3&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]