feat: turn M01 into an interactive learning lab - #6
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16fcbb1b7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const lessonState = ensureLabState(id); | ||
| lessonState.drillAnswers[drillId] = event.target.value; | ||
| const drill = lesson?.learningLab?.drills.find((item) => item.id === drillId); | ||
| const feedback = document.querySelector(`[data-lab-feedback="${drillId}"]`); | ||
| if (feedback && drill) feedback.outerHTML = renderLabFeedback(drill, event.target.value); | ||
| saveState(); |
There was a problem hiding this comment.
Persist reused drill answers where validation can read them
When a learner starts #/validation/m01, submits the baseline, and follows the provided lesson links, these reused drills save answers only under pm01-state-v1.lab. However, allDrillsAnswered() in m01-validation-app.js reads only pm01-validation-m01-v1.state.drills, so returning after completing both lessons still shows 0/2 drills and keeps the post-case locked. The learner must then answer the identical cases again after already seeing their feedback, which also invalidates the intended first-choice validation evidence; bridge the in-lesson first answers into the validation state or make the validation flow consume the canonical lab answers.
Useful? React with 👍 / 👎.
| ${done | ||
| ? `<a class="button primary" href="${next ? `#/lesson/${next.id}` : "#/course"}">${next ? "Продолжить к следующему уроку" : "Вернуться к программе"} →</a>` | ||
| : `<button class="button primary" id="complete-lesson" ${readiness.ready ? "" : "disabled"}>Завершить урок и продолжить →</button>`} |
There was a problem hiding this comment.
Enforce the lab gate for previously completed M01 lessons
On an upgraded browser where completed already contains an M01 lesson but the newly introduced lab state is empty, done is true while readiness.ready is false. This branch nevertheless replaces the disabled completion button with a direct link to the next lesson, so the new requirement that M01 completion include drill and workbook evidence is bypassed for every existing learner, even while the status says the required work is unfinished. Migrate or re-evaluate legacy M01 completion before selecting this done path.
Useful? React with 👍 / 👎.
| <header class="lab-intro"> | ||
| <p class="eyebrow">Learning Lab</p> | ||
| <h2>Навык урока</h2> | ||
| <p>${escapeHtml(lab.skill)}</p> | ||
| </header> |
There was a problem hiding this comment.
Present the cold decision before explaining the target skill
For both M01 lessons, this skill explanation is rendered before renderLabDrill(coldDrill, ...); for example, it tells the learner to distinguish a symptom from the project system immediately before asking which systemic response to choose. That primes the supposedly cold decision and prevents it from exposing the learner's initial misconception. Render the cold case first and defer the skill/thesis explanation until after the choice.
Useful? React with 👍 / 👎.
Goal
Replace M01's read-and-self-attest lesson pattern with a compact decision-training lab that teaches, checks, and transfers project-system diagnosis skills.
What changed
pm01-state-v1storage object underlabM01 techniques
Lesson 1 — Смотри на проект целиком
Lesson 2 — Сначала найди причину
TDD / verification
34068722023) failed after adding the new lab-data/readability contracts before implementationapp.jsimplementation34069073465) completed successfully on head16fcbb1b7d41a8e3f7e01f8fcdbaeb93d13033b734069116045) completed successfully for deploy4bfa595a54673f31937ebc2f1fd60ba0c0fbcd7bScope / safety
mainunchanged