From 9fc1fdbbbbe9eda0112043b14cc644c1d8b59d4b Mon Sep 17 00:00:00 2001 From: Gabriel Brown Date: Tue, 18 Aug 2026 13:07:23 -0400 Subject: [PATCH] Expose wallpaper health status --- config/dot/quickshell/shell.qml | 17 +++++++++++++++++ tests/quickshell/health-service-contract.sh | 2 ++ 2 files changed, 19 insertions(+) diff --git a/config/dot/quickshell/shell.qml b/config/dot/quickshell/shell.qml index e6e77e3..2fe4a5a 100644 --- a/config/dot/quickshell/shell.qml +++ b/config/dot/quickshell/shell.qml @@ -165,6 +165,23 @@ ShellRoot { function repair(id: string): bool { return Health.repair(id, true); } } + // Health checks the wallpaper service through the same typed IPC boundary + // as capture and clipboard. This is deliberately read-only: choosing an + // image remains an explicit Settings action. + IpcHandler { + target: "wallpaper" + + function refresh(): void { Wallpaper.refreshActive(); } + function status(): string { + return JSON.stringify({ + active: Wallpaper.active, + configured: Wallpaper.configured, + availableCount: Wallpaper.available.length, + lastError: Wallpaper.lastError + }); + } + } + // A small diagnostics surface doubles as a deterministic contract harness. // Real producers call StatusEvents.publish() directly; fixtures never run // unless explicitly requested over IPC by the test suite. diff --git a/tests/quickshell/health-service-contract.sh b/tests/quickshell/health-service-contract.sh index 4482808..b52fba6 100755 --- a/tests/quickshell/health-service-contract.sh +++ b/tests/quickshell/health-service-contract.sh @@ -47,6 +47,8 @@ fail() { [[ -f "$service" ]] || fail 'Health.qml is missing' [[ -f "$source_harness" ]] || fail 'health harness is missing' [[ -f "$shell" ]] || fail 'shell.qml is missing' +rg -q 'target: "wallpaper"' "$shell" \ + || fail 'wallpaper health target is not exported by the shell' # shell.qml is not started here: it is the active desktop shell. Keep this # contract static while pinning the typed, redacted IPC boundary it exports.