Skip to content

feat: unsubscribe page - #255

Open
Alessandro100 wants to merge 2 commits into
mainfrom
feat/175-unsubscribe-page-v2
Open

Alessandro100 wants to merge 2 commits into
mainfrom
feat/175-unsubscribe-page-v2

Conversation

@Alessandro100

@Alessandro100 Alessandro100 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

closes #175

Summary:

Generate the unsubscribe page which is accessed from the notification email. On this page the user can

  • Unsubscribe specifically from the notification type (ex: feed changes)
  • Unsubscribe from all
  • Manage their notifications

With the manage notifications option

  • It will bring the user to their account/notifications page
  • If they are not logged in, it will bring them to login, on success -> will bring them to the account/notifications page

Expected behavior:

When the user receives the notification email, they should be able to successfully navigate to the unsubscribe page and successfully unsubscribe or manage their notifications

Testing tips:

As it's difficult to trigger a real notification email, you can get your subscription id from the database and input it in the url

ex: /notifications/unsubscribe?id=ef7efa4e-3b42-45cd-a808-de5142c0fb41

You can use my subscription as a test (note if unsubscribed, the link will become invalid)

https://mobilitydatabase-web-git-feat-175-unsubscr-87d44f-mobility-data.vercel.app/notifications/unsubscribe?id=bd063dc2-ba94-4615-925f-03a7b89338b7

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with yarn test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)
Screenshot 2026-10-19 at 10 16 26 Screenshot 2026-10-19 at 10 16 30 Screenshot 2026-10-20 at 08 00 58

@Alessandro100
Alessandro100 requested a balanced review from Copilot October 20, 2026 13:26
@Alessandro100 Alessandro100 self-assigned this Oct 20, 2026
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
mobilitydatabase-web Ready Ready Preview Oct 20, 2026 1:26pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The unsubscribe flow depends on client authentication despite the server-authentication contract, and locale preservation and schema nullability need correction.

3 open issues
What changed in this PR

Adds an email-linked unsubscribe page with notification-management navigation.

Changes:

  • Adds single-type and all-notification unsubscribe controls with confirmation and error states.
  • Adds English/French copy and unit tests for unsubscribe helpers.
  • Updates subscription API contracts and validation-history schemas.

Applied vercel-react-best-practices guidance (custom).

File Description
src/​app/​services/​user-service-api-types.ts Updates generated subscription types.
src/​app/​services/​notification-service.ts Adds subscription lookup and unsubscribe calls.
src/​app/​constants/​Navigation.ts Adds notifications destination.
src/​app/​[locale]/​notifications/​unsubscribe/​UnsubscribeContent.tsx Implements unsubscribe controls and navigation.
src/​app/​[locale]/​notifications/​unsubscribe/​page.tsx Adds the localized route and metadata.
src/​app/​[locale]/​notifications/​unsubscribe/​lib/​unsubscribe.ts Adds validation and view-state helpers.
src/​app/​[locale]/​notifications/​unsubscribe/​lib/​unsubscribe.spec.ts Tests unsubscribe helpers.
messages/​fr.json Adds French unsubscribe messages.
messages/​en.json Adds English unsubscribe messages.
external_types/​UserServiceAPI.yaml Updates subscription operations and contracts.
external_types/​DatabaseCatalogAPI.yaml Adds validation-history API schemas.

Review effort: Balanced

Comment thread external_types/DatabaseCatalogAPI.yaml
Comment thread src/app/[locale]/notifications/unsubscribe/UnsubscribeContent.tsx
Comment on lines +134 to +136
const accessToken = await getUserAccessToken();
const authMiddleware = generateAuthMiddlewareWithToken(accessToken);
userServiceClient.use(authMiddleware);
@github-actions

Copy link
Copy Markdown

*Lighthouse ran on https://mobilitydatabase-bvqgcpujo-mobility-data.vercel.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 96 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-bvqgcpujo-mobility-data.vercel.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 88 🟠 87 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-bvqgcpujo-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🔴 32 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-bvqgcpujo-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 91 🟠 84 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-bvqgcpujo-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 93 🟢 94 🟢 96 🟢 100

@emmambd
emmambd requested a review from abigailmbd October 20, 2026 14:29
@emmambd

emmambd commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

LGTM!

@abigailmbd abigailmbd 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.

LGTM!

This branch was successfully deployed

1 active deployment
Preview — 83307bc8 Deployed Oct 20, 2026 by vercel[bot]
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.

Unsubscribe page

4 participants