aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs/2026-09-15-status-registry-design.md
AgeCommit message (Collapse)AuthorFilesLines
21 hoursfix(status): address final review findingsDanilo M.1-3/+5
F1: after a click the shared Switch writes checked directly, dropping StatusRow's declarative binding, so an external mode change from waybar or statusctl no longer moved the switch. Resync via onValueChanged. F2: the spec claimed hyprctl clients counts idle inhibitors, which is false for a layer-surface inhibitor; replace with the behavioral hypridle marker check. F3: README said the check covers both watch states; it exercises the activated report and the absent-file down report. F4: give breakProc an onExited check so a failed breaktimer.sh verb is visible instead of silent. F5: drop StatusTile's unused required st property and its injection. F6: comment the startup-order limit on dndBeforePresentation.
22 hoursdocs: add the status registry designDanilo M.1-0/+229
Desktop modes as state: do not disturb and presentation mode, with one place that owns them. First of two specs; the notification daemon that replaces dunst is the second and consumes the registry's dnd mode rather than owning it. The registry comes first because DND belongs to the desktop rather than to the notification daemon, and because the daemon is the larger and riskier component. The design that needed deciding was not the toggle but the coupling. Presentation mode sets DND, so DND has two writers, and turning presentation mode off has to restore what the user had rather than clearing it. That rule is why this is a registry and not two booleans. State is one file per mode in XDG_RUNTIME_DIR, matching the convention breaktimer already writes on this machine. That directory is /run/user/1000, a tmpfs, so a reboot clears every mode with no cleanup code. Logout without reboot is less certain and the design does not lean on it: elogind runs here and its pam module documents removing the runtime directory at last logout, but the same manual says the module does nothing when the system was not booted with elogind as init, which on Slackware it is not. If removal does not happen, a mode survives a logout, which is the same behaviour as surviving a shell restart. FileView covers both directions: atomicWrites for the write, watchChanges for the watch, no shell-out. External watchers need close_write,moved_to because an atomic write arrives as a rename, the same trap the mail watcher hit with Xapian. Confirmed while designing: the compositor advertises zwp_idle_inhibit_manager_v1 and waybar's built-in idle_inhibitor already drives it here, so the inhibitor is asserted over Wayland rather than D-Bus. That module is replaced rather than demoted, because it owns its inhibitor object and cannot display state owned by anything else; left alongside the registry it would assert a second inhibitor and idle would resume only when both released. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A7ThHHh5iTYbVfp3rNAkw2