Skip to content

feat: self-serve trip-alert toggle on /trips — PR 2/2#11

Merged
illinigirl merged 1 commit into
mainfrom
feat/trips-alert-toggle
Jul 3, 2026
Merged

feat: self-serve trip-alert toggle on /trips — PR 2/2#11
illinigirl merged 1 commit into
mainfrom
feat/trips-alert-toggle

Conversation

@illinigirl

Copy link
Copy Markdown
Owner

Per-trip "Get alerts" toggle on /trips (session-sub identity, Pushover-key guard, atomic set writes — the web's only, deliberately-narrow write into the shared partition), plus poller send-dedupe by Pushover key so the implicit owner + a web opt-in under their sub can't double-push.

🤖 Generated with Claude Code

…ips — PR 2/2

Family members can now opt into a trip's alerts from the dashboard, no
Claude needed:

- /trips gets a per-trip toggle (client component + server action behind
  the same signed-in + family-allowlist gates). The member id written is
  ALWAYS the session sub; opt-IN is guarded on the member's profile
  having a Pushover key (clear error pointing at /me instead of a silent
  no-op); applies to the trip's un-recorded days.
- dynamodb-writes.setPlanAlertSubscription: the web's ONLY write into the
  shared trip partition — deliberately narrow (UpdateItem on exactly one
  attribute via ATOMIC set ADD/DELETE, so it can't race with or clobber
  MCP planner edits; boundary documented in the module). IAM already
  covers it (LeadingKeys USER#*), no CDK change.
- Reader surfaces alert_subscribers per day (SS → sorted array; a JS Set
  can't cross the Server Component prop boundary).
- Poller: dedupe dispatch by Pushover KEY (alert_routing.
  dedupe_resolved_by_key + weather-loop equivalent). The owner is an
  implicit recipient under "megan" and can now ALSO opt in under their
  sub via the toggle — same key must mean one push, not two. Applied to
  all three resolver dispatch sites + the weather fanout.

Tests: atomic ADD/DELETE command shape, reader SS normalization, dedupe
(first-id-wins, missing-key drop).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@illinigirl illinigirl merged commit 9114ece into main Jul 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant