codeant-ai-for-open-source[bot] commented on code in PR #41285:
URL: https://github.com/apache/superset/pull/41285#discussion_r3453768261
##########
superset-frontend/packages/superset-core/src/sqlLab/index.ts:
##########
@@ -62,6 +62,13 @@ export interface Tab {
*/
id: string;
+ /**
+ * The stable backend-assigned ID for this tab (the tabstateview integer ID).
+ * Set once the tab has been persisted to the backend. Undefined for new tabs
+ * before the first backend sync.
+ */
+ backendId?: string;
Review Comment:
**Suggestion:** Avoid adding a public tab identifier that represents the
backend `tabstateview` integer ID; expose a UUID-based public identifier
instead (or keep this value internal and non-exported) to prevent leaking
internal numeric IDs through the extension API. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This is a new public API field that explicitly exposes the backend's
`tabstateview` integer ID. The custom rule forbids exposing internal integer
IDs in public identifiers when a UUID-based public identifier should be used
instead, so this is a real violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=37689e341efa44e6b4f3b3b427070e75&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=37689e341efa44e6b4f3b3b427070e75&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/packages/superset-core/src/sqlLab/index.ts
**Line:** 65:70
**Comment:**
*Custom Rule: Avoid adding a public tab identifier that represents the
backend `tabstateview` integer ID; expose a UUID-based public identifier
instead (or keep this value internal and non-exported) to prevent leaking
internal numeric IDs through the extension API.
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%2F41285&comment_hash=863a8e21822ca16cb6f43f1f17793c2205d924fbf3dd1a4f3c0776ca05e4bd3b&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41285&comment_hash=863a8e21822ca16cb6f43f1f17793c2205d924fbf3dd1a4f3c0776ca05e4bd3b&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]