[nu-demo] Switching contexts doesn't work. #44
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?
Only the default "Geomind" context works. Trying to switch to another makes this error:
Originally filed as home#151 on 2026-04-24 by scott — moved to hero_demo as part of consolidating issue tracking.
Update — diagnosed and partially fixed (2026-04-30)
After investigation, "contexts don't work, only Geomind works" turns out to be two distinct problems on top of each other, not a single context-routing bug.
Problem 1 — per-context X-Hero-Context routing (NOT broken, verified)
End-to-end probing on herodemo against the per-domain hero_osis_business socket:
Each context returns a distinct dataset. X-Hero-Context routing through hero_proxy → hero_router → per-domain hero_osis socket is healthy. Per-context data isolation works. The bug is not routing.
Problem 2 — dock islands fail to render in non-default contexts (the actual user-visible bug)
What Sameh hit when switching to Incubaid: clicking certain dock items produced
Failed to load island WASM 'room': JsValue(TypeError: Failed to fetch dynamically imported module: .../islands/room/hero_archipelagos_room.js).Root cause: same class as the OSIS dock 404 already documented in
hero_demo#34 — the island has neither a native dispatcher arm in
hero_os_app/src/island_content.rsnor an on-disk WASM bundle at/hero_os/ui/islands/<id>/. The dispatcher's dynamic-loader fallthrough triesimport("/hero_os/ui/islands/room/hero_archipelagos_room.js"), nginx serves the catch-all index.html withcontent-type: text/html, browser rejects the module load.The user perception "contexts don't work" is because:
webbuild.room, possibly more) whose feature flags aren't enabled in thewebfeature list and which lack iframe fallbacks → 404 on click.What landed for problem 2 this session
d70af39— iframe fallback forosis(closes hero_os#112).9303efe—island-videosadded toweb, Books defaults to iframe/hero_books/ui/(no more JSON-parse-error from the Dioxus version).70b9d04—fix(embed/books): strip trailing slash from base_url(closes home#157).8a99553— central/hero_osis/ui/renders a domain picker instead of hanging on "Loading service spec…" (closes hero_demo#35).Verified live on herodemo:
/hero_osis/ui/shows the domain picker; per-domain dashboards (/hero_osis_business/ui/etc.) all return 200;/hero_books/ui/serves the Knowledge World HTML; new WASM contains theosis-iframeandbooks-iframearms; AI Assistant/api/chatreturns a streaming response.What still needs doing for full closure
web's feature list and have no iframe fallback. Each such island needs either:hero_os_app/src/island_content.rsmirroring the OSIS / Books / Slides / Whiteboard / Collab pattern:#[cfg(not(feature = "island-X-native"))] "X" => rsx! { ExternalServiceIframe { src: "/hero_<X>/ui/", … } }, ORservicesin hero_demo#34).dynamic_loaderfallthrough at the bottom of thematchis currently the silent failure path — it tries to import/hero_os/ui/islands/<id>/…jswhich produces "Failed to fetch dynamically imported module" rather than a clear "this island isn't available in this build". Replacing the fallthrough with an explicit error component would surface gaps at click time instead of resembling a network error. Optional.IslandMetadata::builder("X", …)and<id>_metadata()push inregistry.rs, checkisland_content.rshas either an unconditional arm or an iframe-fallback arm. Items without one are the work list.Conclusion
The routing layer (X-Hero-Context → per-domain socket → context-scoped DB) is healthy. The user-visible "contexts don't work" symptom is the dock-island gap from
hero_demo#34, just spread across non-default contexts. Track A from this session (Books / Videos / OSIS iframe + central picker) closes the most-visible cases; the remaining work is enumeration + iframe-fallback arms for any island still hitting the dynamic-loader fallthrough.Suggest re-titling this issue to "Some islands fail to render in non-default contexts (dock-island gap, sibling of #34)" — the original title is misleading because context switching itself works.
Signed-off-by: mik-tf
Fixed