fix(embed): use hero_router URL pattern for iframe islands #67
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_archipelagos!67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_fix_island_router_urls"
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?
Summary
Fixes the iframe
srcURL 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 fmtandcargo clippyclean-up so future contributors start from a lint-clean baseline.Related Issue
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 --alland resolved the-D warningsclippy errors across the workspace:if/if letblocks into&& letchains (enabled by edition 2024)..clone()calls onCopytypes (Signal,Callback,Option<Callback>)._arms on exhaustiveActionTypematches inrhai_codegenandworkflow_editor.use tracing;import in the inspector island.EventHandlerparameter into aCreateContextPayloadtype alias.propswarning onArchipelagosIslandApp(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
developmentand are tracked separately: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: theirCargo.tomllacks[package.metadata.island], and they are not listed as deps inserver/Cargo.toml. The URL fix is still correct, but is only exercised at runtime forbooksuntil the linkage follow-up lands.archipelagos/embed/office/has noCargo.tomlat all and is not a workspace member — it's an orphan source file.SDK method mismatches in
hero_archipelagos_messagingandhero_archipelagos_knowledge. Both crates call methods that no longer exist in the currenthero_osis_sdk(e.g.conversationservice_list_messages,knowledgeservice_bucket_sync,knowledgeservice_bucket_search, and anEmbedderClientconstructor). These are pre-existingcargo checkerrors that reproduce ondevelopment. 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
developmentand this branch due to a stale cross-repo dep in.forgejo/deps.txt(it referencesherofossil_webdav_clientfromhero_fossil.git, while the workspace dep is nowhero_foundry_webdav_clientfromhero_foundry.git). That is also being tracked separately.Test Plan
cargo fmt --all -- --checksucceeds.cargo clippy --workspace --exclude livekit_bridge --exclude hero_archipelagos_messaging --exclude hero_archipelagos_knowledge --all-targets -- -D warningssucceeds. (The two excluded crates fail due to the pre-existing SDK mismatch described above; they fail ondevelopmentas well.)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.564512caf476ab5014abFollow-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.
WIP: fix(embed): use hero_router URL pattern for iframe islandsto fix(embed): use hero_router URL pattern for iframe islandsd5b91b9d9a16a6b79b3f16a6b79b3f840a922ceb840a922ceb5d8881325e5d8881325eb59cd97b44