Missing static asset + wrong path: /hero-bootstrap-bridge.css 404 on every page load #25

Open
opened 2026-04-30 06:34:57 +00:00 by sameh-farouk · 0 comments
Member

Symptom

Browser console on every hero_db UI page:

GET http://[host]:9988/hero-bootstrap-bridge.css net::ERR_ABORTED 404 (Not Found)

Note the URL: it's at the router root, not under /hero_db/ui/.... That's diagnostic on its own.

Causes (two compound bugs)

crates/hero_db_ui/templates/base.html:13 and templates/login.html:13:

<link href="/hero-bootstrap-bridge.css" rel="stylesheet">

The leading / makes the browser ignore the page's <base href="/hero_db/ui/"> and resolve to the router root http://[host]:9988/hero-bootstrap-bridge.css. hero_router doesn't host that path, so 404.

Fix: drop the leading slash so the link respects <base>:

<link href="hero-bootstrap-bridge.css" rel="stylesheet">

This would resolve to /hero_db/ui/hero-bootstrap-bridge.css, served by hero_db_ui from its embedded static dir.

2. The file isn't in the static dir

Even after fixing the path, the file is missing from crates/hero_db_ui/static/. hero_db_ui ships only static/js/connection-status.js and template-derived assets — no CSS bridge file.

Fix: copy hero-bootstrap-bridge.css into crates/hero_db_ui/static/. Known-good source is hero_proxy/crates/hero_proxy_ui/static/hero-bootstrap-bridge.css (the same shared bridge other hero_* UIs reference).

Both fixes needed together

Fixing only (1) just turns a root-404 into a per-app-404. Fixing only (2) doesn't help because the link's leading / still bypasses the embedded location. Single PR with both edits.

Family

Same asset-gap pattern just filed against hero_browser (their issue: PR #69 had the same missing file). Worth tracking together if these UIs are meant to share a common bridge stylesheet.

## Symptom Browser console on every hero_db UI page: ``` GET http://[host]:9988/hero-bootstrap-bridge.css net::ERR_ABORTED 404 (Not Found) ``` Note the URL: it's at the **router root**, not under `/hero_db/ui/...`. That's diagnostic on its own. ## Causes (two compound bugs) ### 1. Wrong link path (absolute root, not relative) `crates/hero_db_ui/templates/base.html:13` and `templates/login.html:13`: ```html <link href="/hero-bootstrap-bridge.css" rel="stylesheet"> ``` The leading `/` makes the browser ignore the page's `<base href="/hero_db/ui/">` and resolve to the **router root** `http://[host]:9988/hero-bootstrap-bridge.css`. `hero_router` doesn't host that path, so 404. Fix: drop the leading slash so the link respects `<base>`: ```html <link href="hero-bootstrap-bridge.css" rel="stylesheet"> ``` This would resolve to `/hero_db/ui/hero-bootstrap-bridge.css`, served by `hero_db_ui` from its embedded static dir. ### 2. The file isn't in the static dir Even after fixing the path, the file is missing from `crates/hero_db_ui/static/`. `hero_db_ui` ships only `static/js/connection-status.js` and template-derived assets — no CSS bridge file. Fix: copy `hero-bootstrap-bridge.css` into `crates/hero_db_ui/static/`. Known-good source is `hero_proxy/crates/hero_proxy_ui/static/hero-bootstrap-bridge.css` (the same shared bridge other hero_* UIs reference). ## Both fixes needed together Fixing only (1) just turns a root-404 into a per-app-404. Fixing only (2) doesn't help because the link's leading `/` still bypasses the embedded location. Single PR with both edits. ## Family Same asset-gap pattern just filed against `hero_browser` (their issue: PR #69 had the same missing file). Worth tracking together if these UIs are meant to share a common bridge stylesheet.
Sign in to join this conversation.
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_db#25
No description provided.