Skip to content

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Oct 8, 2025

Do not skip Render Mode boundary for re-executions

Re-executed page components should have configurable render mode because typically re-executed page is used in the same places as page rendered by NavigationManager.NotFound(). By allowing interactivity in the latter but not supporting it in the former case, we introduce inconsistency.

Description

  • In case of error handling and re-execution, we used to always apply SSR. It does not make sense from the consistency reasons mentioned above. Re-execution case gets removed from the "always SSR" processing. Its render mode resolution will follow the same logic as any other component's.
  • BrowserNavigationToNotExistingPathReExecutesTo404 test does not make use of "renderMode" query parameter, it looks like copy-paste error. Changing it to be a fact.
  • The test used to check browser url bar navigation to non-existing page. Now it also checks if the page is interactive.

Fixes #63963

@ilonatommy ilonatommy self-assigned this Oct 8, 2025
@ilonatommy ilonatommy requested a review from a team as a code owner October 8, 2025 14:30
@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 14:30
@ilonatommy ilonatommy added the area-blazor Includes: Blazor, Razor Components label Oct 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables interactivity for re-executed page components to maintain consistency with pages rendered through NavigationManager.NotFound(). Previously, re-executed pages were forced to use SSR mode, creating an inconsistency in behavior.

Key Changes

  • Removed the _isReExecuted condition that forced SSR mode for re-executed pages
  • Updated the test to verify interactivity functionality on re-executed pages
  • Enhanced the re-executed page component with interactive counter functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ReexecutedPage.razor Added interactive server render mode and counter functionality to test interactivity
InteractivityTest.cs Converted test to fact and added interactivity verification
EndpointHtmlRenderer.Prerendering.cs Removed re-execution condition that forced SSR mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reexecuted page is not interactive
1 participant