題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

題池全面擴充:29 關統一補到 12 題,總計 348 題 - #6

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 11, 2026
Merged

題池全面擴充:29 關統一補到 12 題,總計 348 題#6
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
  • 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
  • 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
  • docs/roadmap.md 加入版控,記錄開發規劃與優先順序

Summary by CodeRabbit

  • New Features
    • Added 150+ new JavaScript and React practice questions (with richer explanations and auto-verification).
    • Introduced mixed practice and saved-practice flows, plus new screens for Notes, Stats, and Profile (including progress export/import).
    • Added a review-style question card with save/favorite support, and expanded question books for wrong answers and saved questions.
  • Improvements
    • Enhanced navigation with a new sticky navbar and additional tab icons.
    • Quiz sequencing now shuffles with difficulty progression; updated level/question count displays.
  • Documentation
    • Added/updated the EasyLearn development roadmap with completed and upcoming milestones.

- jsb-3~9、jsa-1~9、react-1~11 共 27 關各新增 6 題(jsb-1、jsb-2 已於前次擴充)
- 抽題邏輯改為整個題池洗牌後依難度排序全部作答(src/utils/quiz.js),不再固定抽 6 題
- 每題皆用 scripts/validate-questions.mjs 實際執行程式碼驗證輸出,全數通過
- docs/roadmap.md 加入版控,記錄開發規劃與優先順序
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 11, 2026 8:45am

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a358c513-4e9e-4632-9fa9-93c35f00cc2b

📥 Commits

Reviewing files that changed from the base of the PR and between 40712a3 and 8ac4811.

📒 Files selected for processing (5)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Navbar.jsx
  • src/screens/Notes.jsx
  • src/screens/Quiz.jsx
📝 Walkthrough

Walkthrough

The pull request expands JavaScript and React quiz datasets from six to twelve questions per topic, updates review sampling and level displays, adds Leitner-based wrong-answer and saved-question workflows, introduces dashboard screens and statistics, and documents completed and planned roadmap items.

Changes

Learning platform expansion

Layer / File(s)Summary
Quiz content expansion
src/data/questions/*.json
Adds six verified JavaScript and React practice questions to each topic.
Progress and review workflows
src/hooks/useProgress.js, src/data/chapters.js, src/screens/Quiz.jsx, src/components/Question*.jsx, src/App.jsx
Adds Leitner wrong-answer tracking, saved questions, mixed and saved practice modes, review cards, chapter lookup, and updated completion flows.
Dashboard and navigation screens
src/screens/*, src/components/Navbar.jsx, src/components/Icons.jsx, src/index.css
Adds top-level navigation, daily progress and chapter dashboards, notes, question books, profile backup controls, statistics, icons, and related styling.
Development roadmap
docs/roadmap.md
Documents completed foundations, planned synchronization and learning features, optimization items, and execution priorities.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 22.73% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main change: expanding the question pool to 29 chapters with 12 questions each, totaling 348.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (2)
src/data/questions/react-1-jsx.json (2)

168-190: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q8: Expected output includes an unexplained <link> preload tag.

The verify expected output is <link rel="preload" as="image" href="/me.png"/><img src="/me.png"/>, which includes React 19's automatic image preload injection. The explanation only discusses self-closing syntax and doesn't mention this behavior, which may confuse learners who expect just <img src="/me.png"/>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 168 - 190, Update the
verify expected output or explanation for react-1-q8 to account for React 19’s
automatic image preload injection. Keep the self-closing JSX lesson clear, and
explicitly explain that renderToStaticMarkup may output a preceding <link
rel="preload"> before the <img> element.

215-237: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

react-1-q10: "上一題" reference is imprecise.

The explanation says "用上一題的 Fragment <>...</>" but Fragment was introduced in q7, not q9 (the immediately preceding question). Consider changing to "前面 q7 教過的 Fragment" for accuracy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/react-1-jsx.json` around lines 215 - 237, 更新 react-1-q10 的
explanation,將「用上一題的 Fragment」改為明確指出「前面 q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 3: 更新 docs/roadmap.md 开头摘要中的题数,将“174+ 题”改为“348 题”,与后文 29 关的实际题库规模保持一致。
In `@src/data/questions/jsa-1-this-scope.json`:
- Around line 224-235: Update the explanation for the timer object’s start()
example to describe setTimeout callback this as determined by the execution
environment: Node may bind it to a Timeout object, while browsers may use
window/globalThis, rather than calling it a simple bare-call case. Preserve the
conclusion that this.label is undefined and the expected output remains
「時間到:undefined」.
- Line 221: 修正 setTimeout 題目的 docs 欄位,將目前錯誤的 MDN 連結改為正式的 Window/setTimeout
文件連結,並保留原有語系格式。
In `@src/data/questions/jsa-2-closures.json`:
- Line 196: 更新 `jsa-2-closures` 中对应 `setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。
In `@src/data/questions/jsa-3-async-basics.json`:
- Line 173: Update the docs URL in the setTimeout question entry to a valid MDN
Window/setTimeout page, replacing the current 404 zh-TW link while preserving
the existing question structure.
- Around line 260-281: 將 jsa-3-q12 的 prompt、answer 選項 a,以及 explanation 明確補充「以
Node.js 預設行為為準」。同步調整 verify 或相關敘述,避免暗示所有 JavaScript 執行環境都會因未處理 rejected Promise
終止,並指出瀏覽器通常僅觸發 unhandledrejection 事件。
In `@src/data/questions/jsa-4-async-await.json`:
- Line 276: 修正 Promise.race 說明中的取消語意:在該 JSON 題目的 explanation
文字中,將「其他還沒跑完的就被晾在一邊、不再理會」改為表達其他 Promise 仍會繼續執行,但其結果不再被採用,保留「快」先 settled 並成為
winner 的說明。
In `@src/data/questions/jsa-5-classes.json`:
- Line 149: Update the docs URL in the getter question entry of
jsa-5-classes.json, changing the MDN path from Reference/Classes/get to
Reference/Functions/get while preserving the zh-TW locale and surrounding data.
In `@src/data/questions/jsa-8-iterators-generators.json`:
- Around line 229-233: Update the explanation for the generator example in the
verify section to state that for...of requests and receives 4 before evaluating
the break condition; 4 is not pushed, but the generator does advance to that
value before stopping. Remove the inaccurate claim that iteration stops before
the fourth value is requested.
In `@src/data/questions/jsa-9-promises-advanced.json`:
- Around line 230-234: 修正 Promise.all([]) 說明中的文字錯誤:在該題的 explanation 內,將「also
得排隊」替換為「then 也得排隊」或其他自然且一致的中文表述。
- Around line 248-254: 修正題目選項 a 與 explanation 對 finally「不插手結果、值原封不動穿過」的絕對描述;補充
finally callback 若 throw 或回傳 rejected promise,會以新的 rejection
覆蓋原本結果,並同步調整答案說明以反映此例外。
- Around line 277-281: Update the explanation for the Promise.resolve question
to distinguish native Promise reuse from generic thenable assimilation: state
that Promise.resolve(inner) returns the identical Promise when inner is already
a Promise, while a non-Promise thenable produces a new Promise that adopts the
thenable’s eventual state. Keep the existing answer and verification unchanged.
In `@src/data/questions/jsb-2-functions.json`:
- Around line 220-232: Update the question topic, prompt, option text, and
explanation to use pass-by-value terminology: explain that object arguments copy
a reference to the same object, so mutating p.level changes pet, while
reassigning p would not. Replace “傳物件是本尊” and similar misleading wording with
“參數都按值傳遞;物件值是參照,” while preserving the example’s answer and behavior.
In `@src/data/questions/react-1-jsx.json`:
- Around line 238-260: 修正 react-1-q11 的題幹、選項、answer、explanation 與
verify.checks,使其內容一致:目前驗證顯示 class 與 className 產生相同 HTML,因此將正解改為 b
並更新選項與說明,或重寫題目改測 React 警告/版本差異;同時移除「樣式完全沒套用」及「渲染屬性不同」等錯誤敘述。
---
Nitpick comments:
In `@src/data/questions/react-1-jsx.json`:
- Around line 168-190: Update the verify expected output or explanation for
react-1-q8 to account for React 19’s automatic image preload injection. Keep the
self-closing JSX lesson clear, and explicitly explain that renderToStaticMarkup
may output a preceding <link rel="preload"> before the <img> element.
- Around line 215-237: 更新 react-1-q10 的 explanation,將「用上一題的 Fragment」改為明確指出「前面
q7 教過的 Fragment」,並保留其餘 JSX 根節點說明不變。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1cf77f-c1b2-4227-9200-f1a3ec26ae33

📥 Commits

Reviewing files that changed from the base of the PR and between 1abb1c2 and 98de66e.

📒 Files selected for processing (33)
  • docs/roadmap.md
  • src/App.jsx
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-6-collections-json.json
  • src/data/questions/jsa-7-modules.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-1-variables.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsb-3-arrays.json
  • src/data/questions/jsb-4-objects.json
  • src/data/questions/jsb-5-control-flow.json
  • src/data/questions/jsb-6-loops.json
  • src/data/questions/jsb-7-numbers-dates.json
  • src/data/questions/jsb-8-strings.json
  • src/data/questions/jsb-9-regex.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/react-10-reducer-context.json
  • src/data/questions/react-11-refs.json
  • src/data/questions/react-2-props.json
  • src/data/questions/react-3-state-events.json
  • src/data/questions/react-4-hooks.json
  • src/data/questions/react-5-lists-conditional.json
  • src/data/questions/react-6-updating-state.json
  • src/data/questions/react-7-pure-components.json
  • src/data/questions/react-8-sharing-state.json
  • src/data/questions/react-9-preserving-state.json
  • src/screens/ChapterMap.jsx
  • src/utils/quiz.js

Comment threaddocs/roadmap.md Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json Outdated
Comment threadsrc/data/questions/jsa-1-this-scope.json
"type": "predict-output",
"difficulty": 3,
"topic": "debounce 防抖:closure 記住計時器,取消前一次排程",
"docs": "https://developer.mozilla.org/zh-TW/docs/Web/API/setTimeout",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

setTimeout 的 MDN 連結改為 https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/data/questions/jsa-2-closures.json` at line 196, 更新 `jsa-2-closures` 中对应
`setTimeout` 题目的 `docs` 字段,将当前 MDN URL 替换为
`https://developer.mozilla.org/zh-TW/docs/Web/API/Window/setTimeout`。

Comment threadsrc/data/questions/jsa-3-async-basics.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsa-9-promises-advanced.json Outdated
Comment threadsrc/data/questions/jsa-9-promises-advanced.json
Comment threadsrc/data/questions/jsb-2-functions.json Outdated
Comment threadsrc/data/questions/react-1-jsx.json
- 修正 setTimeout 相關題目的 404 zh-TW MDN 連結,改用有效的 en-US 連結
- jsa-1-q10:this 綁定改為說明依執行環境而定(Node 綁 Timeout 物件,非全域物件)
- jsa-3-q12:未處理 rejection 當掉的行為明確標註為 Node.js 預設行為
- jsa-4-q12:Promise.race 補充說明其他 Promise 仍會執行完,只是結果不被採用
- jsa-8-q10:修正 generator 於 break 前是否已交出第 4 個值的時序描述
- jsa-9:修正 finally 可能被 throw 覆蓋結果、Promise.resolve 對原生 Promise 與 thenable 的處理差異、錯字修正
- jsb-2-q10:改用精確的「按值傳遞、物件值是參照」說法
- react-1-q11:實測後改寫為 class/className 渲染輸出相同、差異在主控台警告;q8/q10 補充說明與引用修正
- docs/roadmap.md:題數摘要更新為 348 題
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
錯題本/收藏:
- wrongIds 改成 Leitner 盒制(答錯回第 1 盒、答對升盒,畢業才移出錯題本)
- 新增收藏題目(savedIds)、唯讀瀏覽頁 QuestionBook(錯題本/收藏共用)
- TYPE_META 抽到 data/typeMeta.js,唯讀題卡抽成 QuestionReview 元件
導覽改版:
- 頂部改成網頁版橫向 navbar(每日刷題/精選筆記/學習數據/個人資料),
取代原本手機版底部 tab bar 的參考設計
- 首頁重構:連續學習卡、今日統計、隨機綜合練習(跨章節抽題,Quiz 新增 mode="mixed")、
分科清單直接顯示在首頁(ChapterMap 簡化成只管單一章節的關卡清單)
- 新增精選筆記頁:錯題本/收藏題庫卡片化
- 新增學習數據頁:近 7 日做題量/正確率雙圖表(用 dataviz skill 驗證過配色)、分科正確率
- 新增個人資料頁:吉祥物+統計格+進度匯出匯入(原本在首頁)
- useProgress 新增 dailyStats/chapterStats 追蹤,供學習數據頁使用
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/roadmap.md`:
- Line 25: Update the wording in the roadmap text to replace the simplified
character in「就够」with the Traditional Chinese form「就夠」, leaving the surrounding
sentence unchanged.
In `@src/App.jsx`:
- Around line 46-50: Update startMixedPractice so it first selects a random
MIXED_SIZE-sized subset from pool, then sorts only the selected questions by
difficulty before passing them to setView. Do not slice the difficulty-ordered
full pool, and preserve the existing mixed view state shape.
In `@src/components/Navbar.jsx`:
- Around line 20-27: Update the navigation button rendered in the Navbar
component to include aria-current="page" only when item.key matches active,
while leaving it unset for inactive buttons.
In `@src/index.css`:
- Around line 692-694: Update the fill declaration in .icon-filled to use the
lowercase CSS keyword required by Stylelint’s value-keyword-case rule, while
preserving the currentColor behavior.
In `@src/screens/Notes.jsx`:
- Line 12: Make both clickable note cards keyboard-operable: update the elements
using onOpenWrongBook and onOpenSavedBook to handle Enter and Space in addition
to onClick, or replace them with semantic buttons while preserving navigation
behavior.
- Around line 5-6: Update the wrongCount calculation in Notes.jsx to null-guard
progress.wrongIds before passing it to getWrongQuestions, using the same
empty-collection fallback as savedIds. Preserve the existing getWrongQuestions
behavior for populated wrongIds.
In `@src/screens/Quiz.jsx`:
- Around line 92-93: Update the exit button label in Quiz’s button rendering to
distinguish mixed practice from review and saved-practice modes: show “回首頁” only
when onExit navigates to home, and show “返回筆記” when it navigates to notes. Do
not use the combined skipsLevelProgress condition for this label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f02391-0259-4b8e-8718-d6048dd6e825

📥 Commits

Reviewing files that changed from the base of the PR and between 98de66e and 40712a3.

📒 Files selected for processing (27)
  • docs/roadmap.md
  • src/App.jsx
  • src/components/Icons.jsx
  • src/components/Navbar.jsx
  • src/components/QuestionCard.jsx
  • src/components/QuestionReview.jsx
  • src/data/chapters.js
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-3-async-basics.json
  • src/data/questions/jsa-4-async-await.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/react-1-jsx.json
  • src/data/typeMeta.js
  • src/hooks/useProgress.js
  • src/index.css
  • src/screens/ChapterMap.jsx
  • src/screens/Home.jsx
  • src/screens/Notes.jsx
  • src/screens/Profile.jsx
  • src/screens/QuestionBook.jsx
  • src/screens/Quiz.jsx
  • src/screens/Stats.jsx
  • src/utils/quiz.js
✅ Files skipped from review due to trivial changes (1)
  • src/data/questions/jsa-3-async-basics.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/utils/quiz.js
  • src/data/questions/jsa-9-promises-advanced.json
  • src/data/questions/jsb-2-functions.json
  • src/data/questions/jsa-5-classes.json
  • src/data/questions/react-1-jsx.json
  • src/data/questions/jsa-1-this-scope.json
  • src/data/questions/jsa-2-closures.json
  • src/data/questions/jsa-8-iterators-generators.json
  • src/data/questions/jsa-4-async-await.json

Comment threaddocs/roadmap.md Outdated
- 錯題本改成 Leitner 盒制:`wrongIds[id] = { count, lastWrong, box }`,答錯重置回第 1 盒、答對升一盒,
超過 `GRADUATE_BOX`(=3)才真正畢業移出錯題本,不再是「碰巧對一次就消失」
- 舊資料相容:`wrongIds` 舊格式是 `{ id: true }`,新增 `migrateWrongIds()` 在 `load()`/`importProgress()`
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

統一繁體字用字

此處的「就够」混用了簡體字,請改為「就夠」。

建議修改
- 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更+ 時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就够)的欄位變更
時把 boolean 轉成盒制物件——這是第一個需要真正 migration(非 shallow merge 就夠)的欄位變更
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/roadmap.md` at line 25, Update the wording in the roadmap text to
replace the simplified character in「就够」with the Traditional Chinese form「就夠」,
leaving the surrounding sentence unchanged.

Comment threadsrc/App.jsx
Comment threadsrc/components/Navbar.jsx
Comment threadsrc/index.css
Comment on lines +692 to +694
.icon-filled {
fill: currentColor;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix currentColor casing to satisfy Stylelint value-keyword-case rule.

Stylelint reports an error on line 693: CSS keyword values should be lowercase.

🎨 Proposed fix
 .icon-filled {
- fill: currentColor;+ fill: currentcolor;
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.icon-filled {
fill:currentColor;
}
.icon-filled {
fill:currentcolor;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 693-693: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/index.css` around lines 692 - 694, Update the fill declaration in
.icon-filled to use the lowercase CSS keyword required by Stylelint’s
value-keyword-case rule, while preserving the currentColor behavior.

Source: Linters/SAST tools

Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Notes.jsx Outdated
Comment threadsrc/screens/Quiz.jsx Outdated
@Retsomm
Retsomm merged commit e869ad4 into mainJul 11, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm