A host can start a quiz that has no questions
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- express, postgresql, react, typescript
调研方向
从 apps/frontend/src/screens/LiveQuiz.tsx 开始,阅读“Start Game”按钮附近的代码(约第 349 行),该按钮目前只检查 participants.length。找到组织者加入时收到的会话载荷是在哪里构建的,并添加题目数量,以便按钮可以在显示原因的情况下被禁用。另外检查 quiz:start 处理器,以及结束空会话的 quiz:next-question 路径,判断服务端防护应放在哪里。完成标准是:空测验无法开始,并且界面会说明原因。
由索引模型根据 Issue 内容生成。
描述
The organizer's Start button in the lobby only guards against having no players:
apps/frontend/src/screens/LiveQuiz.tsx (~line 349):
<button onClick={handleStart} disabled={participants.length === 0} ...>
Start Game
</button>
Nothing checks that the quiz has any questions.
Starting an empty quiz walks the room through quiz:start → the 3-second "GET
READY!" screen → quiz:next-question with index 0, which finds no question and
immediately ends the session:
if (!sessionId || !questions[questionIndex]) {
await endQuizSession(sessionId);
...
broadcastToSession(sessionId, 'quiz:ended');
}
Every participant sees "GET READY!" and then, three seconds later, "Quiz
Finished! Congratulations Winners!" with an empty podium. The session is now
COMPLETED in the database, so the host has to create a new one.
The same applies to a quiz whose questions were all deleted, and it fails
identically with 1 participant and 0 questions.
Where to fix it. The lobby does not currently fetch the question list, so
this needs the count available client-side — either included in the session
payload the organizer already receives on join, or fetched separately.
Guarding only in the UI is not quite enough, since the WebSocket message can be
sent directly; a server-side check in quiz:start would be the complete fix.
Frontend-only is still a worthwhile first step — say in your PR which you did.
Definition of done:
- The Start button is disabled when the quiz has no questions
- The disabled state explains why, rather than just being greyed out
- An empty quiz cannot be driven into a COMPLETED state by mistake
- 主要语言
- TypeScript
- 星标
- 21
- 派生
- 7
- 平均合并
- 4 小时 31 分钟
- 30 天内合并 PR
- 22
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TheCodeHeist-Coder/Rexial 的其他 Issue
-
bug good first issue help wanted UI & UX
难度 2/5 1-3 小时 新手友好度 84/100
TheCodeHeist-Coder/Rexial#205 ·
维护者通常 1 天内回复
-
One PDF upload freezes the whole AI service, including its health check可能已有人在做 @Anshuu2004 于 1 天前认领。 未关闭Backend first issue bug help wanted
难度 2/5 1-3 小时 新手友好度 84/100
TheCodeHeist-Coder/Rexial#193 · 2 条评论 ·
维护者通常 1 天内回复
-
The join endpoint returns an error shape the frontend cannot read可能已有人在做 @Anshuu2004 于 1 天前认领。 未关闭Backend first issue bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 86/100
TheCodeHeist-Coder/Rexial#192 · 1 条评论 ·
维护者通常 1 天内回复
-
Registering without a password returns a 500 instead of telling you what is missing可能已有人在做 @Anshuu2004 于 1 天前认领。 未关闭Backend first issue bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
TheCodeHeist-Coder/Rexial#191 · 1 条评论 ·
维护者通常 1 天内回复
-
CI does not run the frontend tests可能已有人在做 @nayan45633 于 1 天前认领。 未关闭Backend first issue good first issue help wanted
难度 2/5 1-3 小时 新手友好度 76/100
TheCodeHeist-Coder/Rexial#188 · 2 条评论 ·
维护者通常 1 天内回复
查看 TheCodeHeist-Coder/Rexial 的全部 Issue
相似的 Issue
-
type: bug
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
0️⃣ phase/new
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 1/5 1 小时以内 新手友好度 70/100
microsoft/playwright#43640 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100