[nu-demo] hero_books_ui navbar disappears when clicking into a library — emits /hero_books_ui/library/X (underscore) instead of /hero_books/ui/library/X (slash) #176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Landing on
/hero_books/ui/(served via hero_router fromhero_books/ui.sock) shows the Knowledge World page with a top navbar:Hero Books | Libraries | Tools | Docs+ theme toggle. Clicking any library card takes you to a page withConnecting...status but no navbar — the whole header chrome is gone.Browser URL bar shows:
herodemo.gent01.grid.tf/hero_books_ui/library/hero(underscore between hero_books and ui).Root cause (hypothesis)
hero_books_ui's Askama templates or handler code emit absolute library URLs using the OLD hero_zero / hero_proxy URL shape (
/hero_books_ui/library/{name}— with underscore, single path segment) rather than the hero_router shape (/hero_books/ui/library/{name}— with slash between service-name and socket-kind).hero_router's path routing treats
/hero_books/ui/...as "route to hero_books service's ui.sock at path /...". The underscore form/hero_books_ui/...may end up routed to a fallback handler that serves the library page WITHOUT the parent layout/navbar, because the template inheritance / base_path was broken.Where to look
In
hero_books_ui/src/handlers.rsor the templates undercrates/hero_books_ui/templates/:handler_library/handler_library_redirect— anyformat!("/hero_books_ui/library/{}", ns)or similar hardcoded URL construction.handler_index— the Knowledge World page — may use one URL form; library pages may use a different one.base_pathmiddleware readsX-Forwarded-Prefix— is it being correctly read when the iframe is nested inside hero_os_app?Hypothesis: handler_index uses the correct
base_path(because it's the iframe's root) but handler_library falls through a default that emits the hero_proxy-style URL.Fix direction
format!("/hero_books...")in hero_books_ui — replace with{base_path}/...where base_path comes from the X-Forwarded-Prefix extension.<a href="library/hero">instead of<a href="/hero_books_ui/library/hero">) — browser resolves relative to the current iframe URL.library.htmlextendsbase.htmlor is standalone.Demo workaround
None applied — navbar still disappears on library-click. User can go back via browser back button. Demo still shows the beautiful Knowledge World landing page.
Related
Signed-off-by: mik-tf
Investigation note 2026-04-25
The deployed WASM on herodemo (hash
dxhebbe3c50ed1b24ea) was built with the iframe-based Books archipelago variant (hero_archipelagoscommit 723d463) — which rendershero_books_ui(Askama) inside an iframe. That variant is what exhibits the navbar-disappear-on-library-click symptom this issue describes.hero_archipelagos/archipelagos/embed/books/ondevelopmenthas been migrated to native Dioxus WASM (HomeView, LibraryView, etc. — no iframe). The WASM-native path renders the navbar (or whatever shell is shared) within Dioxus and doesn't have this bug class.Two paths to closing:
island-books-nativefeature in hero_os_app'swebfeature list. Native WASM books, no navbar issue, no iframe at all. Bigger lift but the proper devops vision.Recommending #1 since hero_archipelagos already did the work upstream. This would also fix home#184 (light-mode contrast) since the WASM-native cards inherit hero_os theme tokens directly.
Investigation done; no PR opened — the right fix is a build-config change (
island-books-nativefeature flag) plus WASM rebuild, not a code patch.Signed-off-by: mik-tf
Moved to hero_demo#2 — see lhumina_code/hero_demo#2