Publishes the revisions of your pages as a feed, with notes and readable diffs, written in Go
Show retract, amend and snapshot on a running serve without a restart
serve rebuilt its output only after a scan found a changed file, so
edits made by another patchwork process (retract, amend, snapshot)
waited for the next upload or a restart. serve now polls SQLite's
data_version every 3 seconds; it moves only when another connection
commits, so serve's own writes don't trigger it and an idle site
doesn't rebuild. Rebuilds are serialized.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -1,5 +1,11 @@ # Changelog
+## 0.1.1 (2026-10-24)
+
+### Fixed
+
+- `retract`, `amend` and `snapshot` run from the command line now show up on a running `serve` within a few seconds. Before, `serve` rebuilt its output only after a content file changed, so these edits waited for the next upload or a restart. `serve` now checks SQLite's `data_version` every 3 seconds, a negligible query, and rebuilds only when another process has committed.
+
## 0.1.0 (2026-10-24)
First release, running on [moonflowersociety.org](https://moonflowersociety.org).
@@ -99,6 +99,15 @@ } return tx.Commit()
}
+// DataVersion changes whenever another connection commits to the database,
+// such as a `patchwork retract` run while `serve` is up. It does not change
+// for this store's own writes. A cheap query: poll it to notice outside edits.
+func (s *Store) DataVersion(ctx context.Context) (int64, error) {
+ var v int64
+ err := s.db.QueryRowContext(ctx, `PRAGMA data_version`).Scan(&v)
+ return v, err
+}
+
// Backup writes a consistent copy of the database to path.
func (s *Store) Backup(ctx context.Context, path string) error {
if _, err := os.Stat(path); err == nil {