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

Aperta Adatta ai principianti
#810 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 20 giorni

@mithunkc017-ship-it ci sta già lavorando.

Dal 25/11/2026.

  • #815 di @mithunkc017-ship-it — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
80/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, react, typescript
Ambito
full-stack

Direzione di ricerca

Inizia leggendo la tabella delle route in frontend/src/App.tsx per confermare quali percorsi esistono (/community, /team-builder) e come frontend/src/components/Header.tsx chiama navigate(notification.link). Poi correggi le stringhe di link memorizzate in backend/controllers/comment_controller.go intorno alle righe 112 e 138 e in backend/controllers/team_controller.go intorno alla riga 393. Aggiungi un test backend che verifichi il link per tipo di notifica e controlla che ogni notifica ora arrivi a una route reale. Fatto significa che nessuna notifica risolve in un 404 o nella stanza sbagliata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
108
Fork
266
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AOSSIE-Org/DebateAI

Tutte le issue di AOSSIE-Org/DebateAI

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.