Files
amethyst/commons
Claude f409df6643 fix(calendar): pin RSVPs and fold Friends going off the kind index
Audit of the follows-going lens and the Home RSVP card:

- RSVPs live in LocalCache.addressables, which holds values by weak
  reference, and nothing else references someone else's RSVP. Those pulled
  in while the user was on another lens could be collected before
  "Friends going" opened, and the EOSE cursor had already moved past them.
  The screen's view model now pins every RSVP it sees while it lives.
- The fold no longer uses observeEvents, whose seed walks every regular
  note in the cache and which copies its list and id set on each insert.
  One conflated observer on both kinds wakes a fold that scans the RSVP
  kind index; conflate() collapses bursts into one recompute.
- FollowsGoing / AppointmentAttendance are data classes, so a fold that
  changed nothing is dropped by the StateFlow and rows skip recomposition.
- Appointments hosted by muted/blocked users are neither shown nor fetched.
- Unresolved appointments are ordered by most recent RSVP, so the bounded
  fetch goes to the ones most likely to be upcoming. Same-second RSVPs
  tie-break on id.
- The Home RSVP card no longer keeps a standing event-finder subscription
  on a loaded appointment; WatchNoteEvent covers the missing case.
- Home only accepts RSVPs that point at an appointment kind.
- Re-tapping the Calendars tab scrolls the Friends lens to the top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfJPuJUrcXrZqSyVevxKbk
2026-09-28 18:45:56 +00:00
..