feat: calendar subscription iOS UI (Slice 4C of calendar sync payload) #250
No reviewers
Labels
No labels
agent:hermes
bug
chore
dependency
feature
status:blocked
status:in-progress
status:needs-info
status:needs-review
status:ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
owlburtoe/Shiftd!250
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "worktree-feat+calendar-sync-slice-4c-ios-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 4C of the Calendar Sync Payload enrichment (spec Section C, "Settings UI") — the iOS counterpart of the web UI (Slice 4B, #249). Builds on merged Slice 4A (#246: token model + ICS feed + dept-scoped subscription endpoints).
What it adds
A Calendar Subscription section in Settings → Preferences (staff-only, mirrors the existing Calendar Sync gate + requires a dept slug):
UIPasteboard, with a confirmation notice.webcal://form via@Environment(\.openURL)so the system calendar subscribes.confirmationDialogwith the exact spec copy: "Existing calendar subscriptions will stop syncing. You'll need to re-add the URL to each calendar app."Layers (mirrors existing iOS patterns)
CalendarSubscriptionURLDTO (CalendarSubscriptionAPI.swift) +calendarSubscription(in:)/regenerateCalendarSubscription(in:)onShiftdAPIClientvia thesendAuthenticatedseam, mirroring Slice 3's hand-writtenFacilityAPIpattern (the spec operations are unnamed, so a flat DTO beats a generated type).showsCalendarSubscriptionderived gate +calendarSubscriptionURL/ loading / error / regenerating state andloadCalendarSubscription/regenerateCalendarSubscription, matching the screen's existing notice/error idiom.webcal://derivation helper (app-target Shared/Calendar, alongside Slice 3's formatters).Scope
iOS-only; no backend/schema/OpenAPI change. The endpoints and OpenAPI shipped in 4A.
Testing — all green
CalendarSubscriptionAPITests— DTO decode + equatable).CalendarSubscriptionURLFormatterTestshttps/http/already-webcal/empty/URL-scheme/nil — 6;SettingsViewModelTestsstaff sees / admin hidden / missing-dept hidden — 3).-skipPackagePluginValidation). No iOS CI runs server-side, so this local run is the validation.This is the final slice of the Calendar Sync Payload feature (1, 2, 3, 4A, 4B all merged).