Skip to content

Fix Uno/Avalonia WhenAnyValue going silent after first value; bump Uno.WinUI to 6.6.184 - #37

Merged
michaelstonis merged 5 commits into
developfrom
feature/reactiveui-24-and-windows-platforms
Aug 9, 2026
Merged

michaelstonis merged 5 commits into
developfrom
feature/reactiveui-24-and-windows-platforms

Conversation

@michaelstonis

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #36 (merged). Two commits that landed on the feature branch after the merge:

Fix: WhenAnyValue rooted at a view delivered one value, then nothing (Uno + Avalonia)

Reported from a real Uno app on StellarUI.Uno: WhenAnyValue chains delivered their first synchronous value and then went silent, while plain INotifyPropertyChanged kept working.

Cause. ReactiveUI resolves property observation through registered ICreatesObservableForProperty services. The WPF/WinUI .Reactive packages register a DependencyObject handler via WithWpf()/WithWinUI(), but Stellar.Uno's hand-rolled bootstrap (no ReactiveUI 24-compatible Uno package exists) registered only the activation fetcher and schedulers. Observation of any DependencyProperty-backed property — a control's Text, a page's ViewModel — fell back to POCOObservableForProperty, which only ever produces the current value.

Fix. Stellar.Uno now ships DependencyObjectObservableForProperty (built on RegisterPropertyChangedCallback) and registers it in UseStellarComponents(). Stellar.Avalonia had the same latent gap since Avalonia.ReactiveUI was dropped (AvaloniaObject doesn't implement INPC) and gets an equivalent AvaloniaObjectObservableForProperty.

Evidence (live Uno desktop head on macOS):

  • Without the registration: textBox.WhenAnyValue(t => t.Text)1 emission (the reported symptom, reproduced)
  • With it: 3/3 emissions, page-rooted chains flow, background-thread VM mutations still marshal to the UI thread, full Stellar lifecycle intact, 259/259 unit tests pass

Bump Uno.WinUI 6.6.176 → 6.6.184

6.6.184 is the version paired with the current stable Uno.Sdk (6.6.42); the Sdk hard-errors (UNOB0004) when an app's Uno version disagrees, so tracking the paired version avoids friction for template-default consumers.

🤖 Generated with Claude Code

michaelstonis and others added 2 commits August 9, 2026 14:46
Validated Stellar.Uno against a real Uno desktop (Skia) head on macOS: a
scaffolded unoapp referencing Stellar.Uno ran the full Stellar lifecycle
(SetupViewModel -> Initialize -> SetupUserInterface -> Bind -> Loaded ->
Activated/IsAppearing) and a background-thread view model mutation was
marshalled to the UI thread through UnoScheduler via
RxSchedulers.MainThreadScheduler. 6.6.184 is the version paired with the
current stable Uno.Sdk 6.6.42, so consumers on the template default get a
single unified Uno.WinUI version.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…alue keeps emitting

In a real Uno app using StellarUI.Uno, WhenAnyValue chains rooted at a view
delivered their first synchronous value and then went silent, while plain
INotifyPropertyChanged subscriptions kept working. Reproduced in a live Uno
desktop head: observing a control's DependencyProperty (e.g.
textBox.WhenAnyValue(t => t.Text)) produced exactly one emission.

Cause: ReactiveUI resolves property observation through registered
ICreatesObservableForProperty services. The WinUI/WPF .Reactive packages
register a DependencyObject handler via WithWinUI()/WithWpf(), but
Stellar.Uno's hand-rolled bootstrap (no ReactiveUI 24-compatible Uno package
exists) registered only the activation fetcher and schedulers - so
DependencyObject-rooted observation fell back to POCOObservableForProperty,
which only ever produces the current value.

Fix: Stellar.Uno now ships DependencyObjectObservableForProperty (built on
RegisterPropertyChangedCallback) and registers it in UseStellarComponents.
Verified in the live Uno desktop head: control observation now emits on every
change (3/3), page-rooted chains keep flowing, and removing the registration
reproduces the 1-emission failure.

Stellar.Avalonia had the same latent gap since Avalonia.ReactiveUI was
dropped - AvaloniaObject does not implement INotifyPropertyChanged, so
control-rooted observation degraded the same way. It now ships an equivalent
AvaloniaObjectObservableForProperty over the AvaloniaProperty PropertyChanged
event.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 9, 2026 20:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 addresses a ReactiveUI 24 platform-integration gap where WhenAnyValue rooted at UI views on Uno and Avalonia could emit the initial value and then go silent due to missing ICreatesObservableForProperty implementations for platform property systems. It also updates Uno’s WinUI dependency to the version paired with the current Uno.Sdk to avoid version-mismatch build errors.

Changes:

  • Register platform-specific ICreatesObservableForProperty implementations for Uno (DependencyObject) and Avalonia (AvaloniaObject) so view-rooted WhenAnyValue chains continue emitting.
  • Add DependencyObjectObservableForProperty (Uno) and AvaloniaObjectObservableForProperty (Avalonia) implementations.
  • Bump Uno.WinUI from 6.6.176 to 6.6.184.

Reviewed changes

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

Show a summary per file
File Description
Stellar.Uno/Extensions/BuilderExtensions.cs Registers the Uno dependency-property observable provider during ReactiveUI builder setup.
Stellar.Uno/DependencyObjectObservableForProperty.cs Adds Uno DependencyProperty-based observation to keep WhenAnyValue emitting beyond the first value.
Stellar.Avalonia/Extensions/AppBuilderExtensions.cs Registers the Avalonia property observable provider during ReactiveUI builder setup.
Stellar.Avalonia/AvaloniaObjectObservableForProperty.cs Adds Avalonia AvaloniaProperty-based observation to keep WhenAnyValue emitting beyond the first value.
Directory.Packages.props Updates Uno.WinUI package version to match Uno.Sdk expectations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Stellar.Uno/DependencyObjectObservableForProperty.cs Outdated
Comment thread Stellar.Avalonia/AvaloniaObjectObservableForProperty.cs Outdated
Comment thread Stellar.Avalonia/AvaloniaObjectObservableForProperty.cs Outdated
michaelstonis and others added 3 commits August 9, 2026 16:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@michaelstonis
michaelstonis merged commit 31bc7cf into develop Aug 9, 2026
3 of 4 checks passed
@michaelstonis
michaelstonis deleted the feature/reactiveui-24-and-windows-platforms branch August 9, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants