From 5a4fde9914a67e3c2863e5d520c14cd4cbddbd34 Mon Sep 17 00:00:00 2001 From: Flavio Giacchetti Date: Tue, 6 Oct 2026 18:00:06 +0200 Subject: [PATCH 1/2] ui: add validated application icons and readable row states --- CHANGELOG.md | 2 + README.md | 4 +- ROADMAP.md | 4 + docs/design/icons.md | 2 + .../003-icons-that-cannot-crash-the-mixer.md | 48 +++++++ .../qualifying-application-rows.md | 31 ++++ .../development/qualifying-ui-interactions.md | 6 +- docs/development/testing.md | 2 +- .../screenshots/fad-0502-application-icon.png | Bin 0 -> 12109 bytes docs/screenshots/fad-0502-icon-fallback.png | Bin 0 -> 10697 bytes scripts/test-ui-interactions.sh | 33 ++++- scripts/ui-interaction-probe.py | 45 ++++-- src/Fadrio.UI/Controls/ApplicationIcon.cs | 133 ++++++++++++++++++ src/Fadrio.UI/MainWindow.axaml | 20 ++- .../ViewModels/MainWindowViewModel.cs | 31 +++- .../MainWindowViewModelTests.cs | 68 +++++++++ 16 files changed, 402 insertions(+), 27 deletions(-) create mode 100644 docs/dev-diaries/003-icons-that-cannot-crash-the-mixer.md create mode 100644 docs/development/qualifying-application-rows.md create mode 100644 docs/screenshots/fad-0502-application-icon.png create mode 100644 docs/screenshots/fad-0502-icon-fallback.png create mode 100644 src/Fadrio.UI/Controls/ApplicationIcon.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index b81dcd8..98603e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes will be documented here. The format follows [Keep a Changelo ### Added +- `FAD-0502` Application-row slice: asynchronous validated local PNG icons with text fallback, playing/idle/muted state, and accessible mixed-volume help. Output-device controls remain pending. + - `FAD-0202` Secure local PNG icon resolution with trusted XDG roots, bounded caching, and traversal, symlink, malformed-file, and size protections. - `FAD-0203` Flatpak-first canonical identity from bounded sandbox metadata and exported host desktop entries. - `FAD-0204` Optional Snap identity from corroborated wrapper metadata without invoking or depending on Snap tooling. diff --git a/README.md b/README.md index 4336ad5..ddd70ff 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,9 @@ dotnet run --project src/Fadrio.Cli -- profile clear xdg:firefox The override appears in subsequent `apps` output while the canonical ID remains unchanged. -Launch the in-development mixer with `dotnet run --project src/Fadrio.UI`. Its application rows reflect the live PipeWire snapshot and use the same application-wide volume/mute command path as the CLI. Output-device controls, icons, tray behavior, and UI polish remain on the roadmap. +Launch the in-development mixer with `dotnet run --project src/Fadrio.UI`. Its application rows reflect the live PipeWire snapshot and use the same application-wide volume/mute command path as the CLI. Application rows load validated local PNG icons asynchronously, fall back to an initial when artwork is missing or invalid, and show playback/mute state. Mixed-volume controls explain that an adjustment sets every owned stream to the same level. Output-device controls, tray behavior, and UI polish remain on the roadmap. + +[See the current application-row screenshot](docs/screenshots/fad-0502-application-icon.png), captured with an isolated silent fixture and the normal host fonts. [See the first live-row screenshot](docs/screenshots/fad-0501-live-fixture.png), captured with a controlled, silent PipeWire fixture rather than a user's applications. diff --git a/ROADMAP.md b/ROADMAP.md index 8413e22..7d2cc50 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -181,6 +181,10 @@ Canonical ticket format: - [x] `FAD-0501` `P0` Connect immutable mixer snapshots and commands to the Avalonia view models. - [ ] `FAD-0502` `P1` Build accessible output and logical-application rows with mixed-volume state. + - Status: In progress + - Scope: Validated asynchronous local application icons, readable fallback/activity states, and mixed-volume help are the current application-row slice. Output-device rows remain pending. + - Acceptance: Accessible logical-application and output rows, verified mixed-volume behavior, local icon fallback, and rendered keyboard/mouse checks. + - Evidence: `docs/development/qualifying-application-rows.md`; this slice does not complete output control or REL-00006. - [x] `FAD-0503` `P1` Add stable sorting, interaction freeze, empty, unavailable, and reconnect states. - Scope: Deterministic active-row ordering and pointer/keyboard interaction freeze; connected-empty versus unavailable states and reconnect-safe commands. Persistent pinned/inactive rows remain FAD-0303. - Acceptance: Rows are reused, structural changes wait until gesture end, removed targets disable immediately, queued commands are discarded on disconnect, and rendered controls recover after an isolated daemon restart. diff --git a/docs/design/icons.md b/docs/design/icons.md index 650fe94..880fa41 100644 --- a/docs/design/icons.md +++ b/docs/design/icons.md @@ -5,3 +5,5 @@ Icon resolution order is user override, desktop entry, PipeWire icon name, local Bundled icons require editable source and known licensing. Runtime-resolved installed icons are not automatically redistributable repository assets. Cap file size and dimensions, allow only supported local formats, and never download icons from the network in v1. The current local resolver accepts PNG files only. It searches configured XDG icon roots with a bounded, deterministic traversal, rejects URLs and paths outside those trusted roots (including symlink escapes), and validates the PNG signature and dimensions before copying it. Cached files live under `$XDG_CACHE_HOME/fadrio/icons/`, are keyed by source path plus modification signature, and are pruned by both entry count and total bytes. Vector decoding and rasterization remain out of scope until they can use a reviewed decoder. + +The application UI loads these validated PNGs on background workers, limits parallel loads to two, and decodes thumbnails with both dimensions bounded by 64 pixels. Missing or undecodable artwork shows the first Unicode text element of the application name. Detached rows cancel obsolete loads and dispose their bitmaps. SVG-only installed icons use the fallback. diff --git a/docs/dev-diaries/003-icons-that-cannot-crash-the-mixer.md b/docs/dev-diaries/003-icons-that-cannot-crash-the-mixer.md new file mode 100644 index 0000000..76e5edb --- /dev/null +++ b/docs/dev-diaries/003-icons-that-cannot-crash-the-mixer.md @@ -0,0 +1,48 @@ +> Status: Draft; not published. +> Suggested community: r/Fadrio; flair: Development Update. +> Website slug: fadrio-dev-diary-03-icons-that-cannot-crash-the-mixer +> Image: docs/screenshots/fad-0502-application-icon.png (actual isolated silent fixture). + +# Fadrio Dev Diary #3 — An icon should not be able to crash a mixer + +Fadrio is the Linux application mixer I want to use myself: one recognizable application, one slider, and one mute action, even when that application owns several playback streams. This update makes those rows easier to recognize. It also found a surprisingly enthusiastic failure mode for a tiny PNG. + +## From identity to something you can recognize + +The resolver already knew where to find trusted local application icons. The window now actually uses them. Each row loads its validated PNG in the background, shows the application name beside it, and falls back to a readable initial when the artwork is missing or invalid. + +The loading path keeps the existing rules: local XDG roots only, bounded file sizes and dimensions, a bounded disk cache, and no downloading. Only two searches/decodes run at once. The decoded thumbnail fits inside 64 × 64 pixels, including unusually tall or wide images. When a row disappears or its icon changes, obsolete work is canceled and replaced bitmaps are disposed. + +There is a deliberate limitation here: this path currently supports PNG. An installed application with only an SVG icon gets the fallback. A missing icon should be a small visual inconvenience, not a reason to make the audio controls disappear. + +## The PNG that had a header and very little ambition + +For the rendered regression check, I copied the first 24 bytes of a valid PNG and left out the actual image data. The existing resolver accepted the signature and dimensions. Avalonia.Skia 12.1.2 then attempted to use a null codec and threw a `NullReferenceException`. + +That originally took down the window. The UI now contains that specific decoder failure at the decode boundary and displays the initial instead. The real desktop check then drags the slider and toggles mute on the same fixture. This is why I want visual tests alongside unit tests: a plausible image header and a working mixer are different achievements. + +The icon has been relieved of its responsibilities as application supervisor. + +## What “mixed” means when one application has several streams + +The row also shows a textual playback/mute state. `Playing` comes from the existing stream activity state; it is not a new signal meter. `Muted` does not depend on spotting a different color. + +For multiple streams with different levels, the row retains the mixed-volume label. The tooltip and accessibility help now explain the action: moving the slider sets **every owned stream to the same level**. It does not silently preserve a ratio or invent a separate routing policy. Backend refreshes still reuse the same row objects, and an active gesture keeps its position while other applications change. + +## What I actually checked + +The local build passes **109 managed tests**, including 23 UI cases, plus two native tests, six Python roadmap/synchronization tests, and the isolated PipeWire integration scenario. Formatting and roadmap checks also pass. + +In the actual 360 × 680 Avalonia window on this GNOME Wayland desktop through XWayland, the isolated silent fixture reaches 37% with a drag and 10% with Home plus ten Right keys. The mute button works. The controls remain usable after the damaged icon, and work again after stopping the private PipeWire daemon during a drag and restarting it. + +The screenshot shows that controlled fixture and Fadrio's own icon. It is not a mockup or somebody's private application list. + +Normal host-font startup also reached the window today. The previous startup stall did not reproduce, so I am keeping that investigation open rather than pretending to have found its cause. No host fonts were removed or restricted. + +## Still an alpha, still development work + +This is an application-row slice in FAD-0502. Output-device controls, tray/single-instance behavior, pinned/inactive rows and durable volume policies still need work. The broader KDE, native Wayland, scaling and screen-reader qualification matrix remains open. There is no new supported binary release from this change. + +The implementation is under review; this diary is a draft for the website and Reddit, not a release announcement. + +For a daily mixer, which missing behavior would you prioritize next: remembered application levels, pinned controls for applications that are currently silent, or quick access from the tray? diff --git a/docs/development/qualifying-application-rows.md b/docs/development/qualifying-application-rows.md new file mode 100644 index 0000000..9a67c12 --- /dev/null +++ b/docs/development/qualifying-application-rows.md @@ -0,0 +1,31 @@ +# FAD-0502 application-row slice + +Recorded on 2026-10-06 on the local GNOME Wayland desktop through XWayland. This is application-row progress; output-device controls and the REL-00006 desktop matrix remain open. + +## Behavior + +Rows display the resolved identity's local PNG icon, or the first Unicode text element of the application name when artwork is missing, rejected, or undecodable. The existing local resolver enforces trusted XDG roots, source/dimension limits, and bounded disk caching. No network access or SVG decoder is added. Two concurrent background loads are allowed; decoded thumbnails fit within 64 x 64 pixels. Reference changes and row detachment cancel obsolete loads, clear the old image, and dispose replaced or stale bitmaps. Backend snapshots do not wait for artwork. + +The fallback adds no tab stop; application name, slider and mute remain the usable controls. Long names have a tooltip. Mixed-volume help is available both as a tooltip and automation help text: a slider adjustment sets every owned stream to the same level. Playing/Idle reflects the existing backend stream state, not measured signal amplitude; Muted is explicit text. Screen-reader conformance remains unqualified. + +A header-only PNG passed the resolver's header check but caused Avalonia.Skia 12.1.2 to dereference a null codec in `ImmutableBitmap`. The UI contains that specific exception at the decode boundary, uses the text fallback, and keeps the row usable. The desktop harness retains this real malformed-input regression; it is not a synthetic claim that all image decoders are safe. + +## Local validation + +- `FADRIO_RUN_PIPEWIRE_INTEGRATION=1 ./scripts/test.sh`: 109 managed tests, two native tests, and isolated PipeWire integration passed. +- Seven additional UI cases cover icon/reference refresh on a reused row, Unicode fallback, activity/mute state, and mixed-volume explanation after adjustment. The UI suite has 23 cases. +- Six Python roadmap/synchronization tests, roadmap audit, formatting verification, and whitespace check passed. +- `./scripts/test-ui-interactions.sh` with default `FADRIO_UI_FONT_MODE=host`: rendered icon, 37% drag, Home + ten Right keys to 10%, mute, usable controls after a header-only icon, disconnect during drag, and controls after isolated daemon restart. +- The native bridge and Core dependencies are unchanged. No ordinary host audio is modified by the harness. + +![Validated fixture icon](../screenshots/fad-0502-application-icon.png) + +![Malformed-icon fallback](../screenshots/fad-0502-icon-fallback.png) + +The screenshots show the actual 360 x 680 Avalonia window with a silent, controlled `Fadrio Fixture` stream and the project's own licensed icon, not third-party application artwork or a design mockup. + +## Startup observation and limits + +The normal host-font configuration reached the mixer in the bounded local checks; the retained harness records whole-second window readiness in `startup.txt`. There are 2,773 entries in this host's current `fc-list` output. No fonts or host caches were removed or restricted. The old BUG-00004 stall did not reproduce, so its original root cause remains unknown and the ticket stays open. Rider could list configurations but reported that its debug launch did not start; the direct window/trace and harness are the runtime evidence here. + +The harness locates the slider from its actual rendered track with Python Pillow, rather than assuming fixed font metrics. It polls observed backend state with a bounded timeout after asynchronous commands. The harness defaults to inherited host fonts. `FADRIO_UI_FONT_MODE=fixture` is an explicit process-local alternative for fixture diagnosis. A screenshot/control result is not KDE, native Wayland, fractional scaling, packaged installation, or long-running qualification. PNG-only loading means some installed SVG-only icons use the fallback. Unchanged references are loaded on attach/reference change; file watching for already displayed artwork is not implemented in this slice. diff --git a/docs/development/qualifying-ui-interactions.md b/docs/development/qualifying-ui-interactions.md index 2068f0b..d337f18 100644 --- a/docs/development/qualifying-ui-interactions.md +++ b/docs/development/qualifying-ui-interactions.md @@ -33,12 +33,12 @@ After a normal local build, close other Fadrio windows and run: ./scripts/test-ui-interactions.sh ``` -This optional developer harness requires an X11/XWayland display, DejaVu fonts, X11/XTest libraries, `xwininfo`, `xprop`, `ffmpeg`, PipeWire tools, Python and .NET. It injects mouse/keyboard events into the exact Fadrio window whose process ownership it verifies. Do not interact with the desktop while it runs. It restores the prior pointer/focus and terminates only its owned processes. Its private runtime/data/cache directory is retained with logs and screenshots; the path is printed at exit. It is not part of headless CI or the supported-desktop matrix. +This optional developer harness requires an X11/XWayland display, DejaVu fonts, X11/XTest libraries, `xwininfo`, `xprop`, `ffmpeg`, PipeWire tools, Python with Pillow and .NET. It injects mouse/keyboard events into the exact Fadrio window whose process ownership it verifies. Do not interact with the desktop while it runs. It restores the prior pointer/focus and terminates only its owned processes. Its private runtime/data/cache directory is retained with logs and screenshots; the path is printed at exit. It is not part of headless CI or the supported-desktop matrix. -The fixture intentionally sets a process-local minimal Fontconfig configuration. It does not change host fonts or ship a restricted-font workaround in the app. +The harness now defaults to the inherited host Fontconfig configuration. Set `FADRIO_UI_FONT_MODE=fixture` explicitly for the process-local minimal font fixture. It never changes host fonts. Current evidence is in [qualifying-application-rows.md](qualifying-application-rows.md). ## Open qualification limits -- `BUG-00004`: normal launch with this host's full Fontconfig configuration stalled before `App.Initialize`, consuming a CPU core. The startup trace showed font/cache enumeration. A restricted process-local DejaVu configuration allowed the window to open; a software-rendering attempt did not resolve normal startup. This isolates a useful investigation path, not a proven upstream cause or a production fix. Default host-font startup is unqualified. +- Historical `BUG-00004` observation (2026-09-27): normal launch with this host's full Fontconfig configuration stalled before `App.Initialize`, consuming a CPU core. The startup trace showed font/cache enumeration. A restricted process-local DejaVu configuration allowed the window to open; a software-rendering attempt did not resolve normal startup. This isolates a useful investigation path, not a proven upstream cause or a production fix. Default host-font startup is unqualified. - The checks above are XWayland, not native Wayland, KDE, screen-reader, fractional-scaling, packaged installation or long-running qualification. Those gates remain open. - Output control, icons, persistence of pinned/inactive rows, tray integration and localization are still later roadmap work. No new release is justified by this slice alone. diff --git a/docs/development/testing.md b/docs/development/testing.md index e26faf3..9429de4 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -15,4 +15,4 @@ The opt-in isolated PipeWire test is enabled with `FADRIO_RUN_PIPEWIRE_INTEGRATI Browser qualification evidence and its reproducible checklist are documented in [qualifying-browser.md](qualifying-browser.md). PipeWire restart and command-recovery evidence is documented in [qualifying-reconnect.md](qualifying-reconnect.md). Native ownership and sanitizer coverage is documented in [native-sanitizers.md](native-sanitizers.md). -Rendered mixer gesture/reconnect evidence and the opt-in desktop test are documented in [qualifying-ui-interactions.md](qualifying-ui-interactions.md). That check uses process-local fixture fonts; it does not qualify the separately tracked full-host-font startup issue. +Rendered mixer gesture/reconnect evidence and the opt-in desktop test are documented in [qualifying-ui-interactions.md](qualifying-ui-interactions.md). That check now defaults to host fonts and covers malformed application-icon fallback; see [the current row qualification](qualifying-application-rows.md). The original font-startup cause and the wider desktop matrix remain open. diff --git a/docs/screenshots/fad-0502-application-icon.png b/docs/screenshots/fad-0502-application-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5f6466646bf7913744285e34dd9e171904dc9fb2 GIT binary patch literal 12109 zcmeHtXHZmKmo6$nQX?X{0TBU}B)Q2dp_M3-V@pl~P0qA{0)jS@Gf2)fIW(~)XUVal z$w_jKJ@~%g%$>PaGhf}BTQzm7?)lMYpS|}vdxd?T^{jRJ%UfkIDG?nJ4h|0Ko7Xb$ zaByx};^5rQy?gtnXEbQP;O0aKeXZkkbN+MO!ujMueRFXS=Z(xub@!w#w2!;`Xxh%6 z2=><#1oMj*FPN=Ebw#Fj-TOvONLY_wWWJL($wGmDh6m65NJ1?LuvUq`WPSIVHIj%Q zD)u^#O;J&l%dMOM?+5}M5~!2w#!_N?dzJYp4E4zyQ!P>i z%1@@e5IXTkiIroF`KZ5T`ak(?)-W+>7|*dPHn_LLdr&>*)v7wXf;<{Vn4)nG2WFBSD;bH^TfI!tW(9XYDhPcK2p}hT{=$U-d@!w{VJ{>3Y@7@Eff^Zy z!Fm4tvww>o#9Nj}T?UGy^{pnrWQ5a1M+5D(ZO-elHUg-@SotD~y+;di4JOxnid;HO zU+VM@&(zEz4~zYg#7InMp`%UW%=A#}OFXfSnLa~=xJSm(v?FYA8dWmcAh1tFIGkFJ zoF&w3=ipu_p0gD+H-xj@x~EW&D(#${>3J1g?Qn3p8&N(s?jh=um9R-aa6|{3tuD#} ziyP$>o*+IS-v_$U&q2Ms3VZO}MxERs{VTVAMb?0UF+Fo_SXA zjh!1pAMCphPVAN$HxF4r1!A(+d45Sl#Wg8=3EW1>9ucX`P0>s^^~*ZqXsOqu!oM3;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Ga*6%YNPzZ=B*)L)S3 zq)L;b7PslRy8y|7IxBL@G%k1~4J%*E;0YfPyBYRK*A zb%4^YGg0TcEP4PLZm;^LpeyXS0VBz}J8Q;_=xRlDXid18KRUv^!Rwj@K3L_LY_?}i zoBtZ0_6f&1TJ?4`IJ+0b;WrUh6aj>QQd6k`UD}*L_cdp`W7guiZ6NOw$3q}}*ZiO6 z2mX5pgV)q|qA9{TC}*@>4?DZt9XO)po9_jR`n6t%`nGB5*IgWmJD*isYAUquUS*c` zO1e-Sv&MKFOH)Q~S{j7BAV`YYakM){vhWD?f*%jhe@$^;I!MaG*x8+0dQQ3G`ieuy z!N4gC$BJnz+xfwfnIWKkT@lIwn_se#dTV!+8wK@&ESGr$4(nVDO}~QcFR7w)Gh*lO z=91r|NA_jNN()Jzz_M75>w;{Icy0O0g(UR_7;XZ}7hbPrcTgoYiNQ~=&g(+oe^EGZ z^F25iXFdqoD*bDW4ASy9S?gsuLaVAYV@#Tu;N6>2zFdLuHus}Nao_PF@vPaZk;Svs zp4x|o6mHwKy*#%mqcm{25t#!3jjWxxGP+K`3uwSNc>tc~qgbT&rfmDs5D4wHcR)## z^`d9j*~=C`W|p1M+LWHk+?``1#Xi3vzr%;ly$?GRJFuZLz+Dg_$u7tLOW*guJm{fo z=Re^zgMX_ZsZaGN4_78tl{cP-UAGeiR}$|^|BX%mdv%?`VCwVSGY#)0=$}IUaJzc2 z*o7W%BTVCOmF4d4t}99Q!9$Tp4;OfK^3}9Z{CFexGITvP$U~<{gQQDc{aA z6|{b-upiAYa$&k&`mLVad7`KvJ?4-ZH;0~2!V xBx>CyXEeOb`$mcQKW$(9{|Enlcc5_p=GK-VyOSH8x6EHIRFpIn%U-/dev/null 2>&1 || { echo "Missing $command" >&2; exit 77; } done +python3 -c 'from PIL import Image' >/dev/null 2>&1 || { echo 'Python Pillow is required for rendered slider location.' >&2; exit 77; } [[ -n "${DISPLAY:-}" ]] || { echo 'An X11/XWayland display is required.' >&2; exit 77; } if xwininfo -root -tree | rg '"Fadrio"' >/dev/null; then echo 'Close the existing Fadrio test window before running.' >&2 @@ -27,7 +28,14 @@ export PIPEWIRE_RUNTIME_DIR="$fadrio_fixture_dir" export PIPEWIRE_REMOTE=pipewire-0 export XDG_DATA_HOME="$fadrio_fixture_dir/share" export XDG_CACHE_HOME="$fadrio_fixture_dir/cache" -export FONTCONFIG_FILE="$repository_root/tests/fixtures/fonts/ui-test-fontconfig.conf" +case "${FADRIO_UI_FONT_MODE:-host}" in + host) ;; + fixture) export FONTCONFIG_FILE="$repository_root/tests/fixtures/fonts/ui-test-fontconfig.conf" ;; + *) echo 'FADRIO_UI_FONT_MODE must be host or fixture.' >&2; exit 2 ;; +esac +printf 'font_mode=%s\n' "${FADRIO_UI_FONT_MODE:-host}" >"$fadrio_fixture_dir/startup.txt" +mkdir -p "$XDG_DATA_HOME/icons" +cp "$repository_root/assets/branding/raster/fadrio-app-icon-monochrome.png" "$XDG_DATA_HOME/icons/fadrio-fixture.png" export LD_LIBRARY_PATH="$PWD/build/native" pipewire -c "$PWD/tests/fixtures/pipewire/fadrio-test.conf" >"$fadrio_fixture_dir/pipewire.log" 2>&1 & fadrio_fixture_pipewire_pid=$! @@ -37,26 +45,43 @@ for _ in {1..100}; do done [[ -S "$fadrio_fixture_dir/pipewire-0" ]] pw-cat --playback --target 0 --rate 48000 --channels 2 --format s16 \ - -P '{ application.name = "Fadrio Fixture" application.id = "dev.fglabs.Fadrio.UiFixture" }' \ + -P '{ application.name = "Fadrio Fixture" application.id = "dev.fglabs.Fadrio.UiFixture" application.icon-name = "fadrio-fixture" }' \ - "$fadrio_fixture_dir/stream.log" 2>&1 & fadrio_fixture_stream_pid=$! +fadrio_fixture_started=$SECONDS env -u WAYLAND_DISPLAY dotnet "$PWD/src/Fadrio.UI/bin/Debug/net10.0/fadrio.dll" >"$fadrio_fixture_dir/ui.log" 2>&1 & fadrio_fixture_ui_pid=$! fadrio_fixture_window="" -for _ in {1..100}; do +for _ in {1..300}; do fadrio_fixture_window=$(xwininfo -root -tree | awk '/"Fadrio"/ && !/mutter/ {if (!found) print $1; found=1}') [[ -n "$fadrio_fixture_window" ]] && break sleep .1 done [[ -n "$fadrio_fixture_window" ]] +printf 'window_ready_seconds=%s\n' "$((SECONDS - fadrio_fixture_started))" >>"$fadrio_fixture_dir/startup.txt" xprop -id "$fadrio_fixture_window" _NET_WM_PID | rg -F "= $fadrio_fixture_ui_pid" >/dev/null sleep 1 ffmpeg -hide_banner -loglevel error -f x11grab -window_id "$fadrio_fixture_window" \ -video_size 360x680 -i "$DISPLAY" -frames:v 1 "$fadrio_fixture_dir/before.png" +export FADRIO_UI_REFERENCE_CAPTURE="$fadrio_fixture_dir/before.png" python3 "$repository_root/scripts/ui-interaction-probe.py" "$fadrio_fixture_window" "$PWD" ffmpeg -hide_banner -loglevel error -f x11grab -window_id "$fadrio_fixture_window" \ -video_size 360x680 -i "$DISPLAY" -frames:v 1 "$fadrio_fixture_dir/mixer.png" kill -0 "$fadrio_fixture_ui_pid" +kill "$fadrio_fixture_stream_pid" +wait "$fadrio_fixture_stream_pid" 2>/dev/null || true +fadrio_fixture_stream_pid="" +# A plausible PNG header with no pixel data must not break a mixer row. +head -c 24 "$XDG_DATA_HOME/icons/fadrio-fixture.png" >"$XDG_DATA_HOME/icons/fadrio-broken.png" +pw-cat --playback --target 0 --rate 48000 --channels 2 --format s16 \ + -P '{ application.name = "Fadrio Fixture" application.id = "dev.fglabs.Fadrio.UiFixture" application.icon-name = "fadrio-broken" }' \ + - >"$fadrio_fixture_dir/stream.log" 2>&1 & +fadrio_fixture_stream_pid=$! +sleep 2 +python3 "$repository_root/scripts/ui-interaction-probe.py" "$fadrio_fixture_window" "$PWD" +ffmpeg -hide_banner -loglevel error -f x11grab -window_id "$fadrio_fixture_window" \ + -video_size 360x680 -i "$DISPLAY" -frames:v 1 "$fadrio_fixture_dir/broken-icon.png" +kill -0 "$fadrio_fixture_ui_pid" python3 "$repository_root/scripts/ui-interaction-probe.py" "$fadrio_fixture_window" "$PWD" "$fadrio_fixture_pipewire_pid" wait "$fadrio_fixture_pipewire_pid" 2>/dev/null || true fadrio_fixture_pipewire_pid="" @@ -75,7 +100,7 @@ sleep 3 ffmpeg -hide_banner -loglevel error -f x11grab -window_id "$fadrio_fixture_window" \ -video_size 360x680 -i "$DISPLAY" -frames:v 1 "$fadrio_fixture_dir/empty.png" pw-cat --playback --target 0 --rate 48000 --channels 2 --format s16 \ - -P '{ application.name = "Fadrio Fixture" application.id = "dev.fglabs.Fadrio.UiFixture" }' \ + -P '{ application.name = "Fadrio Fixture" application.id = "dev.fglabs.Fadrio.UiFixture" application.icon-name = "fadrio-fixture" }' \ - >"$fadrio_fixture_dir/stream.log" 2>&1 & fadrio_fixture_stream_pid=$! sleep 2 diff --git a/scripts/ui-interaction-probe.py b/scripts/ui-interaction-probe.py index 5512350..569aaf4 100644 --- a/scripts/ui-interaction-probe.py +++ b/scripts/ui-interaction-probe.py @@ -5,9 +5,22 @@ import subprocess import sys import time +from PIL import Image window = int(sys.argv[1], 16) root_path = sys.argv[2] +with Image.open(os.environ['FADRIO_UI_REFERENCE_CAPTURE']).convert('RGB') as capture: + # Locate the long blue slider track in the actual rendering. Font metrics + # can move the row; fixed Y coordinates gave false results with host fonts. + candidates = [] + for py in range(capture.height): + count = sum(1 for px in range(30, capture.width - 30) + if (lambda rgb: rgb[2] > rgb[0] + 60 and rgb[1] > rgb[0] + 30)(capture.getpixel((px, py)))) + if count > 150: + candidates.append(py) + assert candidates, 'No rendered slider track found' + slider_y = candidates[len(candidates) // 2] +mute_y = slider_y + 48 x = c.CDLL('libX11.so.6') t = c.CDLL('libXtst.so.6') x.XOpenDisplay.restype = c.c_void_p @@ -60,6 +73,16 @@ def state(): assert 'Application: Fadrio Fixture' in output, output return int(re.search(r'Volume: (\d+)%', output)[1]), 'Muted: true' in output +def wait_state(predicate): + # UI commands run on a worker and PipeWire reports them asynchronously. + deadline = time.monotonic() + 10 + observed = state() + while not predicate(observed) and time.monotonic() < deadline: + time.sleep(.1) + observed = state() + assert predicate(observed), observed + return observed + try: x.XRaiseWindow(d, window) x.XSetInputFocus(d, window, 2, 0) @@ -68,22 +91,21 @@ def state(): x.XTranslateCoordinates(d, window, root, 0, 0, c.byref(origin_x), c.byref(origin_y), c.byref(child)) if len(sys.argv) > 3: # The shell passes only its own isolated daemon PID. - move(73, 281) + move(73, slider_y) button(1) - move(100, 281) + move(100, slider_y) os.kill(int(sys.argv[3]), signal.SIGTERM) time.sleep(1) - move(146, 281) + move(146, slider_y) button(0) print('Disconnected the isolated daemon during an active drag', flush=True) sys.exit(0) - assert state()[0] == 100 - move(314, 281) + wait_state(lambda observed: observed[0] == 100) + move(314, slider_y) button(1) - for px in [290, 265, 240, 215, 190, 165, 146]: move(px, 281) + for px in [290, 265, 240, 215, 190, 165, 146]: move(px, slider_y) button(0) - volume, muted = state() - assert 35 <= volume <= 45, (volume, muted) + volume, muted = wait_state(lambda observed: 35 <= observed[0] <= 45) print('Rendered slider drag reached', volume, 'percent', flush=True) # Reassert focus after the separate CLI probe; the desktop may redirect it. x.XSetInputFocus(d, window, 2, 0) @@ -91,13 +113,12 @@ def state(): time.sleep(.15) key('Home') for _ in range(10): key('Right') - volume, muted = state() - assert volume == 10, (volume, muted) + volume, muted = wait_state(lambda observed: observed[0] == 10) print('Keyboard Home + ten Right keys reached 10 percent', flush=True) - move(62, 327) + move(62, mute_y) button(1) button(0) - assert state()[1] + wait_state(lambda observed: observed[1]) print('Rendered mute button muted the isolated stream', flush=True) finally: t.XTestFakeButtonEvent(d, 1, 0, 0) diff --git a/src/Fadrio.UI/Controls/ApplicationIcon.cs b/src/Fadrio.UI/Controls/ApplicationIcon.cs new file mode 100644 index 0000000..7ed3098 --- /dev/null +++ b/src/Fadrio.UI/Controls/ApplicationIcon.cs @@ -0,0 +1,133 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Media; +using Avalonia.Media.Imaging; +using Fadrio.Core; +using Fadrio.Infrastructure; + +namespace Fadrio.UI.Controls; + +/// Loads only validated local icons, without blocking the dispatcher. +public sealed class ApplicationIcon : UserControl +{ + public static readonly StyledProperty ReferenceProperty = + AvaloniaProperty.Register(nameof(Reference)); + public static readonly StyledProperty FallbackProperty = + AvaloniaProperty.Register(nameof(Fallback), "?"); + + private static readonly LocalIconResolver Resolver = new(); + // Bound simultaneous icon-tree searches and decodes across all rows. + private static readonly SemaphoreSlim LoadGate = new(2); + private readonly Image _image = new() { Stretch = Stretch.Uniform }; + private readonly TextBlock _fallback = new() + { + FontSize = 16, + HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center, + VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center + }; + private CancellationTokenSource? _request; + private Bitmap? _bitmap; + private bool _attached; + + public ApplicationIcon() + { + IsHitTestVisible = false; + Content = new Grid { Children = { _fallback, _image } }; + } + + public IconReference? Reference + { + get => GetValue(ReferenceProperty); + set => SetValue(ReferenceProperty, value); + } + + public string Fallback + { + get => GetValue(FallbackProperty); + set => SetValue(FallbackProperty, value); + } + + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + if (change.Property == FallbackProperty) _fallback.Text = Fallback; + if (change.Property == ReferenceProperty && _attached) Reload(); + } + + protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) + { + base.OnAttachedToVisualTree(e); + _attached = true; + _fallback.Text = Fallback; + Reload(); + } + + protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e) + { + _attached = false; + Clear(); + base.OnDetachedFromVisualTree(e); + } + + private void Clear() + { + _request?.Cancel(); + _request = null; + _image.Source = null; + _bitmap?.Dispose(); + _bitmap = null; + _fallback.IsVisible = true; + } + + private async void Reload() + { + Clear(); + if (Reference is not { } reference) return; + using var request = new CancellationTokenSource(); + _request = request; + Bitmap? loaded = null; + try + { + loaded = await Task.Run(async () => + { + await LoadGate.WaitAsync(request.Token).ConfigureAwait(false); + try + { + var resolved = await Resolver.ResolveAsync(reference, request.Token).ConfigureAwait(false); + if (resolved is null) return null; + request.Token.ThrowIfCancellationRequested(); + using FileStream stream = File.OpenRead(resolved.Path); + // Bound both dimensions, including extremely tall or wide PNGs. + try + { + return resolved.Width >= resolved.Height + ? Bitmap.DecodeToWidth(stream, 64) + : Bitmap.DecodeToHeight(stream, 64); + } + catch (NullReferenceException) + { + // Avalonia.Skia 12.1.2 dereferences a null codec for a + // header-only PNG. Contain that decoder failure here. + return null; + } + } + finally { LoadGate.Release(); } + }, request.Token); + if (request.IsCancellationRequested || !_attached || !ReferenceEquals(_request, request)) return; + _bitmap = loaded; + loaded = null; + _image.Source = _bitmap; + _fallback.IsVisible = _bitmap is null; + } + catch (Exception exception) when (exception is IOException or UnauthorizedAccessException + or ArgumentException or InvalidOperationException or NotSupportedException or OperationCanceledException) + { + // Missing, changing, or undecodable artwork is a normal fallback condition. + } + finally + { + loaded?.Dispose(); + if (ReferenceEquals(_request, request)) _request = null; + } + } +} diff --git a/src/Fadrio.UI/MainWindow.axaml b/src/Fadrio.UI/MainWindow.axaml index b4513e3..0fce288 100644 --- a/src/Fadrio.UI/MainWindow.axaml +++ b/src/Fadrio.UI/MainWindow.axaml @@ -26,16 +26,26 @@ - - - + + + + -