repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

test(quickshell): add scaffold smoke runner

2897790e3a599f9361a8d2e2be02ff16c7006eff

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (3)

docs/super/inventory/2026-06-17-quickshell-scaffold-smoke-runner-verification.md

Added
new file mode 100644
1 +# Quickshell Scaffold Smoke Runner Verification — 2026-06-17
3 +## Scope
5 +Added a self-contained scaffold smoke runner for the Nugu Quickshell config.
7 +## Implemented files
9 +- `quickshell/nugu/smoke.sh`
10 +- `quickshell/nugu/README.md`
12 +## Design decision
14 +The runner deliberately uses a temporary `XDG_CONFIG_HOME` and symlinks only `quickshell/nugu` into it. That proves the config works as a named Quickshell config without mutating live `~/.config/quickshell` or requiring dorkfiles links to be installed.
16 +By default the runner wraps itself in `dbus-run-session`. This avoids the currently broken live user bus during scaffold checks while preserving Wayland display access. Set `NUGU_QS_NO_DBUS_RUN_SESSION=1` to use the caller's session bus instead.
18 +The runner verifies:
20 +- initial `scaffoldState`
21 +- diagnostics + bar visible after IPC
22 +- light mode switch
23 +- `reloadTheme` returns to live cached dark mode
24 +- `hideAll` closes Quickshell-owned surfaces
25 +- `Configuration Loaded` appears
26 +- common QML error patterns do not appear
27 +- its own `qs` process is cleaned up
29 +It does not touch:
31 +- Ironbar
32 +- Mako
33 +- Hyprland service state
34 +- live Quickshell links
35 +- systemd units
37 +## Command
39 +```sh
40 +quickshell/nugu/smoke.sh
41 +```
43 +## Result
45 +```text
46 +PASS nugu quickshell scaffold smoke
47 +initial={"theme":"dark","diagnostics":false,"bar":false,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
48 +open={"theme":"light","diagnostics":true,"bar":true,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
49 +after_reload=dark
50 +hidden={"theme":"dark","diagnostics":false,"bar":false,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
51 +smoke_exit=0
52 +pgrep -a qs: empty
53 +```
55 +DBus/portal startup warnings from the isolated `dbus-run-session` were present but did not affect the scaffold assertions.
57 +## Boundary after verification
59 +```text
60 +ironbar.service active
61 +ironbar-workspaces.service active
62 +mako.service active
63 +quickshell.service inactive/not-found
64 +```
66 +No Hypr config errors were present.

quickshell/nugu/README.md

Modified
18 18 qs -c nugu
21 +Run the self-contained scaffold smoke without touching live links/services:
23 +```sh
24 +quickshell/nugu/smoke.sh
25 +```
27 +The smoke runner creates a temporary `XDG_CONFIG_HOME`, symlinks only this config
28 +as `quickshell/nugu`, starts `qs -c nugu`, checks diagnostics/theme/hideAll IPC,
29 +and cleans up its own `qs` process.
21 31 Diagnostics:
23 33 ```sh

quickshell/nugu/smoke.sh

Added
new file mode 100755
1 +#!/bin/sh
2 +set -eu
4 +# Run the Nugu Quickshell scaffold through the named-config path without touching
5 +# live ~/.config/quickshell. The temporary XDG_CONFIG_HOME proves the config is
6 +# self-contained: only this directory is symlinked into the test home.
7 +if [ "${NUGU_QS_INSIDE_SMOKE:-}" != 1 ] && [ "${NUGU_QS_NO_DBUS_RUN_SESSION:-}" != 1 ]; then
8 + exec dbus-run-session -- env NUGU_QS_INSIDE_SMOKE=1 "$0" "$@"
9 +fi
11 +config_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
12 +repo_dir=$(CDPATH= cd -- "$config_dir/../.." && pwd -P)
13 +tmp=${TMPDIR:-/tmp}/nugu-qs-smoke.$$
14 +log_out=${NUGU_QS_SMOKE_OUT:-/tmp/nugu-qs-smoke.out}
15 +log_err=${NUGU_QS_SMOKE_ERR:-/tmp/nugu-qs-smoke.err}
16 +qs_pid=
18 +cleanup() {
19 + if [ -n "$qs_pid" ]; then
20 + kill "$qs_pid" 2>/dev/null || true
21 + wait "$qs_pid" 2>/dev/null || true
22 + fi
23 + rm -rf "$tmp"
25 +trap cleanup EXIT INT TERM
27 +fail() {
28 + printf 'FAIL: %s\n' "$1" >&2
29 + printf '--- qs stdout ---\n' >&2
30 + sed -n '1,120p' "$log_out" >&2 2>/dev/null || true
31 + printf '--- qs stderr ---\n' >&2
32 + sed -n '1,120p' "$log_err" >&2 2>/dev/null || true
33 + exit 1
36 +ipc() {
37 + XDG_CONFIG_HOME="$tmp" qs ipc -c nugu call nugu "$@"
40 +assert_contains() {
41 + haystack=$1
42 + needle=$2
43 + label=$3
44 + case "$haystack" in
45 + *"$needle"*) ;;
46 + *) fail "$label missing $needle in $haystack" ;;
47 + esac
50 +mkdir -p "$tmp/quickshell"
51 +ln -s "$config_dir" "$tmp/quickshell/nugu"
52 +: >"$log_out"
53 +: >"$log_err"
55 +cd "$repo_dir"
56 +XDG_CONFIG_HOME="$tmp" QS_NO_RELOAD_POPUP=1 qs -c nugu >"$log_out" 2>"$log_err" &
57 +qs_pid=$!
58 +sleep 4
60 +state_initial=$(ipc scaffoldState)
61 +assert_contains "$state_initial" '"diagnostics":false' initial-state
62 +assert_contains "$state_initial" '"bar":false' initial-state
63 +assert_contains "$state_initial" '"nativeNotifications":false' initial-state
65 +ipc showDiagnostics >/dev/null
66 +ipc showBar >/dev/null
67 +mode_light=$(ipc setThemeMode light)
68 +state_open=$(ipc scaffoldState)
69 +assert_contains "$mode_light" 'light' theme-light
70 +assert_contains "$state_open" '"theme":"light"' open-state
71 +assert_contains "$state_open" '"diagnostics":true' open-state
72 +assert_contains "$state_open" '"bar":true' open-state
73 +assert_contains "$state_open" '"nativeNotifications":false' open-state
75 +ipc reloadTheme >/dev/null
76 +mode_after_reload=$(ipc themeMode)
77 +assert_contains "$mode_after_reload" 'dark' theme-reload
79 +ipc hideAll >/dev/null
80 +state_hidden=$(ipc scaffoldState)
81 +assert_contains "$state_hidden" '"diagnostics":false' hidden-state
82 +assert_contains "$state_hidden" '"bar":false' hidden-state
83 +assert_contains "$state_hidden" '"launcher":false' hidden-state
84 +assert_contains "$state_hidden" '"clipboardPicker":false' hidden-state
85 +assert_contains "$state_hidden" '"powerMenu":false' hidden-state
86 +assert_contains "$state_hidden" '"nativeNotifications":false' hidden-state
88 +if ! grep -q 'Configuration Loaded' "$log_out"; then
89 + fail 'Quickshell did not report Configuration Loaded'
90 +fi
91 +if grep -E 'TypeError|ReferenceError|Syntax|Binding loop|required|failed to create|insufficiently annotated' "$log_out" "$log_err" >/dev/null 2>&1; then
92 + fail 'QML error pattern detected'
93 +fi
95 +printf 'PASS nugu quickshell scaffold smoke\n'
96 +printf 'initial=%s\n' "$state_initial"
97 +printf 'open=%s\n' "$state_open"
98 +printf 'after_reload=%s\n' "$mode_after_reload"
99 +printf 'hidden=%s\n' "$state_hidden"