feat(event): join or leave one occurrence #209
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!209
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/occurrence-attendance"
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?
Closes #201.
Attending is open to everyone the matrix admits; editing belongs to an
event's owners (#205). That worked for a whole series and not for a single
date, because occurrences are derived rather than stored: recording
attendance on one Thursday means materialising it first, and splitting is
an owner's act — it detaches that date from the series permanently, for
everyone.
So a child who wanted one swimming lesson had to join all twelve, and
anyone who joined a series could not step out of a single date.
JoinOccurrenceandLeaveOccurrenceeach resolve the slot, materialisethe occurrence if it is not already a child row, and edit only the
caller's own attendance. Neither carries a user parameter. The target
is always the requester, which makes "split someone else's series to add a
third person" unrepresentable rather than merely refused. Joining records
the attendee relation, so it confers presence and no authority.
Three behaviours chosen deliberately:
through the series materialises nothing and returns the parent
unchanged. A permanent split is too high a price for an idempotent tap.
that is not happening takes no attendance, and a join that quietly
succeeded would leave someone believing they are going to something the
household called off.
admin act available on an RPC that can only touch its caller.
The split path was factored rather than copied:
resolveSlotis thecaller-agnostic half of the old owner-gated intake, and
insertSplitisnow the one write seam every materialisation goes through, so uid minting,
the mutation trail, the audit entry and the live-update announce are
identical whoever splits.
Recorded as an amendment to ADR-0036, including the trade-off that a child
row whose last attendee leaves is left without an owner.
MCP and CLI deliberately carry no affordance yet: MCP has no attendance
verb at all and its usual principal is the standalone key these RPCs
refuse, and the CLI's per-occurrence version needs the scope dialog the
web reference has not built.
🤖 Generated with Claude Code
Test report
Coverage: 27.0%
Updated by the check workflow · commit
3935d3ba5aAndroid test report
Coverage: 2.9% of lines
Updated by the android workflow · commit
3935d3ba5aad175216ff3935d3ba5a