Skip to content

fix(ui): serve the UI build's whole media directory - #1318

Merged
rsdmike merged 1 commit into
mainfrom
fix/serve-ui-media
Oct 13, 2026
Merged

rsdmike merged 1 commit into
mainfrom
fix/serve-ui-media

Conversation

@rsdmike

@rsdmike rsdmike commented Oct 13, 2026

Copy link
Copy Markdown
Member

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 whole media/ directory and returns 404 for missing media files.

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.
@rsdmike
rsdmike requested a review from a team as a code owner October 13, 2026 20:12
Copilot AI balanced review requested due to automatic review settings October 13, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 /media subtree.
  • 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

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.16%. Comparing base (01a9be5) to head (ee15960).

Files with missing lines Patch % Lines
internal/controller/httpapi/ui.go 63.63% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rsdmike
rsdmike merged commit 46b1d54 into main Oct 13, 2026
23 checks passed
@rsdmike
rsdmike deleted the fix/serve-ui-media branch October 13, 2026 20:29
@RosieAMT

Copy link
Copy Markdown

🎉 This PR is included in version 1.45.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants