[BUG]: Comment, reply and team-join notifications link to wrong or non-existent frontend routes

Abierto Apto para principiantes
#810 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 20 días

@mithunkc017-ship-it ya está trabajando en esto.

Desde el 25/11/2026.

  • #815 de @mithunkc017-ship-it — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
80/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go, react, typescript
Área
full-stack

Línea de trabajo

Empieza leyendo la tabla de rutas en frontend/src/App.tsx para confirmar qué rutas existen (/community, /team-builder) y cómo frontend/src/components/Header.tsx llama a navigate(notification.link). Después corrige las cadenas de enlace almacenadas en backend/controllers/comment_controller.go alrededor de las líneas 112 y 138 y en backend/controllers/team_controller.go alrededor de la línea 393. Añade una prueba de backend que verifique el enlace por tipo de notificación y comprueba que cada notificación ahora llegue a una ruta real. Terminado significa que ninguna notificación resuelve a un 404 ni a la sala equivocada.

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

Descripción

Bug Description

Three of the in-app notifications created by the backend store a link that does not match any working frontend route. When the user clicks the notification in the header bell (Header.tsx → navigate(notification.link)), they end up on the wrong page, on an error toast, or on the 404 page.

Notification Created in Stored link What happens when clicked
"New Reply" (someone replied to your comment) backend/controllers/comment_controller.go L112 /debate/<transcriptId> Matches debate/:roomId → DebateRoom (the bot debate room). There is no debate state, so it shows "Debate Session Not Found" and redirects to /startDebate.
"New Comment" (someone commented on your debate/post) backend/controllers/comment_controller.go L138 /view-debate/<transcriptId> Matches view-debate/:debateID → ViewDebate, the live spectator view. It opens a debate WebSocket using the transcript ID as a live debate ID, so the user sees an empty or broken live room instead of the comment.
"New Team Member" (someone joined your team) backend/controllers/team_controller.go L393 /team/<teamId> No /team/:id route exists in frontend/src/App.tsx → NotFound (404).

Comments are only displayed in CommunityFeed (/community) and in SavedTranscripts on /profile. Team management lives at /team-builder. None of the stored links point there.

Steps to Reproduce
  1. User A publishes a saved transcript as a community post (or has a saved transcript).
  2. User B comments on it → User A gets a "New Comment" notification. Click it → user A lands on the live spectator room /view-debate/<transcriptId>, not the comment.
  3. User A replies to User B's comment → User B gets a "New Reply" notification. Click it → "Debate Session Not Found" toast and a redirect to /startDebate.
  4. User C joins User A's team → User A gets a "New Team Member" notification. Click it → 404 page.
Expected Behaviour

Clicking a notification should open the page where the related content can be seen, for example:

  • comment/reply notifications → /community (or a dedicated post/transcript page, ideally scrolling to the comment)
  • team join notification → /team-builder
Suggested Fix
  • Update the link values in CreateCommentHandler and JoinTeam to point at existing routes (or add a dedicated /post/:id / /team/:id route on the frontend if maintainers prefer).
  • Optionally keep notification route strings in one place (shared constants) so backend links don't drift from App.tsx routes again.
  • Add a small backend test asserting the link created for each notification type.

Note: existing notifications already stored in MongoDB will keep the old links, so a one-off migration or a frontend fallback may also be worth discussing.

Environment Details
  • Checked on main @ 95b24b5
  • Frontend routes: frontend/src/App.tsx; notification click handler: frontend/src/components/Header.tsx
Impact

Medium - Feature works but has issues

Code of Conduct
  • I have searched existing issues to avoid duplicates
Lenguaje dominante
TypeScript
Estrellas
108
Forks
266
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

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 AOSSIE-Org/DebateAI

Todos los issues de AOSSIE-Org/DebateAI

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.