feat(frontend): Member subscription self management - #679
Open
libby-correctiv wants to merge 13 commits into
Open
feat(frontend): Member subscription self management#679libby-correctiv wants to merge 13 commits into
libby-correctiv wants to merge 13 commits into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks
wpf500
reviewed
Aug 31, 2026
wpf500
left a comment
Member
There was a problem hiding this comment.
This is a really great implementation that re-uses a lot of the established patterns across the codebase. However I have added comments below, mostly to go through together, as I'd like to understand more the reason behind some of the changes.
Reuse accountPage.contactInformation and add accountPage.security and accountPage.subscriptions for the remaining two tabs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Extract BaseNewsletterGroupData from NewsletterGroupData and use it for the contact newsletter group endpoint across core, the DTO, the API client and the frontend, replacing the frontend-local NewsletterGroup. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The read and write halves of the contact newsletter group endpoints lived in different services. Move the unsubscribe alongside the read and call upsertContact directly - updateContactProfile only forwarded to it, as it strips newsletterGroups out of the fields it writes itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Return the resulting status and groups from upsertContactWithRetry and do the ContactProfile write in upsertContact, so the write has one caller instead of also being reachable through the retry recursion. Scope the invalid-group retry to 'replace' updates. Only that path builds the Mailchimp interests payload from the cached group list, so refreshing the cache cannot change what add/remove sends - the retry re-sent an identical payload and still failed, after a full group refresh. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Move contactToNlUpdate into upsertContact so the payload is built once and passed to the provider call, which no longer rebuilds it on a retry or duplicates the opts type in its signature. Invert the retry guard to skip partial group updates instead of testing for 'replace', so the default no longer has to be restated alongside the one in buildInterests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
wpf500
reviewed
Sep 1, 2026
wpf500
left a comment
Member
There was a problem hiding this comment.
Code looks good, I'll do some testing on dev before approving
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a "Subscriptions" tab to the account page where members can view and unsubscribe from individual newsletter groups. Also makes group updates safer against a narrow race condition where a group added on Mailchimp's side could get overwritten if the sync webhook is down or hasn't caught up yet.
Changes
Frontend
AccountNewsletterSubscriptions.vuecomponent and locale stringsGET/DELETE /contact/:id/newsletter-groups[/:groupId]endpoints + client methodsBackend
mergeGroupsoption withNewsletterGroupChange('add' | 'remove' | 'replace') -add/removenow scope the Mailchimpinterestspayload to only the group(s) being changed, instead of reasserting the full list, to avoid overwriting a group Mailchimp already knows about that beabee's local DB hasn't caught up on yetinterestsfrom the Mailchimp payload entirely, instead of reaffirming the full list on unrelated updatesNewsletterService.upsertContact's invalid-group recovery - previously retried indefinitely if a group ID was permanently invalid (not just stale), silently hanging instead of surfacing an errorTesting
mailchimp.test.tscovering the payload shape for add/remove/replace;newsletter.test.tsupdated.yarn testpassing.Screenshots
Checklist before requesting a review
yarn checkand addressed any problemsChecklist before merging
Test scenarios