Split groups — flow from trigger

How Nowhere detects a split group booking, stores a staff feed item, and (in #372 Phase A) clears stale cards when the feed loads.

1 Trigger 2 Detect 3 Store 4 Reconcile on load 5 Staff action

End-to-end

TRIGGER A Acuity webhook · action=rescheduled TRIGGER B Staff drawer · PUT action=reschedule detectPartialRescheduleForEmail Same email · created within window · future · ≥2 times Group split? no No feed item yes Upsert pending notification app_state.unified_notifications · auto-fix off by default Staff opens Feeds → Split groups GET /api/notifications NEW · Reconcile vs D1 appointments acuity_appointments_raw · drop stale · keep real splits Still actionable? no Drop from store Empty feed / no badge yes Show card with date + time Move leftovers · or dismiss Move leftovers (if target still future) fix-partial-reschedule · stamp fixed · delete card
Trigger / new Webhook or drawer start; reconcile is new in #372.
Keep in feed Real future split with a future target.
Drop Aligned, past, canceled, or past target.
Done Nothing to show, or leftovers moved.

What “stale” means on load

Pending partial_reschedule row Load group IDs from D1 appointment cache Drop if any of these are true Aligned one shared time All past day already over Past target Fix would be unsafe Canceled or missing in D1 Else keep Future multi-time group + future target

Notes