Skip to content

fix: stabilize native Windows popup and WinUI 3 settings - #9

Closed
NcaMoq wants to merge 62 commits into
mainfrom
work/ongoing-improvements
Closed

NcaMoq wants to merge 62 commits into
mainfrom
work/ongoing-improvements

Conversation

@NcaMoq

@NcaMoq NcaMoq commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Continue OpenShazam stability fixes on one draft PR while respecting the UI design document (v1.61, §11.3 and UI-222).

Architecture: native Rust + Win32/Direct2D/Windows Composition handles the tray, Shazam-style 380×610 DIP popup, artwork, history and motion. WinUI 3 is for the separate Settings window only. The GUI uses the existing typed Rust recognition controller; there is no JSONL recognition sidecar in the product UI.

Valid changes preserved

  • CI uses the pinned Rust 1.85.0 toolchain and corresponding rustfmt/Clippy/Windows GNU target.
  • macOS dev-cli manual trigger conditional-compile repairs.
  • Controller event timestamps and snapshot fallback, with Windows history recording match emission time instead of delayed UI dequeue time.
  • Rustfmt updates, Clippy Windows test-only cfg repairs, and non-dev-cli CI check.
  • Separate WinUI 3 Settings build in Windows CI, plus settings-window initial DPI and cross-monitor scale support.
  • Keep live Shazam Config webtrackurl.href handling; do not invent a track page URL.

Design compliance restoration

Commit 71fb1eb0f669e3e1552100bcfafb0960c97108f1 fully reverses the mistakenly implemented WinUI 3 main window and Rust JSONL recognition sidecar, restoring the original native Win32/Composition renderer, UI model, popup entrypoint and four BGRA assets. It also restores the Settings-only XAML, original app assembly identity, README and CI.

A tree comparison confirms the current checkout's file tree is identical to ce5e92c890a06ba0a1373e9f7c2d489433639072 — the last correct pre-migration commit. All earlier valid fixes remain present.

WinUI 3 Settings-only migration (integration in progress)

Design §11.3 is the binding UI decision. The Rust Win32/Direct2D/Composition recognition popup, tray, result card, artwork, history and audio backend remain native. The legacy Win32 Settings window, its dedicated painter, old click regions, window kind and styles have been removed in the working branch; the tray menu and gear now lazily invoke a C++/WinRT, same-process DesktopWindowXamlSource host via narrow four-function C ABI. There is no Settings process spawn or second recognition engine. The new Settings UI uses native WinUI 3 ScrollViewer, ToggleSwitch, InfoBar, OS theme/font resources and Windows StartupTask state. Initial device DPI and per-monitor window changes are wired.

tools/build-windows.ps1 builds the original Rust tray executable together with OpenShazam.SettingsHost.dll and stages them together. A dedicated Windows native CI job compiles the C++/WinRT WinUI 3 island and builds the Rust EXE as an artifact. Old C# settings-only test application still exists temporarily while native compile/run verification is in progress.

Do not interpret the source change as a completed product migration yet. Native C++/WinRT compilation is being debugged (WinAppSDK native NuGet closure / WinUI / WebView2 WinMD). Physical Windows focus/input, XAML initialization on the native composition thread, MSIX Runtime, high-DPI and packaged StartupTask need independent checks. The PR must remain Draft until validated, with no automatic fallback to the deleted Win32 Settings UI.

Verification / release safety

The draft PR is not ready for merge until the latest Windows/macOS/Linux Rust checks, Windows GNU target, and WinUI Settings build complete, followed by physical Windows audio, native popup, DPI, notification-area, and MSIX testing.

Do not merge or write directly to main without user approval.

NcaMoq added 22 commits October 15, 2026 09:33
…gs-only host

Revert the incorrect WinUI3 main-window/sidecar migration, restoring the native renderer, popup, history model and BGRA resources from ce5e92c. Preserve earlier controller timestamp, macOS, CI and settings DPI improvements. Respect UI specification section 11.3 and UI-222.
@NcaMoq NcaMoq changed the title Ongoing OpenShazam improvements fix: stabilize native Windows popup and WinUI 3 settings Oct 15, 2026
NcaMoq added 22 commits October 15, 2026 12:27
@NcaMoq NcaMoq closed this Oct 20, 2026
@NcaMoq
NcaMoq deleted the work/ongoing-improvements branch October 20, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant