Skip to content

Add new page to unsubscribe from unwanted emails - #973

Merged
gzurowski merged 4 commits into
mainfrom
email-unsubscribe
Jul 31, 2026
Merged

Add new page to unsubscribe from unwanted emails#973
gzurowski merged 4 commits into
mainfrom
email-unsubscribe

Conversation

@gzurowski

@gzurowski gzurowski commented Jul 30, 2026

Copy link
Copy Markdown
Member

This adds a simple page for unsubscribing from email notifications. The link to this page will be embedded in the footer of the ResearchHub email template. It works in an unauthenticated context and posts to the corresponding backend API, submitting the code embedded in the unsubscribe URL.

image

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview Jul 30, 2026 2:11pm

@gzurowski
gzurowski force-pushed the email-unsubscribe branch from 7fa52a3 to 54d0b5d Compare July 30, 2026 12:33
@gzurowski gzurowski changed the title Email unsubscribe Add new page to unsubscribe from unwanted emails Jul 30, 2026
@gzurowski
gzurowski marked this pull request as ready for review July 30, 2026 13:46
@gzurowski
gzurowski requested a review from a team as a code owner July 30, 2026 13:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54d0b5dcbb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const query = new URLSearchParams({ code });

try {
await ApiClient.post(`${this.BASE_PATH}/unsubscribe?${query.toString()}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the trailing slash to the unsubscribe POST

When a user confirms unsubscribe, this calls /api/email/unsubscribe?code=..., but the backend endpoint is registered as /api/email/unsubscribe/. Because this is a POST through fetch, the missing slash is not a safe redirect path (Django may redirect or reject before the view runs, and redirects can turn the request into a GET), so valid unsubscribe links will show the generic error instead of opting the email out. Please include the slash before the query string.

Useful? React with 👍 / 👎.

@nicktytarenko

Copy link
Copy Markdown
Member

Can we make Keep Subscribed the primary CTA?

I think that's a more common UX pattern across most sites. It requires the user to intentionally click Unsubscribe, rather than making the more destructive action the more prominent button.

image

@sonarqubecloud

Copy link
Copy Markdown

@gzurowski

Copy link
Copy Markdown
Member Author

Can we make Keep Subscribed the primary CTA?

I think that's a more common UX pattern across most sites. It requires the user to intentionally click Unsubscribe, rather than making the more destructive action the more prominent button.

People arriving on this page will have deliberately clicked the unsubscribe link in their email. I think it's fair to assume they want to unsubscribe. Flipping it the other way around feels like an annoying dark pattern (which, yes, is often used, but doesn't provide a great UX).

@gzurowski
gzurowski merged commit 443be18 into main Jul 31, 2026
5 checks passed
@gzurowski
gzurowski deleted the email-unsubscribe branch July 31, 2026 07:48
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.

2 participants