From 76bc1699eeb45d22907a872ee51ee32bcf379516 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 11:13:12 +0200 Subject: docs: set atomicWrites explicitly in the plan's ModeFile Review of the first task caught that the commit message credited atomicWrites while the code never set it. The property is already the documented default in 0.3.1, so the behaviour was right, but statusctl watches close_write,moved_to specifically because an atomic write arrives as a rename, and leaning on a default for something the CLI depends on is weaker than declaring it. Both ModeFile blocks in the plan now set it, so task four does not reintroduce the gap when it adds the second mode. Worth recording: the review asserted atomicWrites defaults to false in 0.3.1 and concluded the shipped writes were not atomic. The v0.3.1 and v0.3.0 documentation both read "If true (default)", so that conclusion was wrong, though the underlying observation about the unset property was right. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01A7ThHHh5iTYbVfp3rNAkw2 --- docs/superpowers/plans/2026-09-15-status-registry.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'docs/superpowers') diff --git a/docs/superpowers/plans/2026-09-15-status-registry.md b/docs/superpowers/plans/2026-09-15-status-registry.md index b598129..3b95743 100644 --- a/docs/superpowers/plans/2026-09-15-status-registry.md +++ b/docs/superpowers/plans/2026-09-15-status-registry.md @@ -4,7 +4,7 @@ **Goal:** A `status` singleton and drawer module owning desktop modes (`dnd`, `presentation`) as files in `$XDG_RUNTIME_DIR`, with a `statusctl` CLI so anything on the system can read, set and watch them. -**Architecture:** One `pragma Singleton` in `shared/Status.qml`, symlinked into `desktop/`, holding a `FileView` per mode with `atomicWrites` and `watchChanges`. Modes are booleans; `presentation` additionally asserts an `IdleInhibitor`, pauses breaktimer through a `Process`, and drives `dnd` while recording the prior value. A thin drawer module renders a tile and a page over the singleton. `~/bin/statusctl` reads and writes the same files directly, so it works when the shell is down. +**Architecture:** One `pragma Singleton` in `shared/Status.qml`, symlinked into `desktop/`, holding a `FileView` per mode with `atomicWrites` and `watchChanges` set explicitly. Modes are booleans; `presentation` additionally asserts an `IdleInhibitor`, pauses breaktimer through a `Process`, and drives `dnd` while recording the prior value. A thin drawer module renders a tile and a page over the singleton. `~/bin/statusctl` reads and writes the same files directly, so it works when the shell is down. **Tech Stack:** Quickshell 0.3.1, Qt6 QML, `Quickshell.Io.FileView`, `Quickshell.Wayland.IdleInhibitor`, bash, `inotifywait` (inotify-tools 4.23.9.0). @@ -169,6 +169,11 @@ Singleton { mf.setText(s); } + // Both are the documented defaults in 0.3.1, set explicitly because + // the CLI depends on them: statusctl watches close_write,moved_to + // precisely because an atomic write lands as a rename, so a future + // release flipping this default would break the watcher silently. + atomicWrites: true watchChanges: true printErrors: false onFileChanged: mf.reload() @@ -651,6 +656,11 @@ Singleton { mf.setText(s); } + // Both are the documented defaults in 0.3.1, set explicitly because + // the CLI depends on them: statusctl watches close_write,moved_to + // precisely because an atomic write lands as a rename, so a future + // release flipping this default would break the watcher silently. + atomicWrites: true watchChanges: true printErrors: false onFileChanged: mf.reload() -- cgit v1.2.3