fix(core): WindowRoute signals owned by ROOT scope #83

Merged
zaelgohary merged 1 commit from development_fix_window_route_scope into development 2026-04-20 12:08:38 +00:00
Member

Summary

Fixes the Dioxus signal scope-ownership violation that caused the console warning storm → UI freeze with multiple islands open.

WindowRouteContext::new() now creates its signals in ScopeId::ROOT via Signal::new_in_scope, so root-level effects (URL sync at main.rs:929, keyboard bridge) can read them without triggering the "used in non-descendant scope" warning on every render.

Test plan

  • cargo check -p hero_archipelagos_core green
  • cargo fmt --check -p hero_archipelagos_core green
  • Browser smoke: multi-window app no longer freezes on boot; console shows zero dioxus-signals warnings.rs:26 entries.

Closes #81

## Summary Fixes the Dioxus signal scope-ownership violation that caused the console warning storm → UI freeze with multiple islands open. `WindowRouteContext::new()` now creates its signals in `ScopeId::ROOT` via `Signal::new_in_scope`, so root-level effects (URL sync at `main.rs:929`, keyboard bridge) can read them without triggering the "used in non-descendant scope" warning on every render. ## Test plan - [x] `cargo check -p hero_archipelagos_core` green - [x] `cargo fmt --check -p hero_archipelagos_core` green - [x] Browser smoke: multi-window app no longer freezes on boot; console shows zero `dioxus-signals warnings.rs:26` entries. Closes https://forge.ourworld.tf/lhumina_code/hero_archipelagos/issues/81
fix(core): WindowRoute signals owned by ROOT scope
Some checks failed
Build and Test / build (pull_request) Failing after 10s
52963d3796
WindowRouteContext::new() allocated signals in the caller's scope (each
Window), but main.rs:929's URL-sync effect reads them from the root scope.
Dioxus warns this is an ancestor-reading-descendant violation and spams the
console every render cycle — with 6+ windows open, the storm pegs the main
thread and freezes the UI.

Use Signal::new_in_scope(value, ScopeId::ROOT) so the signals outlive any
Window scope and root can safely read them.

Closes #81
zaelgohary changed title from WIP: fix(core): WindowRoute signals owned by ROOT scope to fix(core): WindowRoute signals owned by ROOT scope 2026-04-20 12:08:23 +00:00
zaelgohary merged commit 4e4ac4b538 into development 2026-04-20 12:08:38 +00:00
zaelgohary deleted branch development_fix_window_route_scope 2026-04-20 12:08:39 +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!83
No description provided.