WindowRoute signals created in Window scope, read from root — freezes UI #81
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#81
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?
WindowRouteContext::new()atcore/src/window_route.rs:88-92allocates fiveSignal::new(...)values inside whatever scope constructs it. The constructor is called from eachWindowcomponent, buthero_os_app/src/main.rs:929readsctx.routefrom the root scope's URL-syncuse_effect.Dioxus 0.7 owns signals by the scope they're created in. Ancestor-reading-descendant triggers the "Copy Value used in scope that is not a descendant of the owning scope" warning, which spams the console on every render cycle. With 6+ windows open (after a restored desktop state) the warning loop is severe enough to lock up the UI — clicking Calendar tips it over into a total freeze.
Repro
dioxus-signals warnings.rs:26warning per window, cycling through ScopeIds 14/7/31/22/37/42 indefinitely.Fix
Create the signals in a scope that outlives the Windows. Minimal: swap
Signal::new(...)forSignal::new_in_scope(..., ScopeId::ROOT)inWindowRouteContext::new(), or lift context construction up so root owns it and passes eachWindowRouteContextdown as a prop.Why now
Latent regression from #35 (Unify window chrome). Before that refactor there was no cross-scope signal read.