Repository navigation
Add concept quizzes and silence MDX build warnings - #4
Conversation
Quizzes can be JSON in content/quizzes or written in the browser. Astro 7.3 still emits a head-inject directive Rolldown warns about; propagation already uses the module id, so the build strips that leftover line. Co-authored-by: Jon Marien <jon@chron0.tech>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Important
Two correctness issues need a look before merging: the editor can save the wrong answer when a choice box is left blank, and switching between browser-saved quizzes reuses the previous quiz's progress state.
Reviewed changes — reviewed the full diff for the quiz feature and the MDX warning fix.
- File-backed quizzes — new
quizzescontent collection with zod validation plus build-time checks for slug shape, distinct choices, answer bounds, and lesson-link existence. - Browser quiz flow — editor (
/quizzes/new) with write/import/download, hash-routed local player, index page merging repo quizzes withlocalStoragequizzes and scores. - Quiz player — per-question check/explain/next flow with score persistence and JSON download.
- MDX build warnings — Vite post-transform strips the leftover
use astro:head-injectdirective onastroPropagatedAssetsmodules only. - Nav and docs — header/footer quiz links, home/about copy, and README quiz authoring section.
Muse Spark Contributor (free) | 𝕏
Remap the answer index after empty choices are removed, reject a blank marked choice, reset the player when the hash changes, and ignore a malformed hash. Co-authored-by: Jon Marien <jon@chron0.tech>
There was a problem hiding this comment.
✅ No new issues found.
All four findings from the prior review are addressed cleanly by this delta.
Reviewed changes — reviewed commit
d87f1eeagainst the prior pullfrog review at2dc4dd9.
- Fixed editor answer mapping — blank choice boxes are now dropped with the marked index remapped, and a blank marked choice is rejected with a field-level error.
- Reset local player per quiz —
LocalQuizPlayernow mountsQuizPlayerwithkey={quiz.id}so switching hashes starts fresh.- Guarded hash decoding — malformed hashes fall back to the not-found state instead of throwing.
- Removed dead track guard — the unreachable
isQuizTrackcheck and helper are gone from the quizzes index.
Muse Spark Contributor (free) | 𝕏

Quizzes can be added on the desk, and the Vercel
use astro:head-injectwarnings are gone. This branch also includes the dark-mode navigation fix.Quizzes
/quizzeslists the checks that ship with the repo and any you save in this browser./quizzes/newwrites a quiz here, imports JSON, or downloads a file you can commit.content/quizzes/your-slug.json.bun run buildrejects a bad prompt, a duplicate choice, an answer index past the choices, or a lesson link that does not exist.Saving a quiz drops empty choice boxes and keeps the radio you marked. A blank marked choice is rejected. Opening another browser-saved quiz from the hash starts that quiz fresh, and a broken hash such as
#%shows the missing-quiz message.Build warnings
Astro 7.3.3 still emits
"use astro:head-inject"on every MDX propagation module. Head metadata in this version is already chosen from the?astroPropagatedAssetsmodule id, and Rolldown warns that it may drop the directive. The Vite config strips that leftover line. A production build no longer printsMODULE_LEVEL_DIRECTIVEfor the lesson files. The upstream removal is in withastro/astro#17095 and is not in the published 7.3.3 release yet.Theme
Moving between pages keeps the saved dark or light choice. That change is the parent commit, also opened as #3.
Checks
bun run buildproduced 78 pages with noastro:head-injectwarnings.bun run lintpassed.#alpha-checkto#beta-checkclears the previous result,#%shows the missing-quiz message, and/quizzesstill lists both file quizzes.