oficina / sheets Public

Sheets: shared plain-name menus, 12 languages, quiet updates, rastrillo/native c989034

Pins rastrillo/native to main c989034 in six places; PlainAppNameCommands first
(About/Hide/Quit/Help say Sheets) plus SidebarCommands for the Home split view;
CFBundleLocalizations for Sheets' 12 shipped languages (Sparkle and App Store);
quiet updates: install automatic + NativeUpdater(policy: .quiet) and the
one-line update notice on Home; test-mac-bundle.py checks SUBundleName,
languages and the Sparkle keys.

Reviewed by Fable at d74418b: APPROVE; 6fe9a3f (the quiet policy, as Calendar
a90867e) checked by the lander. make test green; hub CI passed at 6fe9a3f.
Release 0.2.0 (10) notarised from this tree.

Squashed from native/menu-name-release into main.
claude agent, operated by paul@keymail.dev ef9c313959456615f62c121b18d78fc04fd7d814 parent 314395c
10 files changed, +91 −15
  • native/README.md +8 −2
  • native/apple/Package.resolved +1 −1
  • native/apple/Package.swift +1 −1
  • native/apple/Sources/SheetsApp/SheetsApp.swift +22 −2
  • native/ios/project.yml +1 −1
  • native/mac-updates.json +15 −0
  • native/macos/Info.plist +16 −1
  • native/macos/SheetsMacStore.xcodeproj/project.pbxproj +1 −1
  • native/macos/project.yml +7 −3
  • native/scripts/test-mac-bundle.py +19 −3

CI passed — run details

diff --git a/native/README.md b/native/README.md
index 3989b77..632b2fb 100644
--- a/native/README.md
+++ b/native/README.md
@@ -19,14 +19,20 @@ Simulator and device builds use separate DerivedData directories.
project once before starting parallel builds.
The shared native transport and Mac packaging tools are pinned to revision
-`b6a4067e39efd641fd5fa149cc666fee47bdb9b5` of
+`c989034602fd540531e845b0934864575be11b3e` of
`https://amadan.net/rastrillo/native`, on its main branch (the merge of
-`native/levelup-phase0-tools`). The pin is written in
+`native/oficina-id-slice-a`, which carries `PlainAppNameCommands`). The pin is written in
`apple/Package.swift`, `apple/Package.resolved`, `macos/project.yml`,
`macos/SheetsMacStore.xcodeproj/project.pbxproj`, `ios/project.yml` and here.
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/Package.resolved b/native/apple/Package.resolved
index 9a65546..4eb3438 100644
--- a/native/apple/Package.resolved
+++ b/native/apple/Package.resolved
@@ -6,7 +6,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 11a94bc..8d91a7e 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: "SheetsNative", defaultLocalization: "en", platforms: [.macOS(.v26), .iOS(.v26)],
products: [.library(name:"SheetsKit",targets:["SheetsKit"]), .executable(name:"SheetsMac",targets:["SheetsMac"]), .executable(name:"SheetsReview",targets:["SheetsReview"])],
diff --git a/native/apple/Sources/SheetsApp/SheetsApp.swift b/native/apple/Sources/SheetsApp/SheetsApp.swift
index 0f425da..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,9 +18,26 @@ 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
+ // plain name ("Quit Sheets", not "Quit Oficina Sheets"); declared later
+ // it would drop Check for Updates (after .appInfo) with them.
+ PlainAppNameCommands()
+ // Home is a NavigationSplitView. The Help group PlainAppNameCommands
+ // replaces carried SwiftUI's hidden ⌥⌘S Toggle Sidebar; this restores
+ // View ▸ Show/Hide Sidebar (⌃⌘S).
+ SidebarCommands()
SheetsWindowCommands(windows: windows)
SheetsEditorCommands()
#if canImport(RastrilloMacUpdates)
diff --git a/native/ios/project.yml b/native/ios/project.yml
index fde5fb3..3ce2f3c 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: '6.0'
diff --git a/native/mac-updates.json b/native/mac-updates.json
index 91b73c2..14d24be 100644
--- a/native/mac-updates.json
+++ b/native/mac-updates.json
@@ -3,7 +3,22 @@
"feed_url": "https://raw.amadan.net/oficina/native-releases/main/sheets/appcast.xml",
"public_ed_key": "/FxO7cZnM7P5c9ZrUPUJvpCnR65sNmrzte+I5vHarE8=",
"keychain_account": "oficina",
+ "install": "automatic",
"url_schemes": [
"works.oficina.sheets"
+ ],
+ "localizations": [
+ "en",
+ "ar",
+ "bn",
+ "es",
+ "ga",
+ "hi",
+ "ja",
+ "pt",
+ "ru",
+ "vi",
+ "yue",
+ "zh-Hans"
]
}
diff --git a/native/macos/Info.plist b/native/macos/Info.plist
index b0ebdf2..16d24fc 100644
--- a/native/macos/Info.plist
+++ b/native/macos/Info.plist
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <string>en</string>
<key>CFBundleDisplayName</key>
<string>Oficina Sheets</string>
<key>CFBundleExecutable</key>
@@ -14,6 +14,21 @@
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
+ <key>CFBundleLocalizations</key>
+ <array>
+ <string>en</string>
+ <string>ar</string>
+ <string>bn</string>
+ <string>es</string>
+ <string>ga</string>
+ <string>hi</string>
+ <string>ja</string>
+ <string>pt</string>
+ <string>ru</string>
+ <string>vi</string>
+ <string>yue</string>
+ <string>zh-Hans</string>
+ </array>
<key>CFBundleName</key>
<string>Sheets</string>
<key>CFBundlePackageType</key>
diff --git a/native/macos/SheetsMacStore.xcodeproj/project.pbxproj b/native/macos/SheetsMacStore.xcodeproj/project.pbxproj
index e4a16b1..f7d9633 100644
--- a/native/macos/SheetsMacStore.xcodeproj/project.pbxproj
+++ b/native/macos/SheetsMacStore.xcodeproj/project.pbxproj
@@ -384,7 +384,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 7ca38d3..0a2af50 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: '6.0'
@@ -21,8 +21,10 @@ targets:
platform: macOS
# The .app file name, which Finder, the Dock and Spotlight show (Paul,
# 2026-11-14). CFBundleName is the plain short name, as rastrillo's
- # bundler writes it; SwiftUI's About/Hide/Quit items read
- # CFBundleDisplayName, so they still say "Oficina Sheets".
+ # bundler writes it. SwiftUI's About/Hide/Quit items read
+ # CFBundleDisplayName; PlainAppNameCommands (SheetsApp.swift) replaces
+ # them with "About Sheets" etc., in the languages CFBundleLocalizations
+ # declares (the same list as mac-updates.json's "localizations").
productName: Oficina Sheets
sources:
- ../apple/Sources/SheetsApp
@@ -42,6 +44,8 @@ targets:
properties:
CFBundleDisplayName: Oficina Sheets
CFBundleName: Sheets
+ CFBundleDevelopmentRegion: en
+ CFBundleLocalizations: [en, ar, bn, es, ga, hi, ja, pt, ru, vi, yue, zh-Hans]
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleIconFile: AppIcon
diff --git a/native/scripts/test-mac-bundle.py b/native/scripts/test-mac-bundle.py
index 355a10d..876ba02 100644
--- a/native/scripts/test-mac-bundle.py
+++ b/native/scripts/test-mac-bundle.py
@@ -23,12 +23,28 @@ with tempfile.TemporaryDirectory(prefix="oficina-sheets-launch-") as directory:
app = apps[0]
info = plistlib.loads((app / "Contents/Info.plist").read_bytes())
# Paul, 2026-11-14: works.oficina.* on every build, "Oficina Sheets" where
- # Finder looks, CFBundleName the plain short name "Sheets" (SwiftUI's
- # About/Hide/Quit items read the display name, not this), and the sign-in
- # scheme registered so the browser's callback reaches the app.
+ # Finder looks, CFBundleName the plain short name "Sheets" (the menu bar,
+ # the About window, PlainAppNameCommands' About/Hide/Quit and, through
+ # SUBundleName, Sparkle's windows), and the sign-in scheme registered so
+ # the browser's callback reaches the app.
assert info["CFBundleIdentifier"] == "works.oficina.sheets", info["CFBundleIdentifier"]
assert app.name == "Oficina Sheets.app" and info["CFBundleDisplayName"] == "Oficina Sheets", app.name
assert info["CFBundleName"] == "Sheets", info["CFBundleName"]
+ assert info.get("SUBundleName") == "Sheets", info.get("SUBundleName")
+ # Without CFBundleLocalizations every bundle in the app, RastrilloApple's
+ # menu titles and SheetsKit's own strings included, reads English.
+ # bundle-mac.py writes it from mac-updates.json, so only a release
+ # (--updates-config) build carries it.
+ if "SUFeedURL" in info:
+ shipped = sorted(p.stem for p in (Path(__file__).resolve().parents[1] /
+ "apple/Sources/SheetsKit/Resources").glob("*.lproj"))
+ assert sorted(info.get("CFBundleLocalizations", [])) == shipped, (info.get("CFBundleLocalizations"), shipped)
+ assert info.get("CFBundleDevelopmentRegion") == "en", info.get("CFBundleDevelopmentRegion")
+ # "install": "automatic" in mac-updates.json: Sparkle checks daily and
+ # installs on quit without first asking whether it may check.
+ for key in ("SUAllowsAutomaticUpdates", "SUEnableAutomaticChecks", "SUAutomaticallyUpdate"):
+ assert info.get(key) is True, (key, info.get(key))
+ assert info.get("SUScheduledCheckInterval") == 86400, info.get("SUScheduledCheckInterval")
assert any("works.oficina.sheets" in entry.get("CFBundleURLSchemes", [])
for entry in info.get("CFBundleURLTypes", [])), "works.oficina.sheets URL scheme not registered"
executable = app / "Contents/MacOS" / info["CFBundleExecutable"]