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

Đang mở Phù hợp với người mới
#810 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 20 ngày

@mithunkc017-ship-it đang làm issue này rồi.

Từ ngày 25/11/2026.

  • #815 của @mithunkc017-ship-it — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
80/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, react, typescript
Lĩnh vực
full-stack

Hướng nghiên cứu

Bắt đầu bằng việc đọc bảng route trong frontend/src/App.tsx để xác nhận những đường dẫn nào tồn tại (/community, /team-builder) và cách frontend/src/components/Header.tsx gọi navigate(notification.link). Sau đó sửa các chuỗi liên kết được lưu tại backend/controllers/comment_controller.go quanh dòng 112 và 138 và backend/controllers/team_controller.go quanh dòng 393. Thêm một test backend khẳng định liên kết theo từng loại thông báo, và kiểm tra rằng mỗi thông báo giờ đây đến được một route thực. Hoàn thành nghĩa là không có thông báo nào dẫn đến 404 hoặc sai phòng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
108
Fork
266
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AOSSIE-Org/DebateAI

Tất cả issue của AOSSIE-Org/DebateAI

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.