Repository navigation
Description
Current behavior
After one genuine EnC rude edit (ENC0014, a class gets an extra interface in its base list), the DevServer host never recovers until the app is restarted:
- Every later C# edit, in any file, is reported by the server as
Success, but the app starts no local Hot Reload operation for it. The edit is silently lost. - Reverting the rude edit does not help: the revert is itself reported as a rude edit against the rejected change (ENC0014 + ENC0033 "Deleting interface 'IReproMarker'"), which shows the rejected change is now part of the server's baseline.
- After a type-kind change on top of that (
record→class, also a rude edit), XAML edits are lost the same way. - Only closing and restarting the app clears it; the first edit after the restart applies normally.
In an unattended agent session the same stuck state shows up as InternalError on every edit (0.4–1.4 s, no diagnostics), in streaks that only end at the next app restart. In that session the agent restarted the app 18 times in an hour.
Expected behavior
A rude edit should be rejected and dropped: the server's baseline stays at the last applied update, so
- a revert of the rude edit brings the project back to the baseline and later edits apply,
edits to other files keep applying while the rude change is pending(see the update below), and- the rude change itself keeps being reported as
RudeEdit(with its ENC diagnostics) until the app is restarted, instead ofSuccesswith nothing applied.
Updated 2026-10-27 (@DerekRaven): the struck-through bullet was never Uno behaviour, and the fix (#24085) deliberately does not do it. The expected behaviour is now:
- While a rude edit is in the source, it is reported as
RudeEditwith its ENC diagnostics, and no later edit applies, in that project or any other. Each later edit is also reported asRudeEdit, not asSuccesswith nothing applied. - Reverting the rude edit brings the project back to the last applied update, and the edits held in the meantime apply with the revert.
- Restarting the app applies everything, the rude edit included.
The reasoning is in this comment.
How to reproduce it
Uno.Sdk 7.0.0-dev.73 template app (dotnet new unoapp with Uno.Templates 7.0.0-dev.73, net10.0-desktop, MVUX + Navigation), Uno.WinUI.DevServer 7.0.0-dev.2270 host started by the DevServer CLI, app launched by the App MCP add-in. Each step saves a file, then asks uno_app_hot_reload_status --file <file> for that file's op. The "benign" edit is a string literal change in a page model.
R1. add an interface to the class's base list (EnC: changing base list)
[R1 base list] exit=3 verdict=rudeEdit | edit to 'FieldCheck\Services\FieldCheckRepository.cs': NOT applied — server op #3 RudeEdit in 0.4s (a rude edit cannot be hot-reloaded: restart with uno_app_start).
! FieldCheckRepository.cs(51,44): error ENC0014: Updating the base class and/or base interface(s) of class requires restarting the application.
R2. benign C# edit after it
[R2 cs] exit=1 verdict=notApplied | edit to 'FieldCheck\Presentation\PageModels.cs': NOT applied — compiled by the server (server op #4 Success in 0.4s) but the app started no local operation for it: it rejected the update (see the app log).
R3. benign XAML edit after it
[R3 xaml] exit=0 verdict=applied | edit to 'FieldCheck\Presentation\DashboardPage.xaml': applied (server op #5 Success in 1.6s, local op #4 Success in 0.1s, types: DashboardPage, 1 element(s) replaced)
R4. revert the base list change
[R4 revert] exit=3 verdict=rudeEdit | edit to 'FieldCheck\Services\FieldCheckRepository.cs': NOT applied — server op #6 RudeEdit in 0.3s
! FieldCheckRepository.cs(49,44): error ENC0014: Updating the base class and/or base interface(s) of class requires restarting the application.
! FieldCheckRepository.cs(6,1): error ENC0033: Deleting interface 'IReproMarker' requires restarting the application.
R5. benign C# edit after the revert
[R5 cs] exit=1 verdict=notApplied | ... (server op #7 Success in 0.4s) but the app started no local operation for it
R6. change the type kind: DashboardModel record -> class
[R6 kind] exit=1 verdict=notApplied | ... (server op #8 Success in 0.3s) but the app started no local operation for it
R7. benign C# edit after it
[R7 cs] exit=1 verdict=notApplied | ... (server op #9 Success)
R8. benign XAML edit after it
[R8 xaml] exit=1 verdict=notApplied | edit to 'FieldCheck\Presentation\DashboardPage.xaml': NOT applied — compiled by the server (server op #10 Success in 0.4s) but the app started no local operation for it
R9. revert the kind change
[R9 revert] exit=1 verdict=notApplied | ... (server op #11 Success)
R10. benign C# edit after the revert
[R10 cs] exit=1 verdict=notApplied | ... (server op #12 Success)
After uno_app_close + uno_app_start:
[H6b cs] exit=0 verdict=applied | edit to 'FieldCheck\Presentation\PageModels.cs': applied (server op #1 Success in 2.8s, local op #2 Success in 0.4s, types: DashboardModel)
[H6c xaml] exit=0 verdict=applied | edit to 'FieldCheck\Presentation\DashboardPage.xaml': applied (server op #2 Success in 0.7s, local op #3 Success in 0.1s, types: DashboardPage, 1 element(s) replaced)
The same script with the rude edit replaced by edits that EnC accepts (new file, new type, positional record parameter with a default, deleting a method, whole-file rewrite of a code-behind, MVUX IState property added, a Feed.Combine pipeline rewrite, a compile error then its fix) applies every step, so the trigger is specifically the rejected rude edit staying in the server's solution.
Same symptom seen in a Claude Code session running the Uno Platform Studio uno-testing skill against this app, where the stuck phase reports InternalError instead of Success for every op until the restart. No host log with Uno.HotReload tracing was captured for that variant yet; happy to run it with a trace level if you tell me which category to enable.
Environment
- Uno.Sdk 7.0.0-dev.73, Uno.WinUI.DevServer 7.0.0-dev.2270,
net10.0-desktopon Windows 11, .NET SDK 10.0.400 - App MCP add-in built from unoplatform/uno.app-mcp
main+ #188 + #197 (used only to read the status; the host behaviour does not depend on it) - DevServer CLI from #25374
Workaround
Restart the app after any RudeEdit before making further edits. The uno-testing skill's PostToolUse hook already tells the agent to do so, but the stuck state wastes every edit made in between and the status text ("re-save the file to retry") cannot work once the host is in this state.
Activity
kazo0 commentedon Oct 12, 2026
Two follow-ups from re-running this today against the same app and host:
uno_app_starton a running desktop app does not terminate it (only the stdout observer is disposed), so the rebuild fails with MSB3021 on the locked executable; the agent has to calluno_app_closefirst. Auno_app_restarttool that does close + start with the last start's arguments is in unoplatform/uno.app-mcp (branchdev/steve/app-restart), and the status text after a rude edit now points at it instead of "re-save the file to retry".feat(skills): the uno-testing hook asks for uno_app_restart after a r…
test(hr): re-enable base-type scenarios, cover pending rude edits
fix(hr): keep rude edits out of the EnC baseline
khaskoul commentedon Oct 25, 2026
@kazo0
Follow-up from automated QA of the Uno SDK, on hosts that include the fix (3a57363). One part of the expected behaviour above still isn't met: "edits to other files keep applying while the rude change is pending".
After a rude C# edit, the next valid XAML edit in a different file is reported as
RudeEditand never reaches the app. The reported diagnostic is the earlier C# file's ENC0004. On Uno.Sdk 6.7.30 the same XAML edit applies.Setup: a blank
unoapp(desktop,net10.0-desktop), app started withuno-devserver app start. Step 1 removessealedfromMainPageinMainPage.xaml.cs(and also changesCompute()toCompute(int n)and its call). Step 2 changes the greetingTextinMainPage.xaml. The rude change isn't reverted between the steps.The host's message says "no later edit applies until the app restarts", so this may be the intended design after the fix: the project is in
ProjectsToRebuild, so each later emit hands out nothing. If so, could the issue say so? The current expected behaviour reads the other way, and this differs from 6.7, where an unrelated XAML edit still applied.If it's not intended, it looks like the remaining part of this issue, and it may be worth reopening. A separate new issue works too, if you'd rather.
Not tested here:
DerekRaven commentedon Oct 27, 2026
Initial findings (code reading on
master797cf2e and tag6.7.135, not yet re-run)Summary: the remaining point (a valid XAML edit blocked after a rude C# edit) is how 3a57363 is designed to work. The 6.7 result that looked correct was the original bug in this issue.
Why 6.7 applied the XAML edit
Uno.DevServer.Roslyn.props). The QA runs used .NET SDK 10, so they ran on that host.commitUpdates: true(WatchHotReloadService.cs:74), so Roslyn commits every update that comes backReady.Readywith zero updates (4.x returnedRestartRequired). So on 6.7 the rejected change (sealedremoved,Compute(int n)) became the baseline.Why that result was wrong
MainPageis stillsealedin the app, and it still has the oldCompute().Why master blocks it
WatchHotReloadService.Emit.cs:67-83), so the baseline stays at the last update the app actually received.RudeEdit.When_EditedWhileRudeEditPending_Then_StaysRejectedUntilRevertedandWhen_RudeEditInOtherProject_Then_NothingAppliedUntilReverted(Given_WatchHotReloadService.RudeEditRecovery.cs).RestartRequired, never committed) behaved, so master matches pre-Roslyn-5 Hot Reload. That part is inferred from the code and not yet re-run.Proposed next steps
release/stable/6.7, so the 6.7 net10 host still has the original baseline bug. Backporting is a separate decision.record→classreported asSuccess) was seen on the pre-fix host. It needs a re-run on a current one.DerekRaven commentedon Oct 27, 2026
Clarification: is anything still regressed against 6.7?
Short answer: no correctness regression. The second "Expected behavior" bullet (edits to other files keep applying while a rude edit is pending) describes something Uno never actually supported. The fix brings 7.0 back in line with how Hot Reload behaved before Roslyn 5.
What each host did after a rude edit
RestartRequiredand is never committed.RudeEditwith its diagnostic, until reverted or restarted. Same as the net9.0 host.Why the 6.7 behaviour wasn't a feature. On the net10.0 host, 6.7 handled a later edit in one of three ways:
Successwhile the app dropped it (R2 above);7.0 now does the same thing every time.
What does change for users. On .NET 10, someone who made a rude edit and kept editing XAML used to see some of those edits appear. Now everything in that project is blocked until they revert or restart. That's a product question about whether to build a real degraded mode, not a defect in the fix.
Not yet verified by running
record→classreported asSuccess) was seen before the fix and needs a re-run on a fixed host. It's the one place a real gap could remain.DerekRaven commentedon Oct 27, 2026
Expected behaviour updated: why, and what's left
I've updated the "Expected behavior" section above. kazo0's original wording is kept, with the changed bullet struck through.
Why the "other files keep applying" bullet is dropped
When_EditedWhileRudeEditPending_Then_StaysRejectedUntilRevertedandWhen_RudeEditInOtherProject_Then_NothingAppliedUntilReverted(src/Uno.HotReload.Tests).RestartRequiredand never commits it (measured in fix(hr): never commit an EnC baseline for an update that was not applied #24085).Keeping Hot Reload running for other files while a rude edit is pending would be a new feature, not a fix.
Proposed status text change in
uno.app-mcpHotReloadStatusText.csstill says only a restart helps, and agents follow it literally. Reverting is enough, and cheaper.RudeEditverdict(a rude edit cannot be hot-reloaded, and no later edit applies until the app restarts: finish the related edits, then uno_app_restart).(a rude edit cannot be hot-reloaded, and nothing else applies while it is in the source: revert it to keep going, or finish the related edits, then uno_app_restart).RudeEditand never reaches this branch. So the sentence now hides a real rejection.The App MCP has no tool that edits files, so "revert" means the agent undoes its own edit with its own tools. The existing compiler-failure text (line 174, "undo it to keep going") already works this way.
DerekRaven commentedon Oct 27, 2026
@khaskoul Note this was closed without additional work, I believe the validation failed on a expected result that the description claimed that is, in fact, inaccurate. I've update the description to reflect this.
DerekRaven commentedon Oct 27, 2026
The status text change proposed above is up in
uno.app-mcp: https://github.com/unoplatform/uno.app-mcp/pull/229 (private repo).RudeEditverdict: now says to revert the edit to keep going, or to finish the related edits and then calluno_app_restart.appcommand docs. The proxy also serves 6.7 projects, and "onlyapp restartapplies it" is still accurate.khaskoul commentedon Nov 2, 2026
Verified on 7.0.0-dev.127: works as described in the updated Expected behavior
Thanks for the clarification. I re-specified our QA case to the updated expected behavior, and it passes 3 of 3 on 7.0.0-dev.127. It also passed 3 of 3 on 7.0.0-dev.89 earlier.
uno-devserverCLInet10.0-desktop(Skia), blank preset, signed inSteps and what we saw
MainPageclass inMainPage.xaml.cs. It was reported as a rude edit and not applied (exit 3):edit to 'QaApp\MainPage.xaml.cs': NOT applied - server op Setting Image.Source to local image (added as "Content" to Assets/ folder in UWP project) leads to WASM app never going past the Splashscreen #1 RudeEdit in 1.4s (...)
! …\QaApp\MainPage.xaml.cs(3,1): error ENC0004: Updating the modifiers of class requires restarting the application.
server op #3 Success,local op #2 Success, 1 element replaced), and the held XAML edit appears in the app together with it.khaskoul commentedon Nov 5, 2026
Verified fixed on the 6.7 SR3 candidate, Uno.Sdk 6.7.45 (Dev Server host 6.7.359, Windows 11, .NET SDK 10.0.401, desktop head).
On 6.7.30 the 6.7 host still kept the rejected rude edit as its baseline. On 6.7.45 both of our checks pass, 3 of 3 runs each:
RudeEditand is not applied. The app keeps its previous state.The fix (3a57363) appears to be in the 6.7 SR3 build.