Avalonia Migration Refactor

TA
24d ago
+25110-2

Summary

Migration to Avalonia, based on dev, with unrelated fixes split out.

could potentially resolves #894.

Build/artifact wiring

  • Flow.Launcher.sln adds Flow.Launcher.Avalonia so solution builds produce the Avalonia host.
  • Flow.Launcher.Avalonia/Flow.Launcher.Avalonia.csproj writes host output to Output\Avalonia\$(Configuration).
  • Built-in plugin .csproj files copy plugin outputs into Output\Avalonia\$(Configuration)\Plugins\... for Avalonia runtime loading.
  • Scripts/post_build.ps1 packages Avalonia setup/portable artifacts separately under Output\Packages\Avalonia.
  • .github/workflows/dotnet.yml uploads Avalonia Setup and Avalonia Portable Version artifacts.

What changed in the existing WPF/shared surface

These are the non-Flow.Launcher.Avalonia/ changes reviewers should expect:

  • Flow.Launcher/Languages/en.xaml — shared localization keys used by Avalonia UI.
  • Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs — exposes hotkey callback/key conversion needed by the Avalonia host.
  • Flow.Launcher.Plugin/Interfaces/ISettingProvider.cs — adds CreateSettingPanelAvalonia() for native Avalonia plugin settings without exposing Avalonia types to WPF plugin reflection.
  • Built-in plugin .csproj, Main.cs, and Views/Avalonia/* files — native Avalonia settings views and copy targets.
  • Flow.Launcher.sln — includes the Avalonia project in normal solution builds.
  • Scripts/post_build.ps1 and Scripts/flowlauncher-avalonia.nuspec — create Avalonia setup/portable artifacts without changing release deployment workflows.
  • .github/workflows/dotnet.yml — uploads Avalonia CI artifacts only.

Existing WPF behavior intentionally left alone

  • WPF host runtime behavior was not intentionally refactored.
  • Existing WPF plugin settings remain the compatibility/fallback path.
  • The JsonStorage temp-file truncation fix was split out to PR #4558 and is no longer part of this PR.

Verification

CI artifact sizes from run 28725559998 before the JsonStorage split cleanup:

  • Flow Installer: 101,089,952 bytes

  • Portable Version: 204,621,638 bytes

  • Avalonia Setup: 85,188,274 bytes

  • Avalonia Portable Version: 172,204,291 bytes

  • The original Flow Launcher installer works.

  • The Avalonia installer works.

Review notes

Highest-risk areas:

  • Flow.Launcher.Avalonia/AvaloniaPublicAPI.cs plugin API compatibility.
  • Flow.Launcher.Avalonia/ViewModel/MainViewModel.cs query/result lifecycle and plugin async query behavior.
  • Flow.Launcher.Avalonia/App.axaml.cs startup sequence, WPF resource compatibility shim, and plugin initialization.
  • Build artifact paths: Avalonia must stay under Output\Avalonia\$(Configuration) so WPF package inputs under Output\Release remain close to dev.