You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blazor Activity links on global render vs per-page rendermode are totally different #64554
However, when an event handler is run, that is in circuit context, which has a DIFFERENT _componentsActivityLinkStore and thus the links it was supposed to add does not exist.
Expected Behavior
On <Routes @rendermode="InteractiveServer" />
and link to page activity in the event activity:
Steps To Reproduce
make new blank blazor with aspire and global rendermode.
Start project
Click Counter link
Click Increment a few times
Find trace in aspire -> CORRECT
convert app to per-page (or just create another with per-page rendermode)
a. remove global rendermode
b. add rendermode to home and counter page
The issue has been moved to .NET 12 Planning. This comment captures the investigation and prototype so the context is retained.
Verdict
The global/per-page difference is a bug, not an intentional telemetry-shape difference.
The documented intent is that Microsoft.AspNetCore.Components.HandleEvent links to the current Navigate activity, and to the circuit activity for Interactive Server. Global interactivity already produces that shape. Per-page interactivity loses the route link because SSR routing and interactive event dispatch use different renderers and renderer-local link stores.
Root cause
Global interactivity:Router, Navigate, and HandleEvent run on the same interactive renderer. They share one ComponentsActivityLinkStore.
Per-page interactivity: static SSR runs Router/Navigate on EndpointHtmlRenderer. The interactive component later runs on RemoteRenderer or WebAssemblyRenderer, each with a different link store.
The SSR route ActivityContext isn't transferred to the interactive renderer.
Enhanced navigation repeats the same problem when an existing interactive root receives updated SSR state.
An interactive subtree may contain no interactive Router, so the interactive runtime can't reconstruct the current route independently.
Desired normalized telemetry
For both global and per-page interactivity:
SSR or interactive routing emits Microsoft.AspNetCore.Components.Navigate.
Microsoft.AspNetCore.Components.HandleEvent contains the current aspnetcore.components.route tag.
HandleEvent links to the current Navigate activity.
Interactive Server additionally links to Microsoft.AspNetCore.Components.Server.Circuits.StartCircuit and carries the matching circuit ID.
Interactive WebAssembly has the same route/event shape without a circuit activity.
Prototype architecture
The draft PR contains a prototype based on a framework-owned persistent service:
A renderer-associated activity-state owner captures/applies the current route context.
Separate persistent wrapper services target native Server and WebAssembly render modes and delegate to that owner.
AllowUpdates = true handles enhanced-navigation state updates.
An explicit null route update clears stale route state.
Server ownership remains scoped. The browser owner is singleton because the WASM host and renderer can resolve through different scopes.
Interactive Auto persists to both Server and WebAssembly destinations.
The implementation is internal and adds no public API, InternalsVisibleTo, or new cross-assembly accessor.
E2E test design
The prototype exercises only per-page interactivity, not global interactivity:
Runtime
Initial activation
Enhanced navigation
Interactive Server
Covered
Covered
Interactive WebAssembly
Covered
Covered
The enhanced-navigation scenario keeps the same interactive root instance in a static layout and intentionally has no interactive Router. This proves that persistent-state updates, rather than interactive routing, refresh the route context.
Telemetry is tested as a black-box stream:
Server activities are captured by an in-memory OpenTelemetry exporter.
WASM activities are captured by an OpenTelemetry exporter and posted to the test server.
A collector correlates spans by test ID and exposes them from a JSON endpoint.
The E2E test drives the page, retrieves the JSON stream, and asserts operation order, route tags, route links, and Server circuit links/IDs.
Validation completed
Focused activity source/state tests passed: 13
Cross-runtime E2E telemetry matrix passed: 4
Server initialization
WebAssembly initialization
Server enhanced navigation
WebAssembly enhanced navigation
The prototype commits are preserved on draft PR #68539:
7b47c46e0f — initial persistent-state transfer prototype
5bb1ae99fa — persistent service redesign and first E2E coverage
c374ec9c68 — cross-runtime telemetry test foundation
.NET 12 follow-up decisions
Finalize the internal persistent-service registration shape and lifetimes.
Decide whether exact duplicate Navigate activities produced by SSR/request rendering are expected or should be normalized separately.
Keep the public telemetry shape equivalent between global and per-page interactivity.
Retain end-to-end assertions against exported telemetry rather than component-internal probes.
Rebase/rework the draft PR when .NET 12 implementation work resumes.
Activity
javiercn commentedon Aug 18, 2026
.NET 12 investigation findings
The issue has been moved to .NET 12 Planning. This comment captures the investigation and prototype so the context is retained.
Verdict
The global/per-page difference is a bug, not an intentional telemetry-shape difference.
The documented intent is that
Microsoft.AspNetCore.Components.HandleEventlinks to the currentNavigateactivity, and to the circuit activity for Interactive Server. Global interactivity already produces that shape. Per-page interactivity loses the route link because SSR routing and interactive event dispatch use different renderers and renderer-local link stores.Root cause
Router,Navigate, andHandleEventrun on the same interactive renderer. They share oneComponentsActivityLinkStore.Router/NavigateonEndpointHtmlRenderer. The interactive component later runs onRemoteRendererorWebAssemblyRenderer, each with a different link store.ActivityContextisn't transferred to the interactive renderer.Router, so the interactive runtime can't reconstruct the current route independently.Desired normalized telemetry
For both global and per-page interactivity:
Microsoft.AspNetCore.Components.Navigate.Microsoft.AspNetCore.Components.HandleEventcontains the currentaspnetcore.components.routetag.HandleEventlinks to the currentNavigateactivity.Microsoft.AspNetCore.Components.Server.Circuits.StartCircuitand carries the matching circuit ID.Prototype architecture
The draft PR contains a prototype based on a framework-owned persistent service:
AllowUpdates = truehandles enhanced-navigation state updates.InternalsVisibleTo, or new cross-assembly accessor.E2E test design
The prototype exercises only per-page interactivity, not global interactivity:
The enhanced-navigation scenario keeps the same interactive root instance in a static layout and intentionally has no interactive
Router. This proves that persistent-state updates, rather than interactive routing, refresh the route context.Telemetry is tested as a black-box stream:
Validation completed
The prototype commits are preserved on draft PR #68539:
7b47c46e0f— initial persistent-state transfer prototype5bb1ae99fa— persistent service redesign and first E2E coveragec374ec9c68— cross-runtime telemetry test foundation.NET 12 follow-up decisions
Navigateactivities produced by SSR/request rendering are expected or should be normalized separately.