Expose wallpaper health status
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user