Bundle IDs works.oficina.calendar everywhere; Oficina Calendar outside, Calendar inside
Human
Prompt
(Orchestrating agent, native level-up phase 0 for Calendar) Bundle IDs → works.oficina.calendar on every build: Mac Sparkle build (native/mac-updates.json bundle_id), App Store Mac, iOS; the review/dev variant becomes works.oficina.calendar.review. Keep the custom URL scheme works.oficina.calendar and make sure the Mac Sparkle bundle registers it. Names: Finder/Dock/Spotlight/home-screen 'Oficina Calendar'; plain 'Calendar' inside the app's own UI. No entitlements, no sign-in code changes.
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
Sparkle: mac-updates.json names works.oficina.calendar, which the pinned bundle-mac.py now defaults to (and refuses a mismatch); the bundle is 'Oficina Calendar.app', CFBundleDisplayName 'Oficina Calendar', CFBundleName 'Calendar'. native/scripts/bundle-mac.py wraps the shared tool to copy the App Store build's CFBundleURLTypes into the Sparkle Info.plist before signing, so both Mac channels register works.oficina.calendar. Mac App Store: product 'Oficina Calendar.app' (module name kept CalendarMacStore), CFBundleName 'Calendar' (was 16-char 'Oficina Calendar'). iOS: review app works.oficina.calendar.review, bundleIdPrefix works.oficina (UI-test bundle), native_test.go follows. In-app: the accounts/sign-in title says 'Calendar'; the menu-bar extra keeps 'Oficina Calendar' as a system-wide surface.
Agent notes
Delete native/scripts/bundle-mac.py once rastrillo's bundle-mac.py can take URL types itself (worth adding upstream: Docs and Memoria Sparkle bundles also lack theirs per the audit). iOS CFBundleName stays $(PRODUCT_NAME)=CalendarPhone: with GENERATE_INFOPLIST_FILE Xcode overrides the plist value, and iOS never shows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 files changed,
+65
−9
internal/calendar/native_test.go+1 −1native/apple/Sources/CalendarApp/CalendarApp.swift+5 −2native/ios/project.yml+2 −2native/mac-updates.json+1 −1native/macos/CalendarMacStore.xcodeproj/project.pbxproj+4 −0native/macos/Info.plist+1 −1native/macos/project.yml+3 −1native/scripts/build-mac.sh+3 −1native/scripts/bundle-mac.py+45 −0
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.603s ? 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.806s ok amadan.net/oficina/calendar/internal/guardstest 0.073s ? 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/internal/calendar/native_test.go b/internal/calendar/native_test.go| index 73c8bc7..ff4b011 100644 |
| --- a/internal/calendar/native_test.go |
| +++ b/internal/calendar/native_test.go |
| @@ -85,7 +85,7 @@ func TestNativeCalendarRoundTrip(t *testing.T) { |
| } |
| input, _ := json.Marshal(map[string]any{"origin": server.URL, "credential": credential, "output": os.Getenv("NATIVE_REVIEW_OUTPUT")}) |
| if simulator := os.Getenv("NATIVE_REVIEW_SIMULATOR"); simulator != "" { |
| - bundle := "net.amadan.oficina.calendar.review" |
| + bundle := "works.oficina.calendar.review" |
| run := func(args ...string) []byte { |
| t.Helper() |
| out, err := exec.CommandContext(t.Context(), "xcrun", append([]string{"simctl"}, args...)...).CombinedOutput() |
diff --git a/native/apple/Sources/CalendarApp/CalendarApp.swift b/native/apple/Sources/CalendarApp/CalendarApp.swift| index 78368d4..e633d9c 100644 |
| --- a/native/apple/Sources/CalendarApp/CalendarApp.swift |
| +++ b/native/apple/Sources/CalendarApp/CalendarApp.swift |
| @@ -21,7 +21,7 @@ import AppKit |
| if let client = connection.client { |
| CalendarWorkspace(client: client, model: model, accounts: { model.clear(); connection.showAccounts(); model = CalendarModel() }, signOut: { model.clear(); connection.signOut(); model = CalendarModel() }) |
| } else { |
| - NativeAccountsView("Oficina Calendar", systemImage: "calendar", connection: connection) |
| + NativeAccountsView("Calendar", systemImage: "calendar", connection: connection) |
| } |
| }.id(connection.activeAccountID).onOpenURL(perform: connection.handleOpenURL).tint(Color(red: 0.78, green: 0.22, blue: 0.29)) |
| #if os(macOS) |
| @@ -37,11 +37,14 @@ import AppKit |
| #if os(macOS) |
| Settings { CalendarSettingsView() } |
| // MenuBarExtra can echo its current visibility; avoid a UserDefaults update loop. |
| + // The menu-bar item sits among the system's, like the Dock icon, so it keeps |
| + // the "Oficina Calendar" that tells it apart from Apple's Calendar. Inside |
| + // the app's own windows the name is plain "Calendar". |
| MenuBarExtra("Oficina Calendar", systemImage: "calendar", isInserted: Binding(get: { showMenuBar }, set: { if showMenuBar != $0 { showMenuBar = $0 } })) { |
| if let client = connection.client { |
| CalendarMenuView(client: client, model: model).tint(Color(red: 0.78, green: 0.22, blue: 0.29)) |
| } else { |
| - NativeAccountsView("Oficina Calendar", systemImage: "calendar", connection: connection) |
| + NativeAccountsView("Calendar", systemImage: "calendar", connection: connection) |
| .frame(width: 380, height: 480) |
| } |
| }.menuBarExtraStyle(.window) |
diff --git a/native/ios/project.yml b/native/ios/project.yml| index 21d51ea..54818b7 100644 |
| --- a/native/ios/project.yml |
| +++ b/native/ios/project.yml |
| @@ -1,6 +1,6 @@ |
| name: CalendarPhone |
| options: |
| - bundleIdPrefix: net.amadan.oficina |
| + bundleIdPrefix: works.oficina |
| deploymentTarget: |
| iOS: '17.0' |
| packages: |
| @@ -65,7 +65,7 @@ targets: |
| product: RastrilloApple |
| settings: |
| base: |
| - PRODUCT_BUNDLE_IDENTIFIER: net.amadan.oficina.calendar.review |
| + PRODUCT_BUNDLE_IDENTIFIER: works.oficina.calendar.review |
| TARGETED_DEVICE_FAMILY: 1,2 |
| GENERATE_INFOPLIST_FILE: true |
| INFOPLIST_KEY_UILaunchScreen_Generation: true |
diff --git a/native/mac-updates.json b/native/mac-updates.json| index 24abb3c..5700218 100644 |
| --- a/native/mac-updates.json |
| +++ b/native/mac-updates.json |
| @@ -1,5 +1,5 @@ |
| { |
| - "bundle_id": "net.amadan.oficina.calendar", |
| + "bundle_id": "works.oficina.calendar", |
| "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 7b771ff..187ede5 100644 |
| --- a/native/macos/CalendarMacStore.xcodeproj/project.pbxproj |
| +++ b/native/macos/CalendarMacStore.xcodeproj/project.pbxproj |
| @@ -181,6 +181,8 @@ |
| "@executable_path/../Frameworks", |
| ); |
| PRODUCT_BUNDLE_IDENTIFIER = works.oficina.calendar; |
| + PRODUCT_MODULE_NAME = CalendarMacStore; |
| + PRODUCT_NAME = "Oficina Calendar"; |
| PROVISIONING_PROFILE_SPECIFIER = "$(OFICINA_PROVISIONING_PROFILE)"; |
| SDKROOT = macosx; |
| }; |
| @@ -198,6 +200,8 @@ |
| "@executable_path/../Frameworks", |
| ); |
| PRODUCT_BUNDLE_IDENTIFIER = works.oficina.calendar; |
| + PRODUCT_MODULE_NAME = CalendarMacStore; |
| + PRODUCT_NAME = "Oficina Calendar"; |
| PROVISIONING_PROFILE_SPECIFIER = "$(OFICINA_PROVISIONING_PROFILE)"; |
| SDKROOT = macosx; |
| }; |
diff --git a/native/macos/Info.plist b/native/macos/Info.plist| index dd46943..4f78167 100644 |
| --- a/native/macos/Info.plist |
| +++ b/native/macos/Info.plist |
| @@ -15,7 +15,7 @@ |
| <key>CFBundleInfoDictionaryVersion</key> |
| <string>6.0</string> |
| <key>CFBundleName</key> |
| - <string>Oficina Calendar</string> |
| + <string>Calendar</string> |
| <key>CFBundlePackageType</key> |
| <string>APPL</string> |
| <key>CFBundleShortVersionString</key> |
diff --git a/native/macos/project.yml b/native/macos/project.yml| index 860a473..a41c11b 100644 |
| --- a/native/macos/project.yml |
| +++ b/native/macos/project.yml |
| @@ -36,7 +36,7 @@ targets: |
| path: Info.plist |
| properties: |
| CFBundleDisplayName: Oficina Calendar |
| - CFBundleName: Oficina Calendar |
| + CFBundleName: Calendar |
| CFBundleShortVersionString: $(MARKETING_VERSION) |
| CFBundleVersion: $(CURRENT_PROJECT_VERSION) |
| CFBundleIconFile: AppIcon |
| @@ -51,4 +51,6 @@ targets: |
| base: |
| PROVISIONING_PROFILE_SPECIFIER: $(OFICINA_PROVISIONING_PROFILE) |
| PRODUCT_BUNDLE_IDENTIFIER: works.oficina.calendar |
| + PRODUCT_NAME: Oficina Calendar |
| + PRODUCT_MODULE_NAME: CalendarMacStore |
| CODE_SIGN_ENTITLEMENTS: AppStore.entitlements |
diff --git a/native/scripts/build-mac.sh b/native/scripts/build-mac.sh| index 2a82fc9..b2d273d 100755 |
| --- a/native/scripts/build-mac.sh |
| +++ b/native/scripts/build-mac.sh |
| @@ -3,4 +3,6 @@ set -eu |
| cd "$(dirname "$0")/.." |
| swift package --package-path apple resolve |
| shared_native="${OFICINA_NATIVE_PACKAGE_PATH:-apple/.build/checkouts/native}" |
| -python3 "$shared_native/tools/bundle-mac.py" . Calendar "$@" |
| +# bundle-mac.py defaults to works.oficina.calendar, "Oficina Calendar.app" and |
| +# CFBundleName "Calendar"; scripts/bundle-mac.py adds the URL scheme it omits. |
| +python3 scripts/bundle-mac.py "$shared_native/tools" . Calendar "$@" |
diff --git a/native/scripts/bundle-mac.py b/native/scripts/bundle-mac.py| new file mode 100644 |
| index 0000000..0c2ec40 |
| --- /dev/null |
| +++ b/native/scripts/bundle-mac.py |
| @@ -0,0 +1,45 @@ |
| +"""Run rastrillo/native's bundle-mac.py with Calendar's URL types in Info.plist. |
| + |
| +Usage: bundle-mac.py <rastrillo native tools dir> <bundle-mac.py arguments...> |
| + |
| +bundle-mac.py (rastrillo/native 238e490) writes a fixed Info.plist with no |
| +CFBundleURLTypes, so the direct-download (Sparkle) build never registered |
| +works.oficina.calendar with Launch Services. Sign-in worked only because |
| +ASWebAuthenticationSession catches its own callback scheme. The App Store and |
| +iPhone builds declare the URL type in their project.yml; this copies the |
| +App Store build's declaration (macos/Info.plist) into the Sparkle bundle, so |
| +the two Mac channels register the same scheme. |
| + |
| +The types are written by wrapping mac_updates.configure, which bundle-mac.py |
| +calls after writing Info.plist and before signing, so the signature seals |
| +them. Delete this wrapper once bundle-mac.py takes URL types itself. |
| +""" |
| +import plistlib |
| +import runpy |
| +import sys |
| +from pathlib import Path |
| + |
| +tools = Path(sys.argv[1]).resolve() |
| +native = Path(__file__).resolve().parent.parent |
| +url_types = plistlib.loads((native / "macos/Info.plist").read_bytes())["CFBundleURLTypes"] |
| +if not any("works.oficina.calendar" in t.get("CFBundleURLSchemes", []) for t in url_types): |
| + raise SystemExit("bundle-mac: macos/Info.plist does not declare the works.oficina.calendar scheme") |
| + |
| +sys.path.insert(0, str(tools)) |
| +import mac_updates # noqa: E402 (bundle-mac.py's own import then finds this module) |
| + |
| +configure = mac_updates.configure |
| + |
| + |
| +def configure_with_url_types(app, *args, **kwargs): |
| + info_path = app / "Contents/Info.plist" |
| + info = plistlib.loads(info_path.read_bytes()) |
| + info["CFBundleURLTypes"] = url_types |
| + info_path.write_bytes(plistlib.dumps(info)) |
| + return configure(app, *args, **kwargs) |
| + |
| + |
| +mac_updates.configure = configure_with_url_types |
| +script = tools / "bundle-mac.py" |
| +sys.argv = [str(script)] + sys.argv[2:] |
| +runpy.run_path(str(script), run_name="__main__") |