Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Progress difficulty filter lists Hard before Medium

已关闭 适合新手
#281 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Pandamachi 已经在做这个了。

开始于 2026年10月11日。

  • #287 来自 @Pandamachi —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
86/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, node.js, rust
领域
frontend, testing

调研方向

从 web/progress.js 中的 progressOptions 开始,这里 values("difficulty") 会构建菜单;将其顺序与 web/problem-picker.js 中的 LEVELS 进行比较。issue 指出了 tests/browser/progress.test.js 及其中现有的筛选选项测试,作为测试的切入点;添加使用 Easy、Medium 和 Hard 的覆盖。完成标准是选择框选项遵循量表顺序:All、Easy、Medium、Hard。

由索引模型根据 Issue 内容生成。

描述

Observed behavior

Once the saved history holds attempts at all three levels, the Difficulty select under "Filter attempts" in the lobby's progress panel lists its options as All, Easy, Hard, Medium. Hard sits between Easy and Medium, so the menu reads in a different order from the difficulty checkboxes beside it, and a reader scanning for the next level up meets the hardest one first.

Expected behavior

The options follow the difficulty scale: All, Easy, Medium, Hard. That is the order LEVELS in web/problem-picker.js defines and the order the lobby's own difficulty checkboxes use.

Reproduction
  1. Save at least one report at each of Easy, Medium and Hard, so the progress panel has attempts at all three levels.
  2. Open the lobby and find the Difficulty select under "Filter attempts" in the progress panel.
  3. Read the options: All, Easy, Hard, Medium.

Without three saved reports, the list can be read straight from the module. From a checkout, passing buildProgressModel three records whose difficulties are Hard, Easy and Medium returns options.difficulty as ["Easy","Hard","Medium"].

CodeTrial version

A checkout of main at 8c3dda1 (2026-10-11). cargo run -- --version was not run; the list above came from loading web/progress.js of that checkout under Node 24.

Environment

OS: Windows 11 (Node 24 for the module-level reproduction)
Browser: any; the list is computed in web/progress.js before the page renders it
Language: any
Problem: any

Sanitized evidence

progressOptions in web/progress.js builds the menu with values("difficulty") and no comparator, so Array.prototype.sort compares the strings and "Hard" sorts before "Medium"; the duration menu on the next line does pass a numeric comparator. The test "filter options are deduplicated, ordered, and free of unreadable values" in tests/browser/progress.test.js uses only Easy and Medium, for which the alphabetical and the scale order agree, so it passes either way. The panel and this list arrived together in 451d870.

Public data confirmation
  • I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
主要语言
Rust
星标
160
派生
64
平均合并
1 天 9 小时
30 天内合并 PR
111

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sysprog21/codetrial 的其他 Issue

查看 sysprog21/codetrial 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。