Locking a previously completed tile makes player and admin bingo results disagree
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- full-stack
调研方向
比较 src/routes/bingo/+page.server.ts 和 src/routes/admin/users/[id]/+page.server.ts 中的方块处理方式,然后检查 src/lib/server/standings.ts。复现 issue 中描述的非活动方块场景,并确定针对之前已标记的锁定方块的预期策略。完成意味着玩家棋盘、排名、管理员检测、验证以及任何重置状态都一致地遵循一项已记录的策略。
由索引模型根据 Issue 内容生成。
描述
Problem
Inactive tiles are treated inconsistently after a player has already marked one. The player board and loadStandings count completed.has(tile.id) regardless of isActive, but the admin review loadBingoState explicitly skips every inactive tile before detecting bingo.
Consequently, if an administrator locks a tile after players marked it, a player can still see a winning line while the administrator sees no bingo and cannot verify it. The leaderboard uses the player behavior rather than the review behavior.
Reproduction
- Let a player mark a tile that is part of a potential winning row.
- In
/admin/tiles, change that tile to inactive. - Complete the rest of that row.
- The player board counts the old mark and can show BINGO, but
/admin/users/:idomits it from detection and the verify action rejects the claim.
Suggested fix
Choose and document one policy for progress on locked tiles. If old progress remains valid, remove the !t.isActive skip from admin detection. If locking is meant to invalidate progress, apply the same rule in the player board and standings, and address verification/reset state consistently.
Affected code
src/routes/bingo/+page.server.tssrc/routes/admin/users/[id]/+page.server.tssrc/lib/server/standings.ts
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hacksu/bingo 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 72/100
-
难度 3/5 1-2 天 新手友好度 78/100
相似的 Issue
-
ADD openalgo未关闭template
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
bug Needs: Triage :mag:
难度 2/5 1-3 小时 新手友好度 84/100
microsoft/fluentui-contrib#671 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
sveltejs/acorn-typescript#150 ·
-
难度 2/5 1-3 小时 新手友好度 78/100