fix(embed): use hero_router URL pattern for iframe islands #67

Merged
mahmoud merged 3 commits from development_fix_island_router_urls into development 2026-04-21 07:40:24 +00:00
Member

Summary

Fixes the iframe src URL in 10 embed islands to use the hero_router convention /<service>/ui/ (with trailing slash) instead of the legacy /<service>_ui / /<service> patterns that did not map to any hero_router route (returned 404).

Also includes workspace-wide cargo fmt and cargo clippy clean-up so future contributors start from a lint-clean baseline.

Closes #43

Changes

URL pattern fix (commit 5dcda95)

Replaced the format! string that builds the iframe URL in each of the following island components:

  • archipelagos/embed/proc/src/island.rs/hero_proc_ui -> /hero_proc/ui/
  • archipelagos/embed/compute/src/island.rs/hero_compute_ui -> /hero_compute/ui/
  • archipelagos/embed/embedder/src/island.rs/hero_embedder_ui -> /hero_embedder/ui/
  • archipelagos/embed/books/src/island.rs/hero_books_ui -> /hero_books/ui/
  • archipelagos/embed/indexer/src/island.rs/hero_indexer_ui -> /hero_indexer/ui/
  • archipelagos/embed/redis/src/island.rs/hero_db_ui -> /hero_db/ui/
  • archipelagos/embed/auth/src/island.rs/hero_auth_ui -> /hero_auth/ui/
  • archipelagos/embed/office/src/island.rs/hero_office -> /hero_office/ui/
  • archipelagos/embed/aibroker/src/island.rs/hero_aibroker -> /hero_aibroker/ui/
  • archipelagos/embed/inspector/src/island.rs/hero_router -> /hero_router/ui/

All replacement URLs include a trailing slash to avoid 308 redirects from hero_router.

fmt + clippy cleanup (commits 76ab501, 2aaa540)

Applied cargo fmt --all and resolved the -D warnings clippy errors across the workspace:

  • Collapsed nested if/if let blocks into && let chains (enabled by edition 2024).
  • Removed unnecessary .clone() calls on Copy types (Signal, Callback, Option<Callback>).
  • Dropped unreachable _ arms on exhaustive ActionType matches in rhai_codegen and workflow_editor.
  • Removed a redundant use tracing; import in the inspector island.
  • Factored a 5-tuple EventHandler parameter into a CreateContextPayload type alias.
  • Silenced the unused props warning on ArchipelagosIslandApp (the macro requires the binding).

Status

Out of scope for this PR

Two related issues were surfaced while working on #43; both already fail on development and are tracked separately:

  1. Linkage gap for embed islands. Nine of the ten islands touched here (all except books) are workspace members but are not linked into the showcase server: their Cargo.toml lacks [package.metadata.island], and they are not listed as deps in server/Cargo.toml. The URL fix is still correct, but is only exercised at runtime for books until the linkage follow-up lands. archipelagos/embed/office/ has no Cargo.toml at all and is not a workspace member — it's an orphan source file.

  2. SDK method mismatches in hero_archipelagos_messaging and hero_archipelagos_knowledge. Both crates call methods that no longer exist in the current hero_osis_sdk (e.g. conversationservice_list_messages, knowledgeservice_bucket_sync, knowledgeservice_bucket_search, and an EmbedderClient constructor). These are pre-existing cargo check errors that reproduce on development. Fixing them requires coordinating with the SDK refactor and is out of scope for a URL/lint cleanup PR.

CI also currently fails for both development and this branch due to a stale cross-repo dep in .forgejo/deps.txt (it references herofossil_webdav_client from hero_fossil.git, while the workspace dep is now hero_foundry_webdav_client from hero_foundry.git). That is also being tracked separately.

Test Plan

  • cargo fmt --all -- --check succeeds.
  • cargo clippy --workspace --exclude livekit_bridge --exclude hero_archipelagos_messaging --exclude hero_archipelagos_knowledge --all-targets -- -D warnings succeeds. (The two excluded crates fail due to the pre-existing SDK mismatch described above; they fail on development as well.)
  • With hero_router running, curl -sL http://127.0.0.1:9988/<service>/ui/ -o /dev/null -w "%{http_code}\n" returns 200 for each of the 10 services.
  • Each embed island renders its iframe content from the showcase server (requires linkage follow-up).
## Summary Fixes the iframe `src` URL in 10 embed islands to use the hero_router convention `/<service>/ui/` (with trailing slash) instead of the legacy `/<service>_ui` / `/<service>` patterns that did not map to any hero_router route (returned 404). Also includes workspace-wide `cargo fmt` and `cargo clippy` clean-up so future contributors start from a lint-clean baseline. ## Related Issue Closes https://forge.ourworld.tf/lhumina_code/hero_archipelagos/issues/43 ## Changes ### URL pattern fix (commit 5dcda95) Replaced the `format!` string that builds the iframe URL in each of the following island components: - `archipelagos/embed/proc/src/island.rs` — `/hero_proc_ui` -> `/hero_proc/ui/` - `archipelagos/embed/compute/src/island.rs` — `/hero_compute_ui` -> `/hero_compute/ui/` - `archipelagos/embed/embedder/src/island.rs` — `/hero_embedder_ui` -> `/hero_embedder/ui/` - `archipelagos/embed/books/src/island.rs` — `/hero_books_ui` -> `/hero_books/ui/` - `archipelagos/embed/indexer/src/island.rs` — `/hero_indexer_ui` -> `/hero_indexer/ui/` - `archipelagos/embed/redis/src/island.rs` — `/hero_db_ui` -> `/hero_db/ui/` - `archipelagos/embed/auth/src/island.rs` — `/hero_auth_ui` -> `/hero_auth/ui/` - `archipelagos/embed/office/src/island.rs` — `/hero_office` -> `/hero_office/ui/` - `archipelagos/embed/aibroker/src/island.rs` — `/hero_aibroker` -> `/hero_aibroker/ui/` - `archipelagos/embed/inspector/src/island.rs` — `/hero_router` -> `/hero_router/ui/` All replacement URLs include a trailing slash to avoid 308 redirects from hero_router. ### fmt + clippy cleanup (commits 76ab501, 2aaa540) Applied `cargo fmt --all` and resolved the `-D warnings` clippy errors across the workspace: - Collapsed nested `if`/`if let` blocks into `&& let` chains (enabled by edition 2024). - Removed unnecessary `.clone()` calls on `Copy` types (`Signal`, `Callback`, `Option<Callback>`). - Dropped unreachable `_` arms on exhaustive `ActionType` matches in `rhai_codegen` and `workflow_editor`. - Removed a redundant `use tracing;` import in the inspector island. - Factored a 5-tuple `EventHandler` parameter into a `CreateContextPayload` type alias. - Silenced the unused `props` warning on `ArchipelagosIslandApp` (the macro requires the binding). ## Status ### Out of scope for this PR Two related issues were surfaced while working on #43; both already fail on `development` and are tracked separately: 1. **Linkage gap for embed islands.** Nine of the ten islands touched here (all except `books`) are workspace members but are not linked into the showcase server: their `Cargo.toml` lacks `[package.metadata.island]`, and they are not listed as deps in `server/Cargo.toml`. The URL fix is still correct, but is only exercised at runtime for `books` until the linkage follow-up lands. `archipelagos/embed/office/` has no `Cargo.toml` at all and is not a workspace member — it's an orphan source file. 2. **SDK method mismatches in `hero_archipelagos_messaging` and `hero_archipelagos_knowledge`.** Both crates call methods that no longer exist in the current `hero_osis_sdk` (e.g. `conversationservice_list_messages`, `knowledgeservice_bucket_sync`, `knowledgeservice_bucket_search`, and an `EmbedderClient` constructor). These are pre-existing `cargo check` errors that reproduce on `development`. Fixing them requires coordinating with the SDK refactor and is out of scope for a URL/lint cleanup PR. CI also currently fails for both `development` and this branch due to a stale cross-repo dep in `.forgejo/deps.txt` (it references `herofossil_webdav_client` from `hero_fossil.git`, while the workspace dep is now `hero_foundry_webdav_client` from `hero_foundry.git`). That is also being tracked separately. ## Test Plan - [x] `cargo fmt --all -- --check` succeeds. - [x] `cargo clippy --workspace --exclude livekit_bridge --exclude hero_archipelagos_messaging --exclude hero_archipelagos_knowledge --all-targets -- -D warnings` succeeds. (The two excluded crates fail due to the pre-existing SDK mismatch described above; they fail on `development` as well.) - [ ] With hero_router running, `curl -sL http://127.0.0.1:9988/<service>/ui/ -o /dev/null -w "%{http_code}\n"` returns 200 for each of the 10 services. - [ ] Each embed island renders its iframe content from the showcase server (requires linkage follow-up).
fix(embed): use hero_router URL pattern for iframe islands
Some checks failed
Build and Test / build (pull_request) Failing after 8s
5dcda95c49
#43
fix: apply lint and fmt
Some checks failed
Build and Test / build (pull_request) Failing after 7s
564512caf4
salmaelsoly force-pushed development_fix_island_router_urls from 564512caf4
Some checks failed
Build and Test / build (pull_request) Failing after 7s
to 76ab5014ab
Some checks failed
Build and Test / build (pull_request) Failing after 8s
2026-04-19 11:52:23 +00:00
Compare
fix: resolve remaining clippy errors across workspace
Some checks failed
Build and Test / build (pull_request) Failing after 11s
2aaa540672
- archipelagos: silence unused props warning on ArchipelagosIslandApp
- inspector: remove redundant `use tracing` import
- intelligence: drop unreachable `_` arms in rhai_codegen and workflow_editor
- contexts: factor EventHandler tuple into `CreateContextPayload` type alias
Author
Member

Follow-up issue opened for the out-of-scope items referenced in this PR body: #69 — SDK method mismatches in messaging/knowledge and the stale .forgejo/deps.txt entry.

Follow-up issue opened for the out-of-scope items referenced in this PR body: https://forge.ourworld.tf/lhumina_code/hero_archipelagos/issues/69 — SDK method mismatches in messaging/knowledge and the stale .forgejo/deps.txt entry.
salmaelsoly changed title from WIP: fix(embed): use hero_router URL pattern for iframe islands to fix(embed): use hero_router URL pattern for iframe islands 2026-04-20 09:53:19 +00:00
fix: correct URL format for hero_voice UI in VoiceAppProps
Some checks failed
Build and Test / build (pull_request) Failing after 12s
d5b91b9d9a
salmaelsoly force-pushed development_fix_island_router_urls from d5b91b9d9a
Some checks failed
Build and Test / build (pull_request) Failing after 12s
to 16a6b79b3f
Some checks failed
Build and Test / build (pull_request) Failing after 8s
2026-04-20 10:41:23 +00:00
Compare
salmaelsoly force-pushed development_fix_island_router_urls from 16a6b79b3f
Some checks failed
Build and Test / build (pull_request) Failing after 8s
to 840a922ceb
Some checks failed
Build and Test / build (pull_request) Failing after 7s
2026-04-20 10:41:34 +00:00
Compare
salmaelsoly force-pushed development_fix_island_router_urls from 840a922ceb
Some checks failed
Build and Test / build (pull_request) Failing after 7s
to 5d8881325e
Some checks failed
Build and Test / build (pull_request) Failing after 13s
2026-04-21 07:04:40 +00:00
Compare
salmaelsoly force-pushed development_fix_island_router_urls from 5d8881325e
Some checks failed
Build and Test / build (pull_request) Failing after 13s
to b59cd97b44
All checks were successful
Build and Test / build (pull_request) Successful in 7m7s
2026-04-21 07:30:05 +00:00
Compare
mahmoud merged commit b7202b7287 into development 2026-04-21 07:40:24 +00:00
mahmoud deleted branch development_fix_island_router_urls 2026-04-21 07:40:31 +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_archipelagos!67
No description provided.