events: edit a series' repeat rule (ADR-0032) #104
No reviewers
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app!104
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/repeat-rule-editing"
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?
Stacked on #103 (merge order #101 → #102 → #103 → this). Closes #77 — the last open item on the #100 plan — with ADR-0032 settling the semantics the issue asked to have decided.
The decision (ADR-0032). The repeat rule (and its
untildate) is editable for the whole series, throughEventService/Update— no new RPC, so the membership guard, audit trail and matrix entry are the onesUpdatealready has. The series re-derives from its own start under the new rule; "change from here forward" is deliberately deferred (it composes later as split-then-edit). Child rows — one-off edits and tombstones — survive where their slot still lands under the new rule; orphans are deleted in the same transaction, riding the parent's UPDATE audit entry. And a rule change is a move: the members hear EVENT_MOVED, because the rule decides where occurrences land exactly as the start time does.Server.
UpdateEventRequestgainsrepeat(presence = replace, validated like a created rule) andclear_repeat(the series stops repeating), mutually exclusive. A child row refuses a rule of its own (ErrChildRepeat, failed-precondition). The handler moves fromsvc.Mutatetosvc.MutateTxso the orphan pruning shares the rule write's transaction; the moved-detection (whenOf, issue #94) now includes a rule signature. Specs cover pruning, survival, clearing, the mutual exclusion and the child refusal.Web. The event form prefills the series' rule and shows the
RepeatEditorwhen editing a series (a child row or a plain event keeps the section hidden — recurrence is still not added in an edit). Switching the rule off sendsclear_repeat; the span-versus-period validations now guard edits the same as creates.Android. Mirror for mirror: the edit row carries the parent's rule (
toRowForEditpreviously shed it), the sheet prefillsRepeatRuleEditorfor a series, and the repository'supdateEventsends the replacement rule orclear_repeat.Verified against the live deploy: a weekly Tuesday series with a tombstoned slot was changed to Thursdays — the calendar showed Thursdays only, the orphaned Tuesday tombstone was pruned, and the members received EVENT_MOVED.
make checkand the Android unit tests are green; on-device Android verification pending, as with the rest of the stack.Test report
Coverage: 28.1%
Updated by the check workflow · commit
c39fefbbc3Android test report
Coverage: 2.4% of lines
Updated by the android workflow · commit
c39fefbbc3