fix(ui): serve hero-bootstrap-bridge.css and fix static asset paths #11

Merged
zaelgohary merged 1 commit from development_fix_ui_static_assets_404 into development 2026-05-03 18:43:09 +00:00
Member

Summary

Three template references (admin.html, base.html, dashboard.html) link {{ base_path }}/hero-bootstrap-bridge.css and /hero_foundry_admin/static/js/connection-status.js — both 404 on the deployed binary because (a) no route serves the bridge stylesheet and (b) the connection-status path has a stale /hero_foundry_admin/... prefix that doesn't exist anywhere in the routing. The static-files mount also pointed at a non-existent src/static dir.

Changes

  • added a /hero-bootstrap-bridge.css route that serves the embedded stylesheet via include_str!
  • shipped the stylesheet itself under crates/hero_foundry_ui/static/
  • fixed the fs::Files::new("/static", "src/static") mount to point at the real static/ dir
  • updated 3 templates to link {{ base_path }}/static/js/connection-status.js

Test Results

playwright: bridge.css → 200 with text/css (6339 bytes), connection-status.js → 200, full /hero_foundry/ui/ load reports 0 hero_foundry 404s.

## Summary Three template references (`admin.html`, `base.html`, `dashboard.html`) link `{{ base_path }}/hero-bootstrap-bridge.css` and `/hero_foundry_admin/static/js/connection-status.js` — both 404 on the deployed binary because (a) no route serves the bridge stylesheet and (b) the connection-status path has a stale `/hero_foundry_admin/...` prefix that doesn't exist anywhere in the routing. The static-files mount also pointed at a non-existent `src/static` dir. ## Changes - added a `/hero-bootstrap-bridge.css` route that serves the embedded stylesheet via `include_str!` - shipped the stylesheet itself under `crates/hero_foundry_ui/static/` - fixed the `fs::Files::new("/static", "src/static")` mount to point at the real `static/` dir - updated 3 templates to link `{{ base_path }}/static/js/connection-status.js` ## Test Results playwright: bridge.css → 200 with text/css (6339 bytes), connection-status.js → 200, full `/hero_foundry/ui/` load reports 0 hero_foundry 404s.
fix(ui): serve hero-bootstrap-bridge.css and fix static asset paths
Some checks failed
Build and Test / build-and-test (pull_request) Failing after 25s
376ff010f2
zaelgohary force-pushed development_fix_ui_static_assets_404 from 376ff010f2
Some checks failed
Build and Test / build-and-test (pull_request) Failing after 25s
to 7edc03c423
Some checks failed
Build and Test / build-and-test (pull_request) Failing after 28s
2026-05-03 18:38:52 +00:00
Compare
zaelgohary merged commit dd6a745873 into development 2026-05-03 18:43:09 +00:00
zaelgohary deleted branch development_fix_ui_static_assets_404 2026-05-03 18:43:09 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_foundry_ui!11
No description provided.