oficina / calendar Public

Calendar: shared plain-name menus, quiet updates, rastrillo/native c989034

Pins rastrillo/native to main c989034; PlainAppNameCommands first (About/Hide/
Quit/Help say Calendar) plus SidebarCommands, now also in the App Store build;
Settings window titled Calendar; localizations [en] (Calendar ships English
only); quiet updates: install automatic + NativeUpdater(policy: .quiet) and the
one-line update notice while an update waits, as Calls.
Reviewed by the lander; make ci green; hub CI passed. Release 0.1.1 (3)
notarised from this tree.

Squashed from native/plain-app-name into main.
claude agent, operated by paul@keymail.dev a90867e08108f9bc3d74a1a7f79e1b86d01d1c0b parent 5b3d98a
9 files changed, +50 −9
  • native/README.md +14 −1
  • native/apple/Package.resolved +1 −1
  • native/apple/Package.swift +1 −1
  • native/apple/Sources/CalendarApp/CalendarApp.swift +21 −2
  • native/apple/Sources/CalendarKit/CalendarSettingsView.swift +6 −1
  • native/ios/project.yml +1 −1
  • native/mac-updates.json +4 −0
  • native/macos/CalendarMacStore.xcodeproj/project.pbxproj +1 −1
  • native/macos/project.yml +1 −1

CI passed — run details

CI log
=== vet ===
go vet ./...
go vet -tags browser ./internal/calendartest/
=== fmt ===
=== test ===
go test ./...
?   	amadan.net/oficina/calendar/cmd/calendar	[no test files]
?   	amadan.net/oficina/calendar/cmd/calendar-contract	[no test files]
ok  	amadan.net/oficina/calendar/internal/calendar	24.625s
?   	amadan.net/oficina/calendar/internal/calendar/icons	[no test files]
?   	amadan.net/oficina/calendar/internal/calendar/keymailtest	[no test files]
?   	amadan.net/oficina/calendar/internal/calendar/seal	[no test files]
?   	amadan.net/oficina/calendar/internal/calendar/teamstate	[no test files]
ok  	amadan.net/oficina/calendar/internal/calendartest	3.619s
ok  	amadan.net/oficina/calendar/internal/guardstest	0.077s
?   	amadan.net/oficina/calendar/scripts/writeestilo	[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 d1e36b2..da58c7a 100644
--- a/native/README.md
+++ b/native/README.md
@@ -15,9 +15,22 @@ the iOS project with `xcodegen generate --spec native/ios/project.yml`, then bui
`CalendarPhone` in Xcode. Physical devices require your development team.
The generated projects and build products are ignored.
-The Swift dependency pins Rastrillo Native main `b6a4067e39efd641fd5fa149cc666fee47bdb9b5`.
+The Swift dependency pins Rastrillo Native main `c989034602fd540531e845b0934864575be11b3e`.
The Go server module stays at `2a5d07b`: `server/` is unchanged between the two.
+On the Mac, Calendar is "Oficina Calendar" in Finder, the Dock and Spotlight and
+plain "Calendar" inside: `PlainAppNameCommands()` comes first in `.commands` so
+About, Hide, Quit and Help say "Calendar", and the Settings window is titled
+"Calendar". Calendar's own strings are English only, so `mac-updates.json`
+declares `"localizations": ["en"]`; add a language there (and in both
+`project.yml` files) only when Calendar ships its strings in it.
+
+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 Calendar" and the window shows a one-line notice.
+
Browser sign-in requires the new backend `/native/` routes. A server that has
not received this update reports that native support is unavailable.
diff --git a/native/apple/Package.resolved b/native/apple/Package.resolved
index 99828f4..c27db9a 100644
--- a/native/apple/Package.resolved
+++ b/native/apple/Package.resolved
@@ -5,7 +5,7 @@
"kind" : "remoteSourceControl",
"location" : "https://amadan.net/rastrillo/native",
"state" : {
- "revision" : "b6a4067e39efd641fd5fa149cc666fee47bdb9b5"
+ "revision" : "c989034602fd540531e845b0934864575be11b3e"
}
},
{
diff --git a/native/apple/Package.swift b/native/apple/Package.swift
index f14a9d1..1b3995c 100644
--- a/native/apple/Package.swift
+++ b/native/apple/Package.swift
@@ -3,7 +3,7 @@ import PackageDescription
import Foundation
let sharedNative: Package.Dependency = ProcessInfo.processInfo.environment["OFICINA_NATIVE_PACKAGE_PATH"].map { .package(name: "native", path: $0) }
- ?? .package(url: "https://amadan.net/rastrillo/native", revision: "b6a4067e39efd641fd5fa149cc666fee47bdb9b5")
+ ?? .package(url: "https://amadan.net/rastrillo/native", revision: "c989034602fd540531e845b0934864575be11b3e")
let package = Package(name: "CalendarNative", platforms: [.macOS(.v14), .iOS(.v17)],
products: [.library(name: "CalendarKit", targets: ["CalendarKit"]), .executable(name: "CalendarMac", targets: ["CalendarMac"])],
diff --git a/native/apple/Sources/CalendarApp/CalendarApp.swift b/native/apple/Sources/CalendarApp/CalendarApp.swift
index 1d77478..f58a2d5 100644
--- a/native/apple/Sources/CalendarApp/CalendarApp.swift
+++ b/native/apple/Sources/CalendarApp/CalendarApp.swift
@@ -10,7 +10,10 @@ import AppKit
@main struct CalendarApp: 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
@StateObject private var connection = NativeConnection(defaultServer: "https://calendar.oficina.works")
@AppStorage("calendar.showMenuBar") private var showMenuBar = true
@@ -27,12 +30,28 @@ import AppKit
#if os(macOS)
.frame(minWidth: 780, minHeight: 650)
#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: 1080, height: 800)
+ .commands {
+ // First: About, Hide, Quit and Help say "Calendar", not the Finder
+ // name, and Check for Updates (after About) survives
+ // (rastrillo/native docs/mac-updates.md).
+ PlainAppNameCommands()
+ // The replaced Help group took SwiftUI's hidden Toggle Sidebar alias;
+ // the split view keeps View > Show Sidebar.
+ SidebarCommands()
#if canImport(RastrilloMacUpdates)
- .commands { NativeUpdateCommands(updater: updater) }
+ NativeUpdateCommands(updater: updater)
#endif
+ }
#endif
#if os(macOS)
Settings { CalendarSettingsView() }
diff --git a/native/apple/Sources/CalendarKit/CalendarSettingsView.swift b/native/apple/Sources/CalendarKit/CalendarSettingsView.swift
index a0fad8b..59f7c5e 100644
--- a/native/apple/Sources/CalendarKit/CalendarSettingsView.swift
+++ b/native/apple/Sources/CalendarKit/CalendarSettingsView.swift
@@ -25,9 +25,14 @@ public struct CalendarSettingsView: View {
} footer: {
Text("Used for your agenda, new events and quick-add on this device. Existing events keep their original time zones.")
}
- }.formStyle(.grouped).navigationTitle("Calendar settings")
+ }.formStyle(.grouped)
#if os(macOS)
+ // The Settings window's title. Without one SwiftUI calls it
+ // "Oficina Calendar Settings", after the Finder name.
+ .navigationTitle("Calendar")
.frame(width: 460, height: 300)
+ #else
+ .navigationTitle("Calendar settings")
#endif
}
}
diff --git a/native/ios/project.yml b/native/ios/project.yml
index 3ddd678..9e545da 100644
--- a/native/ios/project.yml
+++ b/native/ios/project.yml
@@ -8,7 +8,7 @@ packages:
path: ../apple
RastrilloNative:
url: https://amadan.net/rastrillo/native
- revision: b6a4067e39efd641fd5fa149cc666fee47bdb9b5
+ revision: c989034602fd540531e845b0934864575be11b3e
settings:
base:
SWIFT_VERSION: '5.0'
diff --git a/native/mac-updates.json b/native/mac-updates.json
index 8f9d67b..b718b95 100644
--- a/native/mac-updates.json
+++ b/native/mac-updates.json
@@ -1,8 +1,12 @@
{
"bundle_id": "works.oficina.calendar",
+ "install": "automatic",
"url_schemes": [
"works.oficina.calendar"
],
+ "localizations": [
+ "en"
+ ],
"feed_url": "https://raw.amadan.net/oficina/native-releases/main/calendar/appcast.xml",
"public_ed_key": "/FxO7cZnM7P5c9ZrUPUJvpCnR65sNmrzte+I5vHarE8=",
"keychain_account": "oficina"
diff --git a/native/macos/CalendarMacStore.xcodeproj/project.pbxproj b/native/macos/CalendarMacStore.xcodeproj/project.pbxproj
index 038b159..3ad25d2 100644
--- a/native/macos/CalendarMacStore.xcodeproj/project.pbxproj
+++ b/native/macos/CalendarMacStore.xcodeproj/project.pbxproj
@@ -370,7 +370,7 @@
repositoryURL = "https://amadan.net/rastrillo/native";
requirement = {
kind = revision;
- revision = b6a4067e39efd641fd5fa149cc666fee47bdb9b5;
+ revision = c989034602fd540531e845b0934864575be11b3e;
};
};
/* End XCRemoteSwiftPackageReference section */
diff --git a/native/macos/project.yml b/native/macos/project.yml
index 72fe4ad..2149996 100644
--- a/native/macos/project.yml
+++ b/native/macos/project.yml
@@ -7,7 +7,7 @@ packages:
path: ../apple
RastrilloNative:
url: https://amadan.net/rastrillo/native
- revision: b6a4067e39efd641fd5fa149cc666fee47bdb9b5
+ revision: c989034602fd540531e845b0934864575be11b3e
settings:
base:
SWIFT_VERSION: '5.0'