[BUG]: Comment, reply and team-join notifications link to wrong or non-existent frontend routes
维护者通常 20 天内回复
评估
- 难度
- 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
- User A publishes a saved transcript as a community post (or has a saved transcript).
- 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. - 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. - 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
linkvalues inCreateCommentHandlerandJoinTeamto point at existing routes (or add a dedicated/post/:id//team/:idroute on the frontend if maintainers prefer). - Optionally keep notification route strings in one place (shared constants) so backend links don't drift from
App.tsxroutes 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
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AOSSIE-Org/DebateAI 的其他 Issue
-
[BUG]: Comment, reply and team-join notifications link to wrong or non-existent frontend routes可能重新可做 @unnati-jaiswal24 于 7 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
AOSSIE-Org/DebateAI#811 · 2 条评论 ·
维护者通常 20 天内回复
-
[BUG]: Inverted Mic icon causes input confusion in Bot Debate Room可能已有人在做 @Rusky-1014 于 12 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
AOSSIE-Org/DebateAI#802 ·
维护者通常 20 天内回复
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument page可能已有人在做 @sujitkr268 于 6 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
AOSSIE-Org/DebateAI#801 · 2 条评论 ·
维护者通常 20 天内回复
-
[BUG]: Singleton state leak in matchmaking tests causes non-deterministic failures可能已有人在做 @mithunkc017-ship-it 于 15 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
AOSSIE-Org/DebateAI#798 · 3 条评论 ·
维护者通常 20 天内回复
-
[BUG]: Live Debate Rooms page overflows horizontally on mobile screens可能重新可做 @SYED-IRTEZA-HUSSAIN-RIZVI 于 15 天前认领,目前没有进行中的 PR。 未关闭bug
难度 2/5 1-3 小时 新手友好度 66/100
AOSSIE-Org/DebateAI#797 · 4 条评论 ·
维护者通常 20 天内回复
查看 AOSSIE-Org/DebateAI 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
-
review-followup
难度 2/5 1-3 小时 新手友好度 68/100
griffinwork40/agent-afk#5387 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
CodeManufactoryLLC/Code60#358 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
android:plan ios:plan main:plan packages:learn
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复