bito-code-review[bot] commented on code in PR #44734:
URL: https://github.com/apache/superset/pull/44734#discussion_r4118098686
##########
superset-frontend/src/utils/urlUtils.ts:
##########
@@ -24,7 +24,7 @@ import {
} from '@superset-ui/core';
import Switchboard from '@superset-ui/switchboard';
import rison from 'rison';
-import { isEmpty } from 'lodash-es';
+import { isEmpty } from 'lodash';
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Inconsistent lodash import</b></div>
<div id="fix">
This switches `isEmpty` from `lodash-es` to `lodash`, but the codebase
imports `lodash-es` in 109 files vs `lodash` in 1. The change introduces an
inconsistency against the established convention and pulls in the CJS build for
a single symbol.
</div>
</div>
<small><i>Code Review Run #e7b6f3</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
superset-frontend/src/utils/urlUtils.ts:
##########
@@ -234,14 +200,9 @@ async function resolvePermalinkUrl(
// Silently fall back to default URL if Switchboard call fails
// (e.g., if not in embedded context or callback throws)
}
- // Embedded host opted out (no callback, or threw): the backend URL is
- // the only signal we have. Skip the origin rewrite — Superset is in
- // an iframe and the iframe's origin is not necessarily reachable from
- // where the user will paste the embed.
- return { key, url };
}
- return { key, url: rewritePermalinkOrigin(url) };
+ return { key, url };
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Removed export breaks tests</b></div>
<div id="fix">
Removing the `rewritePermalinkOrigin` export breaks `urlUtils.test.ts`,
which still imports it (line 23) and exercises it in tests at lines 188-290.
TypeScript will fail with TS2305 'Module has no exported member'. Update or
remove those tests in the same change.
</div>
</div>
<small><i>Code Review Run #e7b6f3</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]