You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mistercrunch (via GitHub)" <gi...@apache.org> on 2026/04/21 04:39:50 UTC
[PR] fix(sqllab): Saved Queries "+ Query" button under subdirectory deployment [superset]
mistercrunch opened a new pull request, #39503:
URL: https://github.com/apache/superset/pull/39503
### SUMMARY
When Superset is deployed at a subdirectory (`SUPERSET_APP_ROOT=/superset`), clicking **"+ Query"** from the Saved Queries view lands on a blank page instead of SQL Lab. The row-level link from the query label has the same bug.
Root cause: `<Router basename={applicationRoot()}>` already prepends the application root to every router-mediated navigation. #35098 additionally wrapped three router-aware calls in `makeUrl()` (which also prepends the app root), producing a double-prefixed path like `/superset/superset/sqllab?new=true`.
Fix: drop `makeUrl()` from the three router-aware call sites so navigation uses paths relative to the router basename:
- `history.push('/sqllab?new=true')` — the **+ Query** button.
- `history.push('/sqllab?savedQueryId=...')` — row "open in SQL Lab".
- `<Link to="/sqllab?savedQueryId=...">` — the row label link.
`makeUrl()` is kept for `window.open(...)` and the clipboard URL, since those bypass React Router and legitimately need the explicit app-root prefix.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — behavior-only fix. Before: blank page at `/superset/superset/sqllab?...`. After: navigates correctly to `/superset/sqllab?...`.
### TESTING INSTRUCTIONS
1. Deploy Superset with `SUPERSET_APP_ROOT=/superset` (or any non-root app root).
2. Navigate to **SQL → Saved Queries** (`/superset/savedqueryview/list/`).
3. Click **"+ Query"** — should open SQL Lab (not a blank page).
4. Click a saved query's label in the list — should open SQL Lab for that saved query.
5. Verify `makeUrl`-backed flows still include the prefix: the **"Copy query URL"** action (clipboard) and right-click → open in new tab both yield URLs containing `/superset/sqllab?savedQueryId=...`.
Automated coverage: `superset-frontend/src/pages/SavedQueryList/SavedQueryList.test.tsx` adds a test that clicks the **+ Query** button and asserts the pushed router path is `/sqllab?new=true` (no app-root prefix), which fails under the previous double-prefixed behavior.
### ADDITIONAL INFORMATION
- [ ] Has associated issue: sc-103661 (internal)
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ui): remove makeUrl() double-prefix bugs under subdirectory deployment [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39503:
URL: https://github.com/apache/superset/pull/39503#issuecomment-4396717953
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): Saved Queries "+ Query" button under subdirectory deployment [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #39503:
URL: https://github.com/apache/superset/pull/39503#issuecomment-4286022648
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/39503?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `66.66667%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 64.44%. Comparing base ([`151d7d7`](https://app.codecov.io/gh/apache/superset/commit/151d7d76da2855a7c6c6c83e670e0f367f62a55e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`00463d3`](https://app.codecov.io/gh/apache/superset/commit/00463d3a996d9d0b3859bf50bb07aa0f6452fcab?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/39503?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...perset-frontend/src/pages/SavedQueryList/index.tsx](https://app.codecov.io/gh/apache/superset/pull/39503?src=pr&el=tree&filepath=superset-frontend%2Fsrc%2Fpages%2FSavedQueryList%2Findex.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3BhZ2VzL1NhdmVkUXVlcnlMaXN0L2luZGV4LnRzeA==) | 66.66% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/39503?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #39503 +/- ##
=======================================
Coverage 64.44% 64.44%
=======================================
Files 2560 2560
Lines 133574 133574
Branches 31017 31017
=======================================
+ Hits 86082 86084 +2
+ Misses 45999 45997 -2
Partials 1493 1493
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/39503/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/39503/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.44% <66.66%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/39503?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): Saved Queries "+ Query" button under subdirectory deployment [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39503:
URL: https://github.com/apache/superset/pull/39503#issuecomment-4285958606
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ui): remove makeUrl() double-prefix bugs under subdirectory deployment [superset]
Posted by "Vitor-Avila (via GitHub)" <gi...@apache.org>.
Vitor-Avila merged PR #39503:
URL: https://github.com/apache/superset/pull/39503
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org