Memoria: quiet Sparkle updates, NativeUpdater(policy: .quiet) and the in-window notice
Human
Prompt
Small follow-up release for Memoria. Memoria 0.1.1 (3) shipped with "install": "automatic" in native/mac-updates.json but still constructs NativeUpdater() with the default policy. Quiet updates need both (rastrillo tools/mac_updates.py comment; Calendar did this in calendar main a90867e, CalendarApp.swift): use NativeUpdater(policy: .quiet) and add the one-line in-window update notice shown only while an update waits, under #if os(macOS) && canImport(RastrilloMacUpdates). Add a short README note. Commit, make ci, push, wait for hub CI green. Then dry-run release 0.1.2 build 4 from the branch tip (Developer ID sign, notarise, stapled, launches, no Sparkle prompt on launch 2; record at sparkle-worktrees/releases/memoria-0.1.2-4; publisher plan-only check). Do not merge, do not publish.
From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.
Summary
Completes quiet updates on the Mac Sparkle build: mac-updates.json already says install automatic (0.1.1); the updater now uses the .quiet policy, so a scheduled check never opens a window, and the window shows NativeUpdateNotice's one line only while a downloaded update waits. README says both halves are needed.
Agent notes
Same shape as calendar main a90867e. Swift build of MemoriaMac green locally. Next: dry-run release 0.1.2 (4), not published.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+20
−6
native/README.md+8 −5native/apple/Sources/MemoriaApp/MemoriaApp.swift+12 −1
CI passed — run details
CI log
=== vet === go vet ./... go vet -tags browser ./internal/memoriatest/ === fmt === === test === go test ./... ? amadan.net/oficina/memoria/cmd/memoria [no test files] ? amadan.net/oficina/memoria/cmd/memoria-contract [no test files] ok amadan.net/oficina/memoria/internal/memoria 11.288s ok amadan.net/oficina/memoria/internal/memoria/chunk 0.004s ok amadan.net/oficina/memoria/internal/memoria/fact 0.680s ? amadan.net/oficina/memoria/internal/memoria/icons [no test files] ok amadan.net/oficina/memoria/internal/memoria/index 0.055s ok amadan.net/oficina/memoria/internal/memoria/notion 0.028s ok amadan.net/oficina/memoria/internal/memoria/provider 10.642s ok amadan.net/oficina/memoria/internal/memoria/query 0.002s ok amadan.net/oficina/memoria/internal/memoria/seal 0.003s ok amadan.net/oficina/memoria/internal/memoria/sibling 3.030s ? amadan.net/oficina/memoria/internal/memoria/teamstate [no test files] ok amadan.net/oficina/memoria/internal/memoriatest 5.053s ? amadan.net/oficina/memoria/scripts/writeestilo [no test files] ? amadan.net/oficina/memoria/tools/bench [no test files] ? amadan.net/oficina/memoria/tools/drive [no test files] ? amadan.net/oficina/memoria/tools/seed [no test files] ? amadan.net/oficina/memoria/tools/vendorassets [no test files] === migration-check === go tool rastrillo migration check rastrillo migration check: models and migrations agree
diff --git a/native/README.md b/native/README.md| index d140b7c..fcd0b17 100644 |
| --- a/native/README.md |
| +++ b/native/README.md |
| @@ -33,11 +33,14 @@ Sparkle releases: the copy on Paul's Mac is `net.amadan.oficina.memoria` |
| 0.1.0 build 1 with no `SUFeedURL`, so it cannot update itself and needs one |
| manual reinstall. The feed's newest item is build 2, so the next release is |
| build 3 or later, archived as `works.oficina.memoria-<build>.zip`. |
| -`mac-updates.json` sets `"install": "automatic"`, as Calls and Docs do: the |
| -release checks daily, downloads in the background and installs on quit, and |
| -Sparkle never asks whether to check automatically. The code still uses |
| -`NativeUpdater()`'s default policy; moving to `.quiet` with |
| -`NativeUpdateNotice` is the later chrome work. |
| +The Sparkle build updates quietly, as Calls and Calendar do. Quiet needs |
| +both halves: `"install": "automatic"` in `mac-updates.json` writes Sparkle's |
| +automatic check, download and install keys (daily checks, background |
| +download, install on quit, no first-launch question), and |
| +`NativeUpdater(policy: .quiet)` in `MemoriaApp.swift` keeps a scheduled check |
| +from opening a window. While a downloaded update waits, the app menu offers |
| +"Update Ready — Restart Memoria" and the window shows `NativeUpdateNotice`'s |
| +one line. Releases up to 0.1.1 (3) had the keys but the default policy. |
| Build Mac with `native/scripts/build-mac.sh`; build the simulator app with |
| `native/scripts/build-iphone.sh`. For a physical device use |
diff --git a/native/apple/Sources/MemoriaApp/MemoriaApp.swift b/native/apple/Sources/MemoriaApp/MemoriaApp.swift| index d3d7710..0517dba 100644 |
| --- a/native/apple/Sources/MemoriaApp/MemoriaApp.swift |
| +++ b/native/apple/Sources/MemoriaApp/MemoriaApp.swift |
| @@ -7,7 +7,11 @@ import SwiftUI |
| @main struct MemoriaApp: App { |
| #if os(macOS) && canImport(RastrilloMacUpdates) |
| - @State private var updater = NativeUpdater() |
| + // Quiet, as Calls and Calendar: a scheduled check never opens a window; |
| + // an update downloads in the background and installs on quit. Needs |
| + // "install": "automatic" in mac-updates.json too (rastrillo/native |
| + // docs/mac-updates.md). |
| + @State private var updater = NativeUpdater(policy: .quiet) |
| #endif |
| @StateObject private var connection = NativeConnection(defaultServer: "https://memoria.oficina.works") |
| var body: some Scene { |
| @@ -19,6 +23,13 @@ import SwiftUI |
| #if os(macOS) |
| .frame(minWidth: 800, minHeight: 580) |
| #endif |
| + #if os(macOS) && canImport(RastrilloMacUpdates) |
| + // The quiet updater's one line, only while an update is pending: where |
| + // an update that needs the person (automatic downloads off) shows up. |
| + .safeAreaInset(edge: .bottom) { |
| + if updater.canInstallPendingUpdate { NativeUpdateNotice(updater: updater).padding(.bottom, 12) } |
| + } |
| + #endif |
| } |
| #if os(macOS) |
| .defaultSize(width: 1120, height: 780) |