fix: restore bundle_js template variable for Vite admin UI#4145
Open
ecthelion77 wants to merge 1 commit intoIBM:mainfrom
Open
fix: restore bundle_js template variable for Vite admin UI#4145ecthelion77 wants to merge 1 commit intoIBM:mainfrom
ecthelion77 wants to merge 1 commit intoIBM:mainfrom
Conversation
Contributor
Author
|
Suggested labels: |
8b4600c to
eb517a9
Compare
182b0a0 to
ddbd107
Compare
…esolution Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>
ddbd107 to
c2ca2e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐛 Bug-fix PR
🔗 Issue
Closes #4153
📌 Summary
The admin UI fails to load the Vite-bundled JavaScript because the
bundle_jstemplate variable is missing from the template context inadmin_ui(). This causes a blank admin page or JavaScript errors.🔁 Reproduction Steps
🐞 Root Cause
The
admin_ui()handler inadmin.pypasses a template context dict to the Jinja2 template, butbundle_js(fromget_bundle_js_filename()) was missing. The template references{{ bundle_js }}to load the correct hashed JS bundle filename, but it resolved to empty/undefined.💡 Fix Description
Add
"bundle_js": get_bundle_js_filename()to the template context dictionary in theadmin_ui()handler. Theget_bundle_js_filename()function already exists and resolves the Vite manifest to find the correct hashed bundle filename.🧪 Verification
make lintmake testmake coverage📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)