oficina / sheets Public

Quiet updater, as Calls and Calendar: NativeUpdater(policy: .quiet) and the Home update notice

Human

Prompt

Coordinator: "install": "automatic" must be paired with NativeUpdater(policy: .quiet) in the Mac app (see rastrillo tools/mac_updates.py comment and the policy's docs) — otherwise a scheduled check that finds an update it can't install itself still opens Sparkle's window. Do what Calendar did (branch native/plain-app-name f4c9c01, CalendarApp.swift): policy .quiet, plus the one-line in-window update notice shown only while an update waits, as Calls does. Keep the 12 languages.

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

  SheetsApp uses NativeUpdater(policy: .quiet): a scheduled check never opens a window, a downloaded update installs on quit, and the app menu offers "Update Ready — Restart Sheets". While an update is pending, the Home window shows NativeUpdateNotice at the bottom (safeAreaInset, Sparkle build only; the App Store build links no RastrilloMacUpdates). README says so. Localizations stay the twelve SheetsKit translates.

Notes:
  isBusy is not wired to Sheets' pending-edit state: install-on-quit and the Restart item both go through NSApp.terminate, so SheetCloseGuard's quit guard still runs. Not done, as in Calendar: an "Update automatically" toggle in a Settings scene (Sheets has none yet).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 6fe9a3f6d280b742afbc374fe432df553edfbdcc parent d74418b
2 files changed, +20 −2
  • native/README.md +6 −0
  • native/apple/Sources/SheetsApp/SheetsApp.swift +14 −2

CI passed — run details

diff --git a/native/README.md b/native/README.md
index dc6c1c5..632b2fb 100644
--- a/native/README.md
+++ b/native/README.md
@@ -27,6 +27,12 @@ The shared native transport and Mac packaging tools are pinned to revision
Both SwiftPM and Xcode resolve that revision; no sibling development checkout
is required.
+The Sparkle build updates quietly, as Calls does: `"install": "automatic"` in
+`mac-updates.json` writes Sparkle's automatic check, download and install keys
+(no first-launch question), and `NativeUpdater(policy: .quiet)` keeps scheduled
+checks from opening a window. A downloaded update installs on quit; the app menu
+offers "Update Ready — Restart Sheets" and the Home window shows a one-line notice.
+
Select a cell, then edit its formula bar, double-click, or type while the
Mac grid has keyboard focus. Enter saves and moves down; Tab saves and
moves right; Escape discards the focused cell edit. The range field accepts
diff --git a/native/apple/Sources/SheetsApp/SheetsApp.swift b/native/apple/Sources/SheetsApp/SheetsApp.swift
index 1a011f3..2c7420a 100644
--- a/native/apple/Sources/SheetsApp/SheetsApp.swift
+++ b/native/apple/Sources/SheetsApp/SheetsApp.swift
@@ -7,7 +7,10 @@ import SwiftUI
@main struct SheetsApp: App {
#if os(macOS) && canImport(RastrilloMacUpdates)
- @State private var updater = NativeUpdater()
+ // Quiet, as Calls: 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 = SheetsWindows()
@@ -15,7 +18,16 @@ import SwiftUI
#endif
var body: some Scene {
#if os(macOS)
- Window(sheetsMacString("Home"), id: "home") { SheetsAccountWindow(windows: windows) }
+ Window(sheetsMacString("Home"), id: "home") {
+ SheetsAccountWindow(windows: windows)
+ #if 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
+ }
.defaultSize(width: 1000, height: 760)
.commands {
// First: it replaces the About/Hide/Quit/Help groups with items in the