Skip to content

新增函數式思考(Grokking Simplicity)練習題主題,並支援概念型題目 - #18

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 15, 2026
Merged

Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@Retsomm Retsomm commented Jul 15, 2026 •

Copy link
Copy Markdown
Owner

新增 concept 題型讓不適合寫成可執行程式碼的設計思考題也能進測驗系統,
19 章共 111 題盡量以具體程式碼/情境取代抽象定義背誦,可執行片段皆已用
node 實際驗證輸出。

Summary by CodeRabbit

  • New Features
    • Added the Grokking Simplicity functional programming chapter with 19 lessons and extensive Chinese-language exercises.
    • Introduced concept questions with explanations, multiple-choice answers, and verification guidance.
    • Added coverage of functional design, immutability, higher-order functions, array tools, asynchronous coordination, reactive architecture, and more.
  • Bug Fixes
    • Code examples now appear only when a question includes code, improving question presentation.
  • Documentation
    • Added a structured practice guide covering the book’s exercises and recommended study approach.

新增 concept 題型讓不適合寫成可執行程式碼的設計思考題也能進測驗系統,
19 章共 111 題盡量以具體程式碼/情境取代抽象定義背誦,可執行片段皆已用
node 實際驗證輸出。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
easy-learn Ready Ready Preview, Comment Jul 15, 2026 8:11am

@coderabbitai

coderabbitai Bot commented Jul 15, 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: 39 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: d22c3f1f-f720-4b40-b648-9b2de03e300f

📥 Commits

Reviewing files that changed from the base of the PR and between 9d22ee7 and 576035e.

📒 Files selected for processing (2)
  • apps/web/src/components/QuestionCard.tsx
  • grokking-simplicity-練習題.md
📝 Walkthrough

Walkthrough

Adds 19 Grokking Simplicity question sets, introduces the concept question type, registers a new FP chapter, validates concept documentation fields, and prevents empty code blocks from rendering.

Changes

Functional programming curriculum

Layer / File(s) Summary
Question contracts and rendering
packages/core/src/types.ts, packages/core/src/data/typeMeta.ts, apps/web/scripts/validate-questions.mjs, apps/web/src/components/QuestionCard.tsx
Adds concept support to question types, metadata, validation, and conditional code rendering.
Foundational FP lessons
packages/core/src/data/questions/fp-{1..6}-*.json
Adds question datasets for introductory FP concepts, actions, calculations, and copy-on-write.
Design and function lessons
packages/core/src/data/questions/fp-{7..12}-*.json
Adds lessons covering defensive copying, stratified design, first-class functions, and array tools.
Advanced FP lessons
packages/core/src/data/questions/fp-{13..19}-*.json
Adds lessons covering chaining, nested data, timelines, resource sharing, coordination, reactive architecture, and future topics.
FP chapter registration
packages/core/src/data/chapters.ts
Registers the imported FP datasets as a new fp chapter.
Exercise reference
grokking-simplicity-練習題.md
Adds a Chinese exercise reference for chapters 1–19.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 標題準確概括了新增 Grokking Simplicity 練習題主題與支援 concept 題型兩個主要變更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check 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.

@coderabbitai coderabbitai Bot 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: 3

🤖 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 `@apps/web/scripts/validate-questions.mjs`:
- Around line 60-69: Update the documentation link rendering in QuestionCard so
the anchor is included only when question.docs is truthy. Preserve the existing
link attributes and contents for questions with documentation, while rendering
no link for concept questions with an empty docs value.

In `@grokking-simplicity-練習題.md`:
- Around line 78-80: 修正第 4 題對 defensive copying
的描述,避免暗示答案一律是「深拷貝」。請在題幹明確指定資料包含可變巢狀結構,或新增「視資料結構與修改範圍而定」選項,並讓選項與答案反映此條件。
- Around line 180-183: 補充 Queue、Queue(worker)、DroppingQueue(max, worker) 與 Cut
練習的非同步 API 契約,明確指定 worker(task) 回傳 Promise<void>(或定義實際結果型別)、任務完成判定與錯誤回報方式;說明
worker 失敗後佇列是否繼續處理後續任務,並定義 Cut 各條時間線如何收集與傳遞結果,避免並行執行、永久等待或吞錯。
🪄 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: 28248ff4-9e72-4d98-9ad8-1dca597fe84d

📥 Commits

Reviewing files that changed from the base of the PR and between f0eafda and 9d22ee7.

📒 Files selected for processing (25)
  • apps/web/scripts/validate-questions.mjs
  • apps/web/src/components/QuestionCard.tsx
  • grokking-simplicity-練習題.md
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/fp-1-welcome.json
  • packages/core/src/data/questions/fp-10-first-class-functions-1.json
  • packages/core/src/data/questions/fp-11-first-class-functions-2.json
  • packages/core/src/data/questions/fp-12-array-tools.json
  • packages/core/src/data/questions/fp-13-chaining.json
  • packages/core/src/data/questions/fp-14-nested-data.json
  • packages/core/src/data/questions/fp-15-timeline-diagrams.json
  • packages/core/src/data/questions/fp-16-sharing-resources.json
  • packages/core/src/data/questions/fp-17-coordinating-timelines.json
  • packages/core/src/data/questions/fp-18-reactive-onion.json
  • packages/core/src/data/questions/fp-19-road-ahead.json
  • packages/core/src/data/questions/fp-2-overview.json
  • packages/core/src/data/questions/fp-3-actions-calculations-data.json
  • packages/core/src/data/questions/fp-4-extract-calculations.json
  • packages/core/src/data/questions/fp-5-improve-actions.json
  • packages/core/src/data/questions/fp-6-copy-on-write.json
  • packages/core/src/data/questions/fp-7-defensive-copying.json
  • packages/core/src/data/questions/fp-8-stratified-design-1.json
  • packages/core/src/data/questions/fp-9-stratified-design-2.json
  • packages/core/src/data/typeMeta.ts
  • packages/core/src/types.ts

Comment thread apps/web/scripts/validate-questions.mjs
Comment thread grokking-simplicity-練習題.md Outdated
Comment thread grokking-simplicity-練習題.md Outdated
- QuestionCard.tsx:延伸閱讀連結加上 docs 存在時才渲染的判斷,比照 mobile 版行為
- Ch7 Q4:defensive copying 題目補上可變巢狀結構的前提,避免暗示答案一律是深拷貝
- Ch16/17:Queue、Queue(worker)、DroppingQueue、Cut 練習補上非同步契約,明確任務完成/失敗與結果收集方式

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit 67ce545 into main Jul 15, 2026
3 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 27, 2026
Merged

This branch was successfully deployed

1 active deployment
Preview — 576035e9 Deployed Jul 15, 2026 by vercel[bot]
Sign up for free to 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