Skip to content

[HotReload] DevServer 7.0.0-dev.2270 keeps a rejected rude edit in its baseline: every later edit is lost (server Success, app applies nothing / InternalError) until the app restarts #25378

Closed

Description

@kazo0

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 of Success with 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 RudeEdit with its ENC diagnostics, and no later edit applies, in that project or any other. Each later edit is also reported as RudeEdit, not as Success with 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-desktop on 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

  1. added
    kind/bug
    area/hot-reload
    platform/desktop 🖥️
    on Oct 12, 2026
  2. kazo0 commented on Oct 12, 2026

    @kazo0
    ContributorAuthor

    Two follow-ups from re-running this today against the same app and host:

    • Not deterministic. On a freshly started host whose first operation was the ENC0014 rude edit, the benign C# edit right after it applied (server op Paths are either not shown or shown not as in the UWP Designer #2 Success, local op Paths are either not shown or shown not as in the UWP Designer #2 Success), twice in a row. The R1–R10 sequence above was on a host that had already served ~25 operations. So the lost-edit state needs some prior history; the InternalError streaks in the agent session were also mid-session.
    • Workaround tooling. uno_app_start on 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 call uno_app_close first. A uno_app_restart tool that does close + start with the last start's arguments is in unoplatform/uno.app-mcp (branch dev/steve/app-restart), and the status text after a rude edit now points at it instead of "re-save the file to retry".
  3. added
    7.0
    on Oct 14, 2026
  4. self-assigned this
    on Oct 14, 2026
  5. added 2 commits that reference this issue on Oct 14, 2026
    c7d9995
    3a57363
  6. khaskoul commented on Oct 25, 2026

    @khaskoul

    @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 RudeEdit and 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 with uno-devserver app start. Step 1 removes sealed from MainPage in MainPage.xaml.cs (and also changes Compute() to Compute(int n) and its call). Step 2 changes the greeting Text in MainPage.xaml. The rude change isn't reverted between the steps.

    # Uno.Sdk 7.0.0-dev.89, Dev Server host 7.0.0-dev.2428 (source a25452a, 161 commits after the fix)
    $ uno-devserver app hot-reload-status --file QaApp/MainPage.xaml.cs --no-start          -> exit 3
    edit to 'QaApp\MainPage.xaml.cs': NOT applied - server op #1 RudeEdit in 1.3s (a rude edit cannot be hot-reloaded, and no later edit applies until the app restarts: finish the related edits, then uno_app_restart).
      ! ...\QaApp\MainPage.xaml.cs(3,1): error ENC0004: Updating the modifiers of class requires restarting the application.
    
    $ uno-devserver app hot-reload-status --file QaApp/MainPage.xaml --no-start             -> exit 3
    edit to 'QaApp\MainPage.xaml': NOT applied - server op #2 RudeEdit in 0.4s (a rude edit cannot be hot-reloaded, and no later edit applies until the app restarts: ...)
      ! ...\QaApp\MainPage.xaml.cs(3,1): error ENC0004: Updating the modifiers of class requires restarting the application.
    local operations (last 0 of 0):
    
    # 11 s later: the new greeting is in neither the Dev Server visual tree nor UI Automation
    
    Uno.Sdk Dev Server host Valid XAML edit after the rude edit
    6.7.30 6.7.135 applied (seen after 2.8–6.0 s), 6 of 6 runs
    7.0.0-dev.81 7.0.0-dev.2347 (source 9e17b82, 28 commits after the fix) RudeEdit, not applied, 3 of 3 runs
    7.0.0-dev.89 7.0.0-dev.2428 RudeEdit, not applied, 1 of 1 run

    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:

    • reverting the rude edit before the XAML edit;
    • a valid C# edit in another file.
  7. added theissue type on Oct 27, 2026
  8. added this to the Platform 7.0 milestone on Oct 27, 2026
  9. DerekRaven commented on Oct 27, 2026

    @DerekRaven
    Contributor

    Initial findings (code reading on master 797cf2e and tag 6.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

    • The net10.0 DevServer host embeds Roslyn 5.6 on both 6.7 and 7.0 (Uno.DevServer.Roslyn.props). The QA runs used .NET SDK 10, so they ran on that host.
    • 6.7 emits with commitUpdates: true (WatchHotReloadService.cs:74), so Roslyn commits every update that comes back Ready.
    • Roslyn 5.x returns a rude edit as Ready with zero updates (4.x returned RestartRequired). So on 6.7 the rejected change (sealed removed, Compute(int n)) became the baseline.
    • The next XAML edit is compared against that baseline. The rude change is no longer part of the difference, so the update is emitted and applies.

    Why that result was wrong

    • The update was computed against code the app never received: MainPage is still sealed in the app, and it still has the old Compute().
    • It applied here only because the XAML edit rewrote a method body. An update that touches what the rude edit changed is rejected by the app (R2 in the original report) or silently drifts from a real build. That matches the earlier "not deterministic, needs some prior history" note.

    Why master blocks it

    • 3a57363 discards an update that hands out no deltas (WatchHotReloadService.Emit.cs:67-83), so the baseline stays at the last update the app actually received.
    • The rude change is then part of every later difference in that project, and the XAML edit regenerates code in the same project. So it is reported as RudeEdit.
    • This is pinned by the fix's own tests: When_EditedWhileRudeEditPending_Then_StaysRejectedUntilReverted and When_RudeEditInOtherProject_Then_NothingAppliedUntilReverted (Given_WatchHotReloadService.RudeEditRecovery.cs).
    • It is also how the net9.0 host (Roslyn 4.14, 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

    • Reword the second "Expected behavior" bullet: while a rude edit is pending, nothing in that project (or any project depending on it) applies. Reverting the rude edit or restarting the app recovers.
    • Fix the host message "no later edit applies until the app restarts": reverting also recovers.
    • 3a57363 is not on release/stable/6.7, so the 6.7 net10 host still has the original baseline bug. Backporting is a separate decision.
    • Keeping Hot Reload running for other files while a rude edit is pending would be a new feature, not a fix. It belongs with the fallback work (degraded path for edits Hot Reload can't apply), not here.
    • Still to check: R6 (record → class reported as Success) was seen on the pre-fix host. It needs a re-run on a current one.
  10. DerekRaven commented on Oct 27, 2026

    @DerekRaven
    Contributor

    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

    Host Later edits in the same project
    net9.0 host (Roslyn 4.14), any version Blocked until the rude edit is reverted or the app restarts. The rude edit comes back as RestartRequired and is never committed.
    net10.0 host (Roslyn 5.6), 6.7 and 7.0 before 3a57363 Sometimes applied, but only because the rejected change had been committed as the baseline. That is the bug this issue reports.
    net10.0 host, 7.0 with 3a57363 Blocked and reported as RudeEdit with 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:

    • applied it, built against code the app never received;
    • reported Success while the app dropped it (R2 above);
    • or treated reverting the rude edit as a new rude edit.

    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

    • The net9.0 (Roslyn 4.14) row is inferred from the code and the 3a57363 commit message.
    • R6 (record → class reported as Success) was seen before the fix and needs a re-run on a fixed host. It's the one place a real gap could remain.
    • Also to re-run on 7.0.0-dev.2428: reverting the rude edit before the XAML edit, and a valid C# edit in another file.
  11. DerekRaven commented on Oct 27, 2026

    @DerekRaven
    Contributor

    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

    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-mcp

    HotReloadStatusText.cs still says only a restart helps, and agents follow it literally. Reverting is enough, and cheaper.

    • Line 175, the RudeEdit verdict
      • now: (a rude edit cannot be hot-reloaded, and no later edit applies until the app restarts: finish the related edits, then uno_app_restart).
      • proposed: (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).
    • Line 256, "compiled but the app started no local operation"
      • Drop the sentence "If an earlier edit was a rude edit this is expected: nothing applies until uno_app_restart…".
      • On a fixed host a later edit is reported as RudeEdit and 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.

  12. DerekRaven commented on Oct 27, 2026

    @DerekRaven
    Contributor

    @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.

  13. DerekRaven commented on Oct 27, 2026

    @DerekRaven
    Contributor

    The status text change proposed above is up in uno.app-mcp: https://github.com/unoplatform/uno.app-mcp/pull/229 (private repo).

    • RudeEdit verdict: now says to revert the edit to keep going, or to finish the related edits and then call uno_app_restart.
    • "App started no local operation" verdict: no longer blames an earlier rude edit. It says to re-save, then restart if the app rejects the update again.
    • Scope: this only ships in App MCP 2.x, which comes with 7.0, the line that has the DevServer fix. 6.7 uses App MCP 1.3.7 and keeps the restart-only advice. That's correct there, because reverting on a pre-fix host is itself a rude edit.
    • Left unchanged: the DevServer CLI proxy's instructions and the app command docs. The proxy also serves 6.7 projects, and "only app restart applies it" is still accurate.
  14. khaskoul commented on Nov 2, 2026

    @khaskoul

    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.Sdk / Uno.Templates 7.0.0-dev.127
    Dev Server host (Uno.WinUI.DevServer) 7.0.0-dev.2526
    Uno.UI.App.Mcp 2.0.0-dev.19
    uno-devserver CLI 7.0.0-dev.2345
    Environment Windows 11, .NET SDK 10.0.401, net10.0-desktop (Skia), blank preset, signed in

    Steps and what we saw

    1. Rude edit: changed the modifiers of the MainPage class in MainPage.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.
    2. Valid XAML edit while the rude edit is pending: it is held, not lost. It is reported as RudeEdit (exit 3), and the running app does not change.
    3. Revert the rude edit: it applies (server op #3 Success, local op #2 Success, 1 element replaced), and the held XAML edit appears in the app together with it.
  15. khaskoul commented on Nov 5, 2026

    @khaskoul

    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:

    • Rude edit then a valid edit: a valid edit made while the rude C# edit is still in the source is reported as RudeEdit and is not applied. The app keeps its previous state.
    • Revert after a rude edit: after the rude edit is reverted, the next valid XAML edit appears in the running app, without a restart.

    The fix (3a57363) appears to be in the 6.7 SR3 build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

7.0area/hot-reloadkind/bugplatform/desktop 🖥️

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions