codeant-ai-for-open-source[bot] commented on code in PR #43190:
URL: https://github.com/apache/superset/pull/43190#discussion_r3806986901
##########
superset-frontend/src/pages/DatasetList/index.tsx:
##########
@@ -722,7 +725,9 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
// Router basename, which re-prefixes the root — so strip it here to
// avoid a doubled `/superset/superset/...`. External
// `default_endpoint` URLs pass through unchanged.
- const exploreTo = stripAppRoot(exploreURL);
+ const exploreTo = normalizeLegacyDashboardUrl(
+ stripAppRoot(exploreURL),
+ );
Review Comment:
**Suggestion:** The normalization is applied to every relative
`explore_url`, but the backend returns a configured `default_endpoint`
verbatim. A user-configured endpoint such as `/superset/dashboard/custom` is
therefore indistinguishable from a legacy dashboard URL and is silently changed
to `/dashboard/custom`, redirecting the dataset to a different destination.
Restrict this rewrite to URLs known to represent the legacy dashboard route, or
preserve explicitly configured endpoints separately from generated dashboard
URLs. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Custom relative dataset destinations are silently changed.
- ⚠️ Dataset links may reach the wrong dashboard or endpoint.
- ⚠️ Existing Default URL behavior becomes configuration-dependent.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/pages/DatasetList/index.tsx
**Line:** 728:730
**Comment:**
*Api Mismatch: The normalization is applied to every relative
`explore_url`, but the backend returns a configured `default_endpoint`
verbatim. A user-configured endpoint such as `/superset/dashboard/custom` is
therefore indistinguishable from a legacy dashboard URL and is silently changed
to `/dashboard/custom`, redirecting the dataset to a different destination.
Restrict this rewrite to URLs known to represent the legacy dashboard route, or
preserve explicitly configured endpoints separately from generated dashboard
URLs.
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%2F43190&comment_hash=5366b45012a70d603a609a5d2c6da30d231aadb4859ff0bcbcfdfe78a6da0ad1&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43190&comment_hash=5366b45012a70d603a609a5d2c6da30d231aadb4859ff0bcbcfdfe78a6da0ad1&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]