The previous fix tried to defer page-side RevealNode to the second render so TreeView's async sessionStorage load could finish first. In practice Blazor Server didn't always fire a second OnAfterRenderAsync on the page after the deep-link load, so the reveal never ran. Real fix: change TreeView's storage-load to UNION the restored keys with whatever's already in _expandedKeys, instead of REPLACING. That way the page can call RevealNode whenever it wants and the storage restore can't clobber the reveal regardless of completion order. The page-side guard simplifies back to a one-shot reveal on first render. Semantic note: if a deep-link reveal expands an ancestor that the user had previously collapsed, the deep link wins. Intentional — the URL expresses the navigation intent.
56 KiB
56 KiB