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

オープン 初心者向け
#810 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 20 日以内に返信

@mithunkc017-ship-it がすでに取り組んでいます。

2026年11月25日 から。

  • #815 @mithunkc017-ship-it による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
80/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, react, typescript
領域
full-stack

調査の方向性

まず frontend/src/App.tsx のルートテーブルを読んで、どのパスが存在するか(/community、/team-builder)と、frontend/src/components/Header.tsx がどのように navigate(notification.link) を呼び出しているかを確認する。次に、backend/controllers/comment_controller.go の112行目と138行目付近、および backend/controllers/team_controller.go の393行目付近にある保存済みのリンク文字列を修正する。通知タイプごとにリンクを検証するバックエンドテストを追加し、各通知が実際のルートに到達するようになったことを確認する。完了とは、どの通知も404や誤ったルームに解決されない状態を指す。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
108
フォーク
266
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/DebateAI のほかの issue

AOSSIE-Org/DebateAI の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。