Repository navigation
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
nicoburns
force-pushed
the
devin/1792783661-clear-dropped-mappings
branch
from
October 23, 2026 19:33
91a20f0 to
46826de
Compare
Dropping a subtree now clears the ElementId -> NodeId mapping of every node in it, so the mappings only ever point at live nodes. Restores the stale-mapping invariant tests.
nicoburns
force-pushed
the
devin/1792783661-clear-dropped-mappings
branch
from
October 23, 2026 19:37
46826de to
a475677
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1260 (stacked on it). The Dioxus 0.8 writer that PR ports clears only the removed stack entry's
ElementId -> NodeIdmapping (StackState::clear_mapping), while Blitz drops the whole subtree, so descendants with their ownElementIdstay mapped to dropped ids until dioxus-core happens to reuse theElementId. Harmless only because node ids are generational and core alwaysset_ids beforepush_id; the mapping should never point at a dead node, which is the invariant Blitz's pre-sync writer kept.StackStateregains the reverse mapnode_to_element: FxHashMap<N, ElementId>next toelement_to_node, andRealDom::remove/replacetake anon_drop: impl FnMut(Self::NodeId)callback thatBlitzBackendforwards toDocumentMutator::remove_and_drop_node_with, so every dropped node clears its mapping:Cost: one
FxHashMapinsert perset_idand one remove per dropped node, same as the writer onmainbefore #1260.rustc-hashcomes back as a dependency.Tests: the
stale_node_mappinginvariant tests are restored as onmain(onlyElementId(raw)→ElementId::from_raw(raw)), plus unit testdropped_nodes_are_unmapped, which fails on #1260 withElementId(9) maps to dropped node NodeId(20v1) after step 2. Same change for the Dioxus copy: DioxusLabs/dioxus#5996.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/8451be47ca9a4d89ac073c7243d2a30e
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/8451be47ca9a4d89ac073c7243d2a30e?variant=devin-insiders
Requested by: @nicoburns
WPT results
No changes in test results compared to
main.Generated by the WPT workflow.