Notification preferences per type

Abierto
#129 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
full-stack

Línea de trabajo

Start with apps/api/src/services/notificationService.ts, where the preference check has to run before a notification is created and before a push is sent, and read apps/web/src/components/PushSettings.tsx and apps/web/src/pages/SettingsPage.tsx for the switch UI. Add the notificationPrefs field and the GET/PATCH /api/users/me/notification-prefs routes, with a shared schema in packages/shared. Done means that turning a type off stops new notifications and pushes of that type, existing notifications are kept, and a test shows the defaults are unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

api enhancement help wanted web

Difficulty: Intermediate · Estimated size: 1 to 2 days

Context

Push settings exist (PushSettings.tsx) but people cannot choose which events notify them. A popular account can get many like notifications.

Problem or goal

Let each person turn notification types on or off: likes, comments, follows, messages.

Suggested approach

  • API: store notificationPrefs on User with all types on by default; GET/PATCH /api/users/me/notification-prefs validated by a Zod schema in packages/shared.
  • Check the preference in notificationService before creating the notification and before sending a push.
  • Web: a list of switches in Settings.

Where to look

  • apps/api/src/services/notificationService.ts
  • apps/web/src/components/PushSettings.tsx
  • apps/web/src/pages/SettingsPage.tsx

Acceptance criteria

  • Turning a type off stops new notifications and pushes of that type.
  • Existing notifications are not deleted.
  • Defaults are unchanged for current users (add a test).
  • Switches are keyboard and screen-reader friendly.

How to work on it

  1. Comment here to claim it, so two people do not do the same work.
  2. Fork the repo and branch from main (feat/short-name or fix/short-name). Setup steps are in docs/DEVELOPMENT.md.
  3. Keep the change focused and add tests for backend logic.
  4. Run npm run typecheck, npm test and npm run lint and npm run format before opening the pull request.
  5. Use a Conventional Commits title (for example feat(web): add bookmarks). More in CONTRIBUTING.md.

Stuck? Ask in this issue. Questions are welcome.


Generated by Claude Code

Lenguaje dominante
TypeScript
Estrellas
6
Forks
6
Merge medio
1 h 59 min
PR fusionados (30 d)
59

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Haseeb-MernStack/commune

Todos los issues de Haseeb-MernStack/commune

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.