bito-code-review[bot] commented on PR #43190:
URL: https://github.com/apache/superset/pull/43190#issuecomment-5332445081

   <!-- Bito Reply -->
   The observation is accurate. In the current test setup, `stripAppRoot` 
removes the `/superset` prefix because the mocked `APP_ROOT` matches the prefix 
in the URL, causing `normalizeLegacyDashboardUrl` to receive a string that no 
longer starts with `/superset`. Consequently, the regex does not match, and the 
test passes without exercising the new normalization logic.
   
   Using a double-prefixed URL like `/superset/superset/dashboard/123/...` 
would indeed force the test to exercise the `normalizeLegacyDashboardUrl` 
logic, as `stripAppRoot` would leave one `/superset` prefix remaining for the 
regex to catch.
   
   **superset-frontend/src/pages/DatasetList/index.tsx**
   ```
   // Keep saved Default URLs compatible with the prefix-free SPA route.
   const normalizeLegacyDashboardUrl = (url: string) =>
     url.replace(/^\/superset(?=\/dashboard(?:\/|$))/, '');
   ```


-- 
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]

Reply via email to