[nu-demo] Dock islands broken on web feature build — OSIS/Services have only native variants, Services is dead wood, Videos missing, Books needs iframe default #34

Open
opened 2026-04-28 12:21:21 +00:00 by mik-tf · 0 comments
Owner

Symptom

On a fresh herodemo deployed with default WASM_FEATURES=web (not web-native), clicking various dock icons produces:

Dock icon Symptom
Services Failed to load island WASM 'services': Island not found: services (HTTP 404)
OSIS Failed to load island WASM 'osis': Island not found: osis (HTTP 404)
Books → All Books tab Error: JSON parse error: EOF while parsing (double-slash URL bug, sibling #157)
Collab Blank (iframe fallback dispatches, but the dark theme + deep redirect chain makes the iframe render empty)
Videos in Media archipelago Missing — no dock entry
Whiteboard Renders the iframe but same dark-theme issue as Collab

Root cause

hero_os_app/Cargo.toml has two mutually-partial feature tiers:

  • web (default) — expects every island to have an iframe fallback OR a non--native Dioxus native variant.
  • web-native — pulls in the new _app crates that use dioxus-bootstrap-css.

The following islands have ONLY the -native variant, so on the web build there's no code path to render them → 404:

  • osis → dispatcher references hero_osis_app::HeroOsisApp guarded by #[cfg(feature = "island-osis-native")]
  • serviceshero_zero_app::HeroZeroApp guarded by -native
  • whiteboard → has iframe fallback but iframe content is dark (cosmetic)
  • collab → has iframe fallback + native; iframe renders but dark theme makes it look broken

Additionally:

  • Videos was missing from the web feature's island list despite island-videos being defined.
  • Books defaulted to the Dioxus native island (BooksApp) which has a trailing-slash base_url bug (#157), AND the iframe version (served by hero_books_ui as HTML) is objectively nicer (matches the hero.gent04.grid.tf demo's 'Knowledge World' page).
  • Services as an island concept is architectural dead wood — in the nu-shell / hero_router era, hero_router's admin UI (hero_router/CLAUDE.md) provides service discovery natively. The dock entry should not exist.

Demo workaround applied (on herodemo 2026-04-24)

All changes made on-VM in hero_os_app/{Cargo.toml, src/registry.rs, src/island_content.rs} (committed locally to development_mik_nu_demo, will push after WASM rebuild validates):

  1. Added iframe fallback for OSIS in island_content.rs:

    #[cfg(feature = "island-osis-native")]
    "osis" => rsx! { hero_osis_app::HeroOsisApp { context: context } },
    #[cfg(not(feature = "island-osis-native"))]
    "osis" => rsx! { ExternalServiceIframe { src: "/hero_osis/ui/", id: "osis-iframe" } },
    
  2. Removed Services island entirely from registry.rs (builder block) and island_content.rs (dispatch arm). The dock no longer shows it; clicking the (now non-existent) icon just isn't possible.

  3. Swapped Books default to iframe by renaming the feature island-booksisland-books-embed (keeping the Dioxus native crate available under a new name for anyone who wants it) and adding a third island_content.rs arm that falls through to ExternalServiceIframe { src: "/hero_books/ui/" } when neither island-books-embed nor island-books-native is enabled. Removed island-books from the web feature list. Result: on web, Books is the beautiful 'Knowledge World' server-rendered HTML.

  4. Added island-videos to the web feature list so Videos shows in the Media archipelago dock.

Proper fix (upstream)

Two parallel tracks:

Track A — complete the iframe fallback matrix

For every dock island, ensure island_content.rs has at least three dispatch arms:

#[cfg(feature = "island-X-native")]         new native build
#[cfg(feature = "island-X-embed")]          old Dioxus embed
#[cfg(not(any(feature = "island-X-native", feature = "island-X-embed")))]
                                             iframe fallback to /hero_X/ui/

The web feature tier should produce a working dock for every island ID in the registry, via iframe when no Dioxus crate is available. CI should assert this: strings target/release/hero_os_app.wasm | grep island-not-found-404 should return 0 references, and every registered island should have at least one matching cfg arm.

Track B — remove architectural dead wood

Any dock island whose functionality is now owned by hero_router / hero_proc / another service should be removed from registry.rs and its feature flag deleted. Candidates:

  • services — owned by hero_router admin UI (this issue)
  • possibly proc — owned by hero_router admin UI
  • possibly inspector — same

Consolidate the "admin" dock entries into one that links to hero_router's / (the admin dashboard at ui.sock).

Verification (after herodemo WASM6 finishes)

  • Gateway URL click Books → renders 'Knowledge World' HTML with library cards ✓
  • Click OSIS → renders hero_osis_ui iframe with context selector + domain tabs ✓
  • Services icon → not in dock anymore ✓
  • Media → Videos → renders video listing from webdav ✓
  • home#123 — island-room + others missing from web feature (sibling — same class of gap)
  • home#147 — hero_collab iframe dark theme (cosmetic, blocks this from closing if iframe-fallback is the plan)
  • home#157 — Books island trailing-slash URL bug
  • home#160 — consolidated demo state

Signed-off-by: mik-tf


Originally filed as home#171 on 2026-04-24 by mik-tf — moved to hero_demo as part of consolidating issue tracking.

## Symptom On a fresh herodemo deployed with default `WASM_FEATURES=web` (not `web-native`), clicking various dock icons produces: | Dock icon | Symptom | |---|---| | **Services** | `Failed to load island WASM 'services': Island not found: services (HTTP 404)` | | **OSIS** | `Failed to load island WASM 'osis': Island not found: osis (HTTP 404)` | | **Books → All Books tab** | `Error: JSON parse error: EOF while parsing` (double-slash URL bug, sibling [#157](https://forge.ourworld.tf/lhumina_code/home/issues/157)) | | **Collab** | Blank (iframe fallback dispatches, but the dark theme + deep redirect chain makes the iframe render empty) | | **Videos** in Media archipelago | Missing — no dock entry | | **Whiteboard** | Renders the iframe but same dark-theme issue as Collab | ## Root cause `hero_os_app/Cargo.toml` has two mutually-partial feature tiers: - `web` (default) — expects every island to have an iframe fallback OR a non-`-native` Dioxus native variant. - `web-native` — pulls in the new `_app` crates that use `dioxus-bootstrap-css`. The following islands have ONLY the `-native` variant, so on the `web` build there's no code path to render them → 404: - `osis` → dispatcher references `hero_osis_app::HeroOsisApp` guarded by `#[cfg(feature = "island-osis-native")]` - `services` → `hero_zero_app::HeroZeroApp` guarded by `-native` - `whiteboard` → has iframe fallback but iframe content is dark (cosmetic) - `collab` → has iframe fallback + native; iframe renders but dark theme makes it look broken Additionally: - `Videos` was missing from the `web` feature's island list despite `island-videos` being defined. - `Books` defaulted to the Dioxus native island (`BooksApp`) which has a trailing-slash base_url bug ([#157](https://forge.ourworld.tf/lhumina_code/home/issues/157)), AND the iframe version (served by `hero_books_ui` as HTML) is objectively nicer (matches the hero.gent04.grid.tf demo's 'Knowledge World' page). - `Services` as an island concept is **architectural dead wood** — in the nu-shell / hero_router era, hero_router's admin UI ([`hero_router/CLAUDE.md`](https://forge.ourworld.tf/lhumina_code/hero_router/src/branch/development/CLAUDE.md)) provides service discovery natively. The dock entry should not exist. ## Demo workaround applied (on herodemo 2026-04-24) All changes made on-VM in `hero_os_app/{Cargo.toml, src/registry.rs, src/island_content.rs}` (committed locally to `development_mik_nu_demo`, will push after WASM rebuild validates): 1. **Added iframe fallback for OSIS** in `island_content.rs`: ```rust #[cfg(feature = "island-osis-native")] "osis" => rsx! { hero_osis_app::HeroOsisApp { context: context } }, #[cfg(not(feature = "island-osis-native"))] "osis" => rsx! { ExternalServiceIframe { src: "/hero_osis/ui/", id: "osis-iframe" } }, ``` 2. **Removed Services island entirely** from `registry.rs` (builder block) and `island_content.rs` (dispatch arm). The dock no longer shows it; clicking the (now non-existent) icon just isn't possible. 3. **Swapped Books default to iframe** by renaming the feature `island-books` → `island-books-embed` (keeping the Dioxus native crate available under a new name for anyone who wants it) and adding a third `island_content.rs` arm that falls through to `ExternalServiceIframe { src: "/hero_books/ui/" }` when neither `island-books-embed` nor `island-books-native` is enabled. Removed `island-books` from the `web` feature list. Result: on `web`, Books is the beautiful 'Knowledge World' server-rendered HTML. 4. **Added `island-videos` to the `web` feature list** so Videos shows in the Media archipelago dock. ## Proper fix (upstream) Two parallel tracks: ### Track A — complete the iframe fallback matrix For every dock island, ensure `island_content.rs` has at least three dispatch arms: ```rust #[cfg(feature = "island-X-native")] — new native build #[cfg(feature = "island-X-embed")] — old Dioxus embed #[cfg(not(any(feature = "island-X-native", feature = "island-X-embed")))] — iframe fallback to /hero_X/ui/ ``` The `web` feature tier should produce a working dock for every island ID in the registry, via iframe when no Dioxus crate is available. CI should assert this: `strings target/release/hero_os_app.wasm | grep island-not-found-404` should return 0 references, and every registered island should have at least one matching cfg arm. ### Track B — remove architectural dead wood Any dock island whose functionality is now owned by hero_router / hero_proc / another service should be removed from `registry.rs` and its feature flag deleted. Candidates: - `services` — owned by hero_router admin UI (this issue) - possibly `proc` — owned by hero_router admin UI - possibly `inspector` — same Consolidate the "admin" dock entries into one that links to hero_router's `/` (the admin dashboard at `ui.sock`). ## Verification (after herodemo WASM6 finishes) - Gateway URL click Books → renders 'Knowledge World' HTML with library cards ✓ - Click OSIS → renders hero_osis_ui iframe with context selector + domain tabs ✓ - Services icon → not in dock anymore ✓ - Media → Videos → renders video listing from webdav ✓ ## Related - [home#123](https://forge.ourworld.tf/lhumina_code/home/issues/123) — island-room + others missing from `web` feature (sibling — same class of gap) - [home#147](https://forge.ourworld.tf/lhumina_code/home/issues/147) — hero_collab iframe dark theme (cosmetic, blocks this from closing if iframe-fallback is the plan) - [home#157](https://forge.ourworld.tf/lhumina_code/home/issues/157) — Books island trailing-slash URL bug - [home#160](https://forge.ourworld.tf/lhumina_code/home/issues/160) — consolidated demo state Signed-off-by: mik-tf --- *Originally filed as [home#171](https://forge.ourworld.tf/lhumina_code/home/issues/171) on 2026-04-24 by mik-tf — moved to hero_demo as part of consolidating issue tracking.*
Sign in to join this conversation.
No labels
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_demo#34
No description provided.