Backend/feature: make dashboard reminders dismissable#8513
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @CouchersBot[bot]'s task in 53s —— View job Migration Review
Result: SAFE — pure additive migration on a new empty table. No NULL/backfill, type cast, FK orphan, or unique-constraint risks against existing data. New See full review: migration review comment |
Migration ReviewOne of our most common issues is migrations that don't work with existing data in production. This is very hard to catch with CI, so we have this bot to check for potential problems. Overall Risk: SAFE Files Reviewed
FindingsNo issues found. The migration only adds a brand-new table, so there is no risk of NULL backfill, type cast, or constraint violations against existing data. The SummaryPure additive migration on a new empty table — safe to run against the production database. |
Adds a ReminderDismissal model and DismissReminder RPC. Global reminders (complete profile/verification) hide for a 90-day cooldown; per-host-request reminders (respond to host request, write reference) are dismissed permanently. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
f61a1b7 to
18a453a
Compare
|
@aapeliv We added this functionality in the frontend via localStorage, do we still need this PR? |
|
Closing as we added this to the frontend via localStorage for now. Feel free to reopen later if we decide we prefer backend. |
Adds a backend for dismissing the four dashboard reminders surfaced by
Account.GetReminders. Today the reminders are derived purely from state and can't be dismissed; users have asked for a way to defer or silence them.ReminderDismissalmodel with partial unique indexes for the global vs entity cases and a CHECK constraint enforcinghost_request_idis set iff the type is per-entity.DismissReminderRPC with a flatReminderTypeenum + optionalhost_request_id.GetRemindersnow filters dismissed reminders: global types (complete_profile,complete_verification) are hidden for a 90-day cooldown; per-entity types (respond_to_host_request,write_reference) are hidden permanently for thathost_request_id.Migration is intentionally not included — autogenerated in CI per project convention.
Frontend wiring (dismiss button on
ReminderItem, optimistic React Query update) is out of scope for this PR.Testing
make formatandmake mypyclean (the one mypy error intests/fixtures/misc.pyis pre-existing and unrelated).test_account.py(all passing) covering:GetReminders.dismissed_atis mutated past the cooldown.host_request_idset / entity type without it /UNSPECIFIEDall returnINVALID_ARGUMENT.pytest src/tests/test_account.py src/tests/test_references.py— 58 tests pass.Backend checklist
developif necessary for linear migration history (CI autogenerates)For maintainers
This PR was created with the Couchers PR skill.