Repository navigation
[XIHR] Add regression test for default-template MainPage text edit (#40413) - #40417
Merged
kubaflo merged 1 commit intoNov 19, 2026
Merged
Conversation
…40413) Covers the default MAUI template MainPage (StaticResource styles from a sibling Styles.xaml, x:Name and event handler in code-behind): editing the Label text must still produce the UpdateComponent patch when the IDE evaluates the edited snapshot again or runs a throwaway compilation first. On net11 the later evaluation emits an empty UpdateComponent and the edit is dropped (#36937); the candidate/11.0.1xx-sr2 fixes (#40233, #40330, #40378) keep the patch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
StephaneDelcroix
temporarily deployed
to
copilot-pat-pool
November 19, 2026 09:04 — with
GitHub Actions
Inactive
StephaneDelcroix
temporarily deployed
to
copilot-pat-pool
November 19, 2026 09:04 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
StephaneDelcroix
temporarily deployed
to
copilot-pat-pool
November 19, 2026 09:05 — with
GitHub Actions
Inactive
StephaneDelcroix
temporarily deployed
to
copilot-pat-pool
November 19, 2026 09:08 — with
GitHub Actions
Inactive
StephaneDelcroix
temporarily deployed
to
copilot-pat-pool
November 19, 2026 09:10 — with
GitHub Actions
Inactive
StephaneDelcroix
temporarily deployed
to
copilot-pat-pool
November 19, 2026 09:10 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
Collaborator
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
Contributor
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit 5c2ddbf.
1 task
kubaflo
pushed a commit
that referenced
this pull request
Nov 19, 2026
…40413) (#40417) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). **Base is `candidate/11.0.1xx-sr2`, not `net11`.** The PR is test-only and covers behavior that exists only on the candidate branch, from the #36937 fix chain #40233, #40235, #40329, #40330, and #40378. Against `net11` the test fails, because that fix has not flowed there yet. This follows the precedent of #40329, #40330, and #40378, which targeted this branch for the same reason. Maintainers: retarget if you prefer a different lane. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change #40413 reports that in VS on Windows (.NET 11, SourceGen inflator, XAML Incremental Hot Reload on by default in Debug), editing a Label's `Text` in the default template's `MainPage.xaml` is not applied. **Root cause.** This is #36937. Roslyn/VS evaluate the same edited generator-driver snapshot more than once, for example forked or speculative runs, or a throwaway compilation before the applied one. On `net11`, the first evaluation advances the cached previous XAML. The evaluation that is actually applied then sees no diff and emits an empty `UpdateComponent`, and the runtime silently skips it. The bug became visible in .NET 11 because XIHR is now the default; 10.0.120 used legacy XAML Hot Reload. I reproduced this with the issue's own template `MainPage.xaml` through the source generator: | Sequence | `net11` (a25e629) | `candidate/11.0.1xx-sr2` (cec6650) | | --- | --- | --- | | Edit evaluated once | patch | patch | | Same edited snapshot evaluated twice: 2nd run | **empty UC** | patch | | Throwaway compilation first, then real run: real run | **empty UC** | patch | On the candidate branch the existing fixes already handle this. This PR adds `DefaultTemplateMainPageTextEdit_SurvivesRepeatedAndThrowawayEvaluations`, a theory with repeated and throwaway-first cases. It uses the template page shape (`StaticResource` styles from a sibling `Styles.xaml`, `x:Name`, a `Clicked` handler in code-behind) to lock in the reported scenario. There are no product changes. **Android .NET 10 (validation comment).** This is a separate scenario. XIHR was not the default in .NET 10, so that report involves the legacy XAML Hot Reload path and is not caused by this regression. It is not addressed here. **Validation** - `DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --filter "FullyQualifiedName~XamlIncrementalHotReloadPipelineTests|FullyQualifiedName~CodeBehindFieldStabilityTests"`: **passed**, 93/93, on this branch. - `net11`: the same two sequences, run through an equivalent temporary probe with the template XAML, produce an empty UC, as shown in the table. I did not port the committed test itself to `net11`: its helpers exist only on candidate, and reverting the fix commits in place conflicts. - Not verified in Visual Studio on Windows or on device; I worked on a macOS host. ### Issues Fixed Fixes #40413 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
pushed a commit
that referenced
this pull request
Nov 22, 2026
…40413) (#40417) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). **Base is `candidate/11.0.1xx-sr2`, not `net11`.** The PR is test-only and covers behavior that exists only on the candidate branch, from the #36937 fix chain #40233, #40235, #40329, #40330, and #40378. Against `net11` the test fails, because that fix has not flowed there yet. This follows the precedent of #40329, #40330, and #40378, which targeted this branch for the same reason. Maintainers: retarget if you prefer a different lane. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change #40413 reports that in VS on Windows (.NET 11, SourceGen inflator, XAML Incremental Hot Reload on by default in Debug), editing a Label's `Text` in the default template's `MainPage.xaml` is not applied. **Root cause.** This is #36937. Roslyn/VS evaluate the same edited generator-driver snapshot more than once, for example forked or speculative runs, or a throwaway compilation before the applied one. On `net11`, the first evaluation advances the cached previous XAML. The evaluation that is actually applied then sees no diff and emits an empty `UpdateComponent`, and the runtime silently skips it. The bug became visible in .NET 11 because XIHR is now the default; 10.0.120 used legacy XAML Hot Reload. I reproduced this with the issue's own template `MainPage.xaml` through the source generator: | Sequence | `net11` (a25e629) | `candidate/11.0.1xx-sr2` (cec6650) | | --- | --- | --- | | Edit evaluated once | patch | patch | | Same edited snapshot evaluated twice: 2nd run | **empty UC** | patch | | Throwaway compilation first, then real run: real run | **empty UC** | patch | On the candidate branch the existing fixes already handle this. This PR adds `DefaultTemplateMainPageTextEdit_SurvivesRepeatedAndThrowawayEvaluations`, a theory with repeated and throwaway-first cases. It uses the template page shape (`StaticResource` styles from a sibling `Styles.xaml`, `x:Name`, a `Clicked` handler in code-behind) to lock in the reported scenario. There are no product changes. **Android .NET 10 (validation comment).** This is a separate scenario. XIHR was not the default in .NET 10, so that report involves the legacy XAML Hot Reload path and is not caused by this regression. It is not addressed here. **Validation** - `DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --filter "FullyQualifiedName~XamlIncrementalHotReloadPipelineTests|FullyQualifiedName~CodeBehindFieldStabilityTests"`: **passed**, 93/93, on this branch. - `net11`: the same two sequences, run through an equivalent temporary probe with the template XAML, produce an empty UC, as shown in the table. I did not port the committed test itself to `net11`: its helpers exist only on candidate, and reverting the fix commits in place conflicts. - Not verified in Visual Studio on Windows or on device; I worked on a macOS host. ### Issues Fixed Fixes #40413 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
pushed a commit
that referenced
this pull request
Nov 23, 2026
…40413) (#40417) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). **Base is `candidate/11.0.1xx-sr2`, not `net11`.** The PR is test-only and covers behavior that exists only on the candidate branch, from the #36937 fix chain #40233, #40235, #40329, #40330, and #40378. Against `net11` the test fails, because that fix has not flowed there yet. This follows the precedent of #40329, #40330, and #40378, which targeted this branch for the same reason. Maintainers: retarget if you prefer a different lane. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change #40413 reports that in VS on Windows (.NET 11, SourceGen inflator, XAML Incremental Hot Reload on by default in Debug), editing a Label's `Text` in the default template's `MainPage.xaml` is not applied. **Root cause.** This is #36937. Roslyn/VS evaluate the same edited generator-driver snapshot more than once, for example forked or speculative runs, or a throwaway compilation before the applied one. On `net11`, the first evaluation advances the cached previous XAML. The evaluation that is actually applied then sees no diff and emits an empty `UpdateComponent`, and the runtime silently skips it. The bug became visible in .NET 11 because XIHR is now the default; 10.0.120 used legacy XAML Hot Reload. I reproduced this with the issue's own template `MainPage.xaml` through the source generator: | Sequence | `net11` (a25e629) | `candidate/11.0.1xx-sr2` (cec6650) | | --- | --- | --- | | Edit evaluated once | patch | patch | | Same edited snapshot evaluated twice: 2nd run | **empty UC** | patch | | Throwaway compilation first, then real run: real run | **empty UC** | patch | On the candidate branch the existing fixes already handle this. This PR adds `DefaultTemplateMainPageTextEdit_SurvivesRepeatedAndThrowawayEvaluations`, a theory with repeated and throwaway-first cases. It uses the template page shape (`StaticResource` styles from a sibling `Styles.xaml`, `x:Name`, a `Clicked` handler in code-behind) to lock in the reported scenario. There are no product changes. **Android .NET 10 (validation comment).** This is a separate scenario. XIHR was not the default in .NET 10, so that report involves the legacy XAML Hot Reload path and is not caused by this regression. It is not addressed here. **Validation** - `DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --filter "FullyQualifiedName~XamlIncrementalHotReloadPipelineTests|FullyQualifiedName~CodeBehindFieldStabilityTests"`: **passed**, 93/93, on this branch. - `net11`: the same two sequences, run through an equivalent temporary probe with the template XAML, produce an empty UC, as shown in the table. I did not port the committed test itself to `net11`: its helpers exist only on candidate, and reverting the fix commits in place conflicts. - Not verified in Visual Studio on Windows or on device; I worked on a macOS host. ### Issues Fixed Fixes #40413 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani
pushed a commit
to KarthikRajaKalaimani/maui
that referenced
this pull request
Nov 26, 2026
…otnet#40413) (dotnet#40417) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). **Base is `candidate/11.0.1xx-sr2`, not `net11`.** The PR is test-only and covers behavior that exists only on the candidate branch, from the dotnet#36937 fix chain dotnet#40233, dotnet#40235, dotnet#40329, dotnet#40330, and dotnet#40378. Against `net11` the test fails, because that fix has not flowed there yet. This follows the precedent of dotnet#40329, dotnet#40330, and dotnet#40378, which targeted this branch for the same reason. Maintainers: retarget if you prefer a different lane. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change dotnet#40413 reports that in VS on Windows (.NET 11, SourceGen inflator, XAML Incremental Hot Reload on by default in Debug), editing a Label's `Text` in the default template's `MainPage.xaml` is not applied. **Root cause.** This is dotnet#36937. Roslyn/VS evaluate the same edited generator-driver snapshot more than once, for example forked or speculative runs, or a throwaway compilation before the applied one. On `net11`, the first evaluation advances the cached previous XAML. The evaluation that is actually applied then sees no diff and emits an empty `UpdateComponent`, and the runtime silently skips it. The bug became visible in .NET 11 because XIHR is now the default; 10.0.120 used legacy XAML Hot Reload. I reproduced this with the issue's own template `MainPage.xaml` through the source generator: | Sequence | `net11` (a25e629) | `candidate/11.0.1xx-sr2` (cec6650) | | --- | --- | --- | | Edit evaluated once | patch | patch | | Same edited snapshot evaluated twice: 2nd run | **empty UC** | patch | | Throwaway compilation first, then real run: real run | **empty UC** | patch | On the candidate branch the existing fixes already handle this. This PR adds `DefaultTemplateMainPageTextEdit_SurvivesRepeatedAndThrowawayEvaluations`, a theory with repeated and throwaway-first cases. It uses the template page shape (`StaticResource` styles from a sibling `Styles.xaml`, `x:Name`, a `Clicked` handler in code-behind) to lock in the reported scenario. There are no product changes. **Android .NET 10 (validation comment).** This is a separate scenario. XIHR was not the default in .NET 10, so that report involves the legacy XAML Hot Reload path and is not caused by this regression. It is not addressed here. **Validation** - `DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --filter "FullyQualifiedName~XamlIncrementalHotReloadPipelineTests|FullyQualifiedName~CodeBehindFieldStabilityTests"`: **passed**, 93/93, on this branch. - `net11`: the same two sequences, run through an equivalent temporary probe with the template XAML, produce an empty UC, as shown in the table. I did not port the committed test itself to `net11`: its helpers exist only on candidate, and reverting the fix commits in place conflicts. - Not verified in Visual Studio on Windows or on device; I worked on a macOS host. ### Issues Fixed Fixes dotnet#40413 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch was previously 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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Target Branch
mainnet11, for reviewBase is
candidate/11.0.1xx-sr2, notnet11. The PR is test-only and covers behavior that exists only on the candidate branch, from the #36937 fix chain #40233, #40235, #40329, #40330, and #40378. Againstnet11the test fails, because that fix has not flowed there yet. This follows the precedent of #40329, #40330, and #40378, which targeted this branch for the same reason. Maintainers: retarget if you prefer a different lane.For .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.Description of Change
#40413 reports that in VS on Windows (.NET 11, SourceGen inflator, XAML Incremental Hot Reload on by default in Debug), editing a Label's
Textin the default template'sMainPage.xamlis not applied.Root cause. This is #36937. Roslyn/VS evaluate the same edited generator-driver snapshot more than once, for example forked or speculative runs, or a throwaway compilation before the applied one. On
net11, the first evaluation advances the cached previous XAML. The evaluation that is actually applied then sees no diff and emits an emptyUpdateComponent, and the runtime silently skips it. The bug became visible in .NET 11 because XIHR is now the default; 10.0.120 used legacy XAML Hot Reload.I reproduced this with the issue's own template
MainPage.xamlthrough the source generator:net11(a25e629)candidate/11.0.1xx-sr2(cec6650)On the candidate branch the existing fixes already handle this. This PR adds
DefaultTemplateMainPageTextEdit_SurvivesRepeatedAndThrowawayEvaluations, a theory with repeated and throwaway-first cases. It uses the template page shape (StaticResourcestyles from a siblingStyles.xaml,x:Name, aClickedhandler in code-behind) to lock in the reported scenario. There are no product changes.Android .NET 10 (validation comment). This is a separate scenario. XIHR was not the default in .NET 10, so that report involves the legacy XAML Hot Reload path and is not caused by this regression. It is not addressed here.
Validation
DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --filter "FullyQualifiedName~XamlIncrementalHotReloadPipelineTests|FullyQualifiedName~CodeBehindFieldStabilityTests": passed, 93/93, on this branch.net11: the same two sequences, run through an equivalent temporary probe with the template XAML, produce an empty UC, as shown in the table. I did not port the committed test itself tonet11: its helpers exist only on candidate, and reverting the fix commits in place conflicts.Issues Fixed
Fixes #40413