Skip to content

ui: serve static assets on Windows#8900

Open
aeron-gh wants to merge 2 commits into
thanos-io:mainfrom
aeron-gh:fix-ui-windows-static-assets
Open

ui: serve static assets on Windows#8900
aeron-gh wants to merge 2 commits into
thanos-io:mainfrom
aeron-gh:fix-ui-windows-static-assets

Conversation

@aeron-gh

@aeron-gh aeron-gh commented Jul 7, 2026

Copy link
Copy Markdown

On Windows the web UI fails to load — every /static/* request (the React JS/CSS bundles) returns 404, so you end up with a blank page.

The /static/*filepath handler builds the asset path with filepath.Join, which uses the OS separator (\ on Windows). The assets are served from an embed.FS, and io/fs paths are always forward-slash separated regardless of OS, so the lookup never matches and the asset 404s. path.Join keeps the path slash-separated on every platform.

Same filepath.Joinpath.Join class as #8361, just in a different spot (that one is about object-storage keys, this is the embedded UI).

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  • pkg/ui/ui.go: use path.Join instead of filepath.Join when resolving embedded static assets.

Verification

Added TestServeStaticAsset, which requests a real embedded asset through the /static/*filepath route and asserts it returns 200 with the file contents. It fails (404) with filepath.Join on Windows and passes with path.Join.

Signed-off-by: aeron-gh <agab0323@gmail.com>
Signed-off-by: aeron-gh <agab0323@gmail.com>
@aeron-gh

aeron-gh commented Jul 7, 2026

Copy link
Copy Markdown
Author

the failing Doc check is unrelated to this change. All the code checks pass; a re-run of that job should clear it

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.

1 participant