codeant-ai-for-open-source[bot] commented on code in PR #41000:
URL: https://github.com/apache/superset/pull/41000#discussion_r3403514671
##########
superset-frontend/src/extensions/ExtensionsStartup.test.tsx:
##########
@@ -97,6 +97,7 @@ test('sets up global superset object when user is logged in',
async () => {
// Verify the global superset object is set up
expect((window as any).superset).toBeDefined();
expect((window as any).superset.authentication).toBeDefined();
+ expect((window as any).superset.chat).toBeDefined();
Review Comment:
**Suggestion:** Replace the `any` cast with a concrete typed `window` shape
(or an existing reusable global type) so the new assertion remains type-safe.
[custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The file is a TypeScript test file, and the added assertion uses `any` in a
new/modified line. This directly violates the rule against using `any` in new
or modified TypeScript/TSX code.
</details>
[Fix in
Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=0fe182fa76574eb0b3937263341d3d6f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
| [Fix in VSCode
Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=0fe182fa76574eb0b3937263341d3d6f&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/extensions/ExtensionsStartup.test.tsx
**Line:** 100:100
**Comment:**
*Custom Rule: Replace the `any` cast with a concrete typed `window`
shape (or an existing reusable global type) so the new assertion remains
type-safe.
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%2F41000&comment_hash=248f86e40971eac214d5cf8f9a5c64f9b94277a42c530ea1a9019e3f870c8f7e&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41000&comment_hash=248f86e40971eac214d5cf8f9a5c64f9b94277a42c530ea1a9019e3f870c8f7e&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]