fix: add subdirectory deployment support for brandSpinnerUrl#37523
Conversation
Code Review Agent Run #f98b39Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #37523 +/- ##
==========================================
+ Coverage 56.13% 64.60% +8.47%
==========================================
Files 2742 2735 -7
Lines 153422 152097 -1325
Branches 35198 34622 -576
==========================================
+ Hits 86116 98262 +12146
+ Misses 66480 51927 -14553
- Partials 826 1908 +1082
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR extends subdirectory deployment support so that the theme token brandSpinnerUrl is treated consistently with brandLogoUrl and APP_ICON, preventing broken spinner images when Superset runs under a non-root path.
Changes:
- In
create_app, whenSUPERSET_APP_ROOT(orsuperset_app_root) is set andAPP_ICONis a/static/path, update the theme tokens to also prefixbrandSpinnerUrlwith the application root when it points to/static/.
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #9957a2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
@sadpandajoe |
There was a problem hiding this comment.
Code Review Agent Run #d561e6
Actionable Suggestions - 1
-
superset/app.py - 1
- Runtime Error Risk · Line 112-112
Review Details
-
Files reviewed - 1 · Commit Range:
0b3c875..9001f85- superset/app.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
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 documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
Code Review Agent Run #64ae25Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
# Conflicts: # superset/app.py
Code Review Agent Run #0774e8Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
# Conflicts: # tests/unit_tests/views/test_base_theme_helpers.py
Code Review Agent Run #9fc45fActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
This PR fixes theme token handling for subdirectory deployments by ensuring
brandSpinnerUrlis prefixed with the configured static assets prefix before it is used by the initial SPA template and frontend bootstrap payload.Problem
When Superset is deployed under a subdirectory, for example
/superset/or/analytics/, a root-relative loading spinner image URL such as/static/assets/images/loading.gifcould break becausebrandSpinnerUrlwas used without the static assets prefix. This caused 404 errors for the spinner image in non-root deployments.Root Cause
brandLogoUrlandAPP_ICONpaths are normalized on the frontend withensureStaticPrefix, butbrandSpinnerUrlis also used byspa.htmlbefore React mounts. Because the initial template renderedbrandSpinnerUrldirectly, frontend-only URL normalization did not cover the first loading spinner render.Solution
Normalize
brandSpinnerUrlwhile building the SPA template context. Root-relative spinner URLs are prefixed withSTATIC_ASSETS_PREFIX, while absolute URLs are left unchanged. The normalized value is written back into the theme data used by bothspa.htmland the frontend bootstrap payload, keeping the initial spinner and React spinner behavior consistent.TESTING INSTRUCTIONS
ADDITIONAL INFORMATION