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