Repository navigation
fix(ui): serve the UI build's whole media directory - #1318
Conversation
The UI build puts every stylesheet-referenced file in media/, but only one font had a route, so the navbar logo got the HTML shell. Missing media files now 404.
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation matches the described behavior and includes appropriate regression coverage.
0 open findings
What changed in this PR
Serves all embedded UI media files while preserving SPA routing and proper static-file 404 responses.
Changes:
- Mounts the complete
/mediasubtree. - Excludes missing media files from SPA fallback.
- Adds tests for media serving, SPA fallback, and missing files.
| File | Description |
|---|---|
internal/controller/httpapi/ui.go |
Adds media directory routing and refactors SPA fallback. |
internal/controller/httpapi/ui_test.go |
Tests media delivery and 404 behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1318 +/- ##
==========================================
+ Coverage 62.12% 62.16% +0.03%
==========================================
Files 159 159
Lines 13393 13401 +8
==========================================
+ Hits 8321 8331 +10
+ Misses 5072 5070 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎉 This PR is included in version 1.45.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
The UI build puts every stylesheet-referenced file in
media/, but Console only routed one hardcoded font, so the navbar logo was answered with the HTML shell. This serves the wholemedia/directory and returns 404 for missing media files.