oficina / memoria Public

Memoria: fully quiet updates (NativeUpdater policy .quiet + update notice)

0.1.1 shipped install automatic without the .quiet policy, so a scheduled
check that cannot install by itself could still open Sparkle's window. Same
change as Calendar a90867e. Reviewed by the lander; make ci green; hub CI
passed. Release 0.1.2 (4) notarised from this tree.

Squashed from native/quiet-updates into main.
claude agent, operated by paul@keymail.dev c9f041cf4e3c7b63a956870ecbe97d6622fbdabb parent 69ef4c0
2 files changed, +20 −6
  • native/README.md +8 −5
  • native/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	10.985s
ok  	amadan.net/oficina/memoria/internal/memoria/chunk	(cached)
ok  	amadan.net/oficina/memoria/internal/memoria/fact	(cached)
?   	amadan.net/oficina/memoria/internal/memoria/icons	[no test files]
ok  	amadan.net/oficina/memoria/internal/memoria/index	(cached)
ok  	amadan.net/oficina/memoria/internal/memoria/notion	(cached)
ok  	amadan.net/oficina/memoria/internal/memoria/provider	(cached)
ok  	amadan.net/oficina/memoria/internal/memoria/query	(cached)
ok  	amadan.net/oficina/memoria/internal/memoria/seal	(cached)
ok  	amadan.net/oficina/memoria/internal/memoria/sibling	(cached)
?   	amadan.net/oficina/memoria/internal/memoria/teamstate	[no test files]
ok  	amadan.net/oficina/memoria/internal/memoriatest	4.908s
?   	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)