oficina / calendar Public

Clone
git clone https://amadan.net/oficina/calendar

Plain git — no account needed to clone.

Download

Download this file

1# Oficina Calendar for Apple platforms
2
3Calendar provides calendar filtering, month navigation, a selected-day agenda, event detail and single-event creation/editing. It preserves event wall-clock time and IANA zone, and uses the existing personal-calendar default. Recurring events and bookings open the web editor.
4
5The SwiftUI client supports macOS 14+, iOS 17+ and iPadOS 17+. Mac uses a split
6window with a sidebar, toolbar and form sheets; iPhone collapses navigation into
7native columns and sheets. iPad uses the wider split layout. Both appearances
8use system typography and controls. Credentials stay in the per-app Keychain;
9responses and generated answers are held in memory.
10
11Build Mac with `native/scripts/build-mac.sh`; build the simulator app with
12`native/scripts/build-iphone.sh`. For a physical device use
13`OFICINA_DEVELOPMENT_TEAM=<team> native/scripts/build-iphone.sh device`. Generate
14the iOS project with `xcodegen generate --spec native/ios/project.yml`, then build
15`CalendarPhone` in Xcode. Physical devices require your development team.
16The generated projects and build products are ignored.
17
18The Swift dependency pins Rastrillo Native main `c989034602fd540531e845b0934864575be11b3e`.
19The Go server module stays at `2a5d07b`: `server/` is unchanged between the two.
20
21On the Mac, Calendar is "Oficina Calendar" in Finder, the Dock and Spotlight and
22plain "Calendar" inside: `PlainAppNameCommands()` comes first in `.commands` so
23About, Hide, Quit and Help say "Calendar", and the Settings window is titled
24"Calendar". Calendar's own strings are English only, so `mac-updates.json`
25declares `"localizations": ["en"]`; add a language there (and in both
26`project.yml` files) only when Calendar ships its strings in it.
27
28The Sparkle build updates quietly, as Calls does: `"install": "automatic"` in
29`mac-updates.json` writes Sparkle's automatic check, download and install keys
30(no first-launch question), and `NativeUpdater(policy: .quiet)` keeps scheduled
31checks from opening a window. A downloaded update installs on quit; the app menu
32offers "Update Ready — Restart Calendar" and the window shows a one-line notice.
33
34Browser sign-in requires the new backend `/native/` routes. A server that has
35not received this update reports that native support is unavailable.
36
37`CalendarReview` is a test-only executable: it accepts a loopback fixture
38credential over stdin, renders the real workspace and captures its window.
39Set NATIVE_REVIEW_BINARY and NATIVE_REVIEW_OUTPUT when running `go test
40./internal/calendar -run TestNative` to exercise it against the app's real test
41server. It is never included in the Mac or iOS app bundle.
42
43The native API adds GET `/api/native/session`, GET `/api/native/events` with a
44maximum 62-day half-open range, and POST `/api/native/events[/{id}]`. Existing
45person, calendar-grant and event-store checks remain authoritative. Recurrence
46expansion stays on the server. All-day ends are exclusive dates. The UI uses the
47person's saved week start and time zone, not the device's implicit formatting zone.
48
49For XCTest interaction checks against the isolated authenticated fixture, set
50`NATIVE_REVIEW_SIMULATOR=<UDID> NATIVE_REVIEW_UI_TESTS=1` with a writable
51`NATIVE_REVIEW_OUTPUT` PNG path when running the native Go fixture test. First
52build/install the separate ReviewPhone target. The UI tests create and inspect
53fixture events and never connect to a real account. Xcode result bundles
54are under `native/build/ios/Logs/Test`. Review credentials enter only the isolated
55review app's Documents directory and are removed when the fixture exits.
56
57## Quick-add, menu bar and time zones
58
59Use Quick add (Command-K on Mac) and type a sentence such as “Lunch tomorrow at
601pm for an hour”. Review the understood date, time, calendar, recurrence and
61assumptions, then choose Add event (Command-Return on Mac). The server's existing
62Go parser is the only natural-language implementation. Saving uses the concrete
63preview dates, so midnight cannot reinterpret tomorrow. Attendees are recorded;
64no invitations are sent. Saved-event warnings stay visible instead of inviting
65a duplicate retry.
66
67The Mac menu-bar calendar stays available after the main window closes. It
68shares the selected date and filter, shows a compact month and day agenda, and
69contains quick-add. Open Calendar returns to the full window; Quit Calendar
70ends the app. It does not register itself to launch at login.
71
72Native Calendar follows this device's system time zone by default. Calendar
73settings offers Use system time zone or an explicit local override. On Mac use
74the app's Settings menu or the gear in the menu-bar panel; on iPhone use Settings
75in the calendar sidebar. The choice controls viewing ranges, new events and
76quick-add interpretation. Existing events retain their stored wall clock/IANA
77zone, and all-day entries remain civil dates. The server account's web preference
78is not rewritten by a device setting.
79
80The feature adds protected POST `/api/native/quick/parse` and
81POST `/api/native/quick`; GET `/api/native/events` accepts an optional viewing
82`zone`. Clients without that query retain the previous server-preference behavior.
83Preview bodies are bounded; create uses the existing grant checks and event store.
84
85Review: `/root/canary_release_review`, dispatched gpt-6-astra/high (runtime
86identity not independently verified), approved source after delayed-save
87sign-out, lost-confirmation and zone-encoding findings were fixed. Its isolated
88post-response-guard mutation failed four Swift assertions and was restored;
89all five Swift tests and the Go quick-add/viewing-zone tests passed. iPhone
90XCTest created an event through the actual parser/preview/save flow. The menu
91content was rendered against an authenticated fixture and inspected.
92