oficina / docs Public

Quiet Mac updates, as Calls and Calendar: install automatic, NativeUpdater(policy: .quiet), the one-line notice while an update waits

Human

Prompt

Addition for your Docs branch: make Docs' Mac updates fully quiet like Calls and Calendar — "install": "automatic" in native/mac-updates.json AND `NativeUpdater(policy: .quiet)` in the Mac app, plus the one-line in-window update notice shown only while an update waits (see calendar main a90867e CalendarApp.swift [...]). Note Docs already has 12 languages in its .lproj resources — list exactly those in "localizations".

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

mac-updates.json gains "install": "automatic" (packaging writes SUAutomaticallyUpdate, SUEnableAutomaticChecks, a daily SUScheduledCheckInterval); the app's updater is NativeUpdater(policy: .quiet); the Home window shows NativeUpdateNotice under its content only while canInstallPendingUpdate. localizations already lists exactly the twelve .lproj languages.
Agent notes
Checked with a release-configuration Developer ID build 0.1.8 (10): Info.plist carries the automatic keys and SUBundleName Docs; the launch check passes.
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 59b047b4f7c329b4d8912af05c0f0b81ca059c34 parent 332992f
2 files changed, +16 −2
  • native/apple/Sources/DocsApp/DocsApp.swift +15 −2
  • native/mac-updates.json +1 −0
diff --git a/native/apple/Sources/DocsApp/DocsApp.swift b/native/apple/Sources/DocsApp/DocsApp.swift
index 9ebb74e..8bdf129 100644
--- a/native/apple/Sources/DocsApp/DocsApp.swift
+++ b/native/apple/Sources/DocsApp/DocsApp.swift
@@ -6,7 +6,11 @@ import RastrilloApple
import SwiftUI
@main struct DocsApp: 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
#if os(macOS)
@State private var windows = DocsWindows()
@@ -31,7 +35,16 @@ import SwiftUI
}
var body: some Scene {
#if os(macOS)
- Window(docsMacString("Home"), id: "home") { DocsAccountWindow(oficina: oficina, windows: windows) }
+ Window(docsMacString("Home"), id: "home") {
+ DocsAccountWindow(oficina: oficina, windows: windows)
+ #if canImport(RastrilloMacUpdates)
+ // The quiet updater's one line, only while an update waits: 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
+ }
.defaultSize(width: 1000, height: 760)
.commands {
// First: About, Hide, Quit say "Docs", not the Finder name, and the
diff --git a/native/mac-updates.json b/native/mac-updates.json
index ba689bf..ac2de30 100644
--- a/native/mac-updates.json
+++ b/native/mac-updates.json
@@ -1,5 +1,6 @@
{
"bundle_id": "works.oficina.docs",
+ "install": "automatic",
"url_schemes": [
"works.oficina.docs"
],