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 and Go dependencies pin Rastrillo Native main `2a5d07b2c8d3dfb3fd8526dc7e1c802f97865c67`.
19
20Browser sign-in requires the new backend `/native/` routes. A server that has
21not received this update reports that native support is unavailable.
22
23`CalendarReview` is a test-only executable: it accepts a loopback fixture
24credential over stdin, renders the real workspace and captures its window.
25Set NATIVE_REVIEW_BINARY and NATIVE_REVIEW_OUTPUT when running `go test
26./internal/calendar -run TestNative` to exercise it against the app's real test
27server. It is never included in the Mac or iOS app bundle.
28
29The native API adds GET `/api/native/session`, GET `/api/native/events` with a
30maximum 62-day half-open range, and POST `/api/native/events[/{id}]`. Existing
31person, calendar-grant and event-store checks remain authoritative. Recurrence
32expansion stays on the server. All-day ends are exclusive dates. The UI uses the
33person's saved week start and time zone, not the device's implicit formatting zone.
34
35For XCTest interaction checks against the isolated authenticated fixture, set
36`NATIVE_REVIEW_SIMULATOR=<UDID> NATIVE_REVIEW_UI_TESTS=1` with a writable
37`NATIVE_REVIEW_OUTPUT` PNG path when running the native Go fixture test. First
38build/install the separate ReviewPhone target. The UI tests create and inspect
39fixture events and never connect to a real account. Xcode result bundles
40are under `native/build/ios/Logs/Test`. Review credentials enter only the isolated
41review app's Documents directory and are removed when the fixture exits.
42
43## Quick-add, menu bar and time zones
44
45Use Quick add (Command-K on Mac) and type a sentence such as “Lunch tomorrow at
461pm for an hour”. Review the understood date, time, calendar, recurrence and
47assumptions, then choose Add event (Command-Return on Mac). The server's existing
48Go parser is the only natural-language implementation. Saving uses the concrete
49preview dates, so midnight cannot reinterpret tomorrow. Attendees are recorded;
50no invitations are sent. Saved-event warnings stay visible instead of inviting
51a duplicate retry.
52
53The Mac menu-bar calendar stays available after the main window closes. It
54shares the selected date and filter, shows a compact month and day agenda, and
55contains quick-add. Open Calendar returns to the full window; Quit Calendar
56ends the app. It does not register itself to launch at login.
57
58Native Calendar follows this device's system time zone by default. Calendar
59settings offers Use system time zone or an explicit local override. On Mac use
60the app's Settings menu or the gear in the menu-bar panel; on iPhone use Settings
61in the calendar sidebar. The choice controls viewing ranges, new events and
62quick-add interpretation. Existing events retain their stored wall clock/IANA
63zone, and all-day entries remain civil dates. The server account's web preference
64is not rewritten by a device setting.
65
66The feature adds protected POST `/api/native/quick/parse` and
67POST `/api/native/quick`; GET `/api/native/events` accepts an optional viewing
68`zone`. Clients without that query retain the previous server-preference behavior.
69Preview bodies are bounded; create uses the existing grant checks and event store.
70
71Review: `/root/canary_release_review`, dispatched gpt-6-astra/high (runtime
72identity not independently verified), approved source after delayed-save
73sign-out, lost-confirmation and zone-encoding findings were fixed. Its isolated
74post-response-guard mutation failed four Swift assertions and was restored;
75all five Swift tests and the Go quick-add/viewing-zone tests passed. iPhone
76XCTest created an event through the actual parser/preview/save flow. The menu
77content was rendered against an authenticated fixture and inspected.
78