Skip to content

feat(quiz): question, poll, and recall blocks for lessons - #167

Merged
vite-hub[bot] merged 16 commits into
mainfrom
feat/quiz
Oct 24, 2026
Merged

vite-hub[bot] merged 16 commits into
mainfrom
feat/quiz

Conversation

@onmax

@onmax onmax commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Adds comark-quiz: ::question, ::poll, and ::recall blocks for lessons that agents write as Markdown, in the spirit of Matt Pocock's teach skill. One parser (src/read.ts) and one HTML renderer draw all three, with an inlined script for checking, voting, and recall. Without the script, the options read as a plain list and the answer key, reasons, and explanation sit in a Show answer <details>.

  • Package: HTML-only, like annotate. The preset doesn't require Vue, React, or Svelte renderers, and the blocks need the script.
  • Wiring: preset (HTML), comark-linter (rules COMARK4001–COMARK4016, a Doctor page each), packageOrder (Docs blocks, after steps), the .cqz frame lists in docs/style.css, AGENTS.md (bullet and the cqz prefix), and the README.
  • Docs: overview, getting started (with the host contract), syntax, theming, and a "Lessons" guide that combines quiz blocks with :cite, steps, and a callout.

Syntax

::question{#event-loop-order}
Which callback runs first once the current script ends?

- [x] A resolved promise's `then` callback
  > Promise callbacks are microtasks. :cite[1]
- [ ] A `setTimeout(fn, 0)` callback
  > A timer queues a task, which waits for the microtasks.

#hint
Two queues are involved.

#explain
After every task, the event loop empties the microtask queue.
::

::poll{#next-lesson closes="2026-11-30"}
What should the next lesson cover?

- [ ] Web Workers
- [ ] Streams
::

::recall{#why-microtasks}
Why does a promise callback run before a zero-delay timer?

#answer
Promise callbacks are microtasks, and a timer's callback is a task.
::
  • Options: one [x] gives radios; several, or multiple, give checkboxes.
  • Order and keys: a question's options are shuffled with a seed from its id and option keys, so every reader and the no-script view see one order, whatever order the author wrote. Each option's key is a hash of its text.
  • Ids: a missing #id falls back to a hash of the prompt and options, never the block's position.
  • Numbering: questions and recall cards share one counter; number="false" leaves a block out. Polls aren't numbered.
  • Verdict: the status line under the options says it once, with the count when results show ("Correct · 611 answers"). Rows carry only "Your answer" on a wrong pick, or "Correct answer" once the answer is shown; a right pick has its icon and tint. Check is never disabled: with nothing selected it says "Select an answer" (selectAnswer label).
  • Props and slots: shuffle="false" keeps the written order. Polls take multiple and closes. Slots are #hint and #explain on a question, and #answer on a recall card.

Host contract

  • Answer: comark-quiz:answer bubbles and is composed, with detail { id, kind, choice, correct, first }.
    • A question fires on every Check, and on Show answer with choice: [] and correct: false.
    • A poll fires on every vote change, with correct: null.
    • A recall card fires ["revealed"] with correct: null, then ["knew"] (true) or ["missed"] (false).
  • Ready: comark-quiz:ready fires on document with { ids } once the page's blocks are in, and again for blocks added later.
  • State: comark-quiz:state on document, or window.__comarkQuiz.apply(state), takes { answers?, results?, voting? }.
    • It applies at any time, and restored answers and results land with no motion.
    • An empty choice takes an answer back, except a question's choice: [] with correct: false, which is a shown answer.
    • A later results for an id always replaces the earlier one.
    • With voting.open === false, polls show voting.notice and fire nothing. Questions and recall cards still work.
  • Storage: with no host, answers persist in localStorage under comark-quiz:<pathname>:<id>, in try/catch. The first state from a host stops that, and replaces any answer that came from storage.
  • Loading: each block ends with <template class="cqz-end">, and while the page loads the script reads a block only once that marker is in, so a long page the browser receives in pieces never loses options, reasons, or a recall answer.
  • Markup: the server HTML carries data-quiz-id and data-quiz-kind on each root, and data-key on each option, plus data-correct on a question's right options. The no-script answer key uses data-for, so each option appears once. A block nested in another renders as plain content, and is reported.

Screenshots

Captured with Playwright at 2x and checked one by one; they're local, not attached:

  • Question: question-idle, -select-prompt, -selected, -hint, -correct, -incorrect, -revealed, -results, -multiple, -noscript, -focus
  • Poll: poll-nohost, -before, -voted, -closed
  • Recall: recall-blurred, -revealed, -noscript, -focus
  • Dark mode: question-idle-dark, question-correct-dark, question-incorrect-dark, question-results-dark, question-revealed-dark, poll-voted-dark, poll-nohost-dark, recall-blurred-dark, recall-revealed-dark
  • Page-level --primary: oklch(0.6 0.2 30) and --background override: question-selected-primary, question-correct-primary, question-results-primary, poll-voted-primary, recall-revealed-primary
  • 390px wide: question-revealed-mobile, question-results-mobile, poll-voted-mobile, recall-blurred-mobile
  • Docs site: docs-overview, docs-overview-dark, docs-lesson, docs-lesson-recall, and landing-card-0 (the recall card's still on the landing canvas)

onmax added 4 commits October 24, 2026 13:31
::question checks a task-list answer and shows each option's > reason,
::poll collects votes through a host, and ::recall blurs its #answer
until the reader asks. Options are shuffled per question and keyed by
their text, ids are stable, and a host saves answers and sends results
through comark-quiz:answer, :ready, and :state. Reads without a script.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-24T12:18:24.852927Z 4770afc New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vite-hub

vite-hub Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request 449c1046-41b3-4a24-94d4-e3854114e681.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

Session

Fixed the required Doctor check failure by documenting the mutation-root type assertion safety invariant. Focused vite-doctor validation now reports zero warnings or errors; diff checks pass. Historical Pullfrog P1 findings are resolved, with no remaining actionable review findings. Awaiting current-head checks.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 741d84a 2026-10-24T15:12:59.426Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 6889ab5 2026-10-24T15:01:41.727Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 89a06d2 2026-10-24T14:50:51.248Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 8aca6e0 2026-10-24T14:35:11.936Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 99f9c85 2026-10-24T14:21:44.096Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ b5688d8 2026-10-24T13:15:12.678Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 6c159b2 2026-10-24T13:00:39.275Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 0497150 2026-10-24T12:47:41.091Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 6b35984 2026-10-24T12:36:36.742Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 4770afc 2026-10-24T12:23:02.379Z Visit the dashboard ↗

View all previews: View all previews ↗

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6d56e4de6

ℹ️ 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".

Comment thread packages/quiz/src/read.ts Resolved

@pullfrog pullfrog 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.

Caution

This PR introduces an HTML injection path in the quiz runtime: configurable labels are reconstructed from the DOM and written through innerHTML without escaping. A tenant-controlled translation or other untrusted label value can execute script when a question is graded.

Reviewed changes

  • Quiz parsing — Reviewed prompt, task-list option, rationale, slot, id, ordering, numbering, validation, and normalized-node behavior in packages/quiz/src/read.ts.
  • HTML rendering — Reviewed no-script disclosures, runtime/style inlining, host-facing data attributes, and label serialization in packages/quiz/src/html.ts.
  • Browser runtime — Reviewed question checking, poll voting, recall grading, persistence, host state/results, dynamic blocks, accessibility state, and event contracts in packages/quiz/src/script.ts.
  • Integration and coverage — Reviewed preset/linter/Doctor/docs wiring, package metadata, unit tests, and Playwright coverage.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/quiz/src/script.ts Resolved

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

This incremental review covered the changes since the prior Pullfrog review: hardened duplicate-ID reporting, moved configurable status labels to DOM text, and corrected the documented usage example.

  • Hardened duplicate detection — Reports collisions for generated fallback IDs as well as explicit IDs, preventing answer state from being shared silently by identical anonymous blocks.
  • Closed the label injection path — Kept the static icon markup while assigning configurable status labels with textContent, so translations render as text.
  • Corrected usage documentation — Added the missing ::usage wrapper around the standalone renderer example.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

This incremental review covered the changes since the prior Pullfrog review: the runtime status-message ternary was reformatted for consistent indentation. The full PR diff and prior Pullfrog feedback were also rechecked for context, and the previously reported label-injection concern remains addressed.

  • Reformatted runtime expression — Corrected indentation in the status-message conditional without changing its behavior.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

… only once it's whole

The status line says Correct or Not quite with the count of answers;
rows say only Your answer or Correct answer. Check asks for an answer
instead of looking disabled. Results hide every unmarked indicator. The
blurred recall answer gets room for its blur, and the script waits for
each block's end marker, so a page parsed in pieces keeps its answers.

@pullfrog pullfrog 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.

Important

Dynamically inserted quiz blocks can still be initialized before their markup is complete after DOMContentLoaded, so the new streaming guard does not cover the documented “blocks added later” path.

Reviewed changes

This incremental review covered the changes since the prior Pullfrog review: revised question verdict/status presentation, an always-enabled Check action, end markers for streamed HTML, and the new partial-response e2e coverage.

  • Revised grading feedback — Moved the question verdict into the status line, reduced per-option labels, and kept Check actionable when no option is selected.
  • Added streamed-block boundaries — Added a final cqz-end template and initial-load handling so blocks received in pieces are upgraded only after their complete markup arrives.
  • Expanded runtime coverage — Added an HTTP streaming test and updated the quiz documentation and styles for the new status and loading behavior.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/quiz/src/script.ts Resolved
@pkg-pr-new

pkg-pr-new Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@167

comark-badge

pnpm add https://pkg.pr.new/comark-badge@167

comark-cards

pnpm add https://pkg.pr.new/comark-cards@167

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@167

comark-cast

pnpm add https://pkg.pr.new/comark-cast@167

comark-charts

pnpm add https://pkg.pr.new/comark-charts@167

comark-chips

pnpm add https://pkg.pr.new/comark-chips@167

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@167

comark-code

pnpm add https://pkg.pr.new/comark-code@167

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@167

comark-colors

pnpm add https://pkg.pr.new/comark-colors@167

comark-critic

pnpm add https://pkg.pr.new/comark-critic@167

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@167

comark-details

pnpm add https://pkg.pr.new/comark-details@167

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@167

comark-diff

pnpm add https://pkg.pr.new/comark-diff@167

comark-embed

pnpm add https://pkg.pr.new/comark-embed@167

comark-fields

pnpm add https://pkg.pr.new/comark-fields@167

comark-figure

pnpm add https://pkg.pr.new/comark-figure@167

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@167

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@167

comark-github

pnpm add https://pkg.pr.new/comark-github@167

comark-icon

pnpm add https://pkg.pr.new/comark-icon@167

comark-include

pnpm add https://pkg.pr.new/comark-include@167

comark-keys

pnpm add https://pkg.pr.new/comark-keys@167

comark-links

pnpm add https://pkg.pr.new/comark-links@167

comark-linter

pnpm add https://pkg.pr.new/comark-linter@167

comark-mark

pnpm add https://pkg.pr.new/comark-mark@167

comark-media

pnpm add https://pkg.pr.new/comark-media@167

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@167

comark-outline

pnpm add https://pkg.pr.new/comark-outline@167

@onmax/comark

pnpm add https://pkg.pr.new/@onmax/comark@167

comark-properties

pnpm add https://pkg.pr.new/comark-properties@167

comark-qr

pnpm add https://pkg.pr.new/comark-qr@167

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@167

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@167

comark-sources

pnpm add https://pkg.pr.new/comark-sources@167

comark-steps

pnpm add https://pkg.pr.new/comark-steps@167

comark-table

pnpm add https://pkg.pr.new/comark-table@167

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@167

comark-tests

pnpm add https://pkg.pr.new/comark-tests@167

comark-xref

pnpm add https://pkg.pr.new/comark-xref@167

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@167

commit: 741d84a

@pullfrog pullfrog 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.

Important

Dynamically added quiz blocks without the renderer's end marker are now left permanently inert after page load, so the documented “blocks added later” integration path still regresses.

Reviewed changes

This incremental review covered the changes since the prior Pullfrog review: applying the completion gate consistently during the initial scan, and adjusting the scan API so streamed blocks wait for their cqz-end marker.

  • Applied completion gating — Updated setup() and scan() so incomplete roots are deferred during initial document processing and marker-triggered rescans.
  • Preserved streamed rendering — Kept the final cqz-end marker as the boundary used by the supplied HTML renderer and retained the partial-response coverage.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/quiz/src/script.ts Resolved

@pullfrog pullfrog 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.

Important

Markerless polls appended after the one-time ready scan remain inert, so the documented dynamic-block path is still incomplete.

Reviewed changes

This incremental review covered the net changes since the prior Pullfrog review: the agent reference registration and the runtime's new completion heuristic for markerless dynamic roots.

  • Registered the quiz reference — Added the comark-quiz reference to the agent skill and documented its standalone registration.
  • Recognized complete dynamic roots — Added a structural fallback for renderers that append complete question and recall roots without template.cqz-end, while retaining marker-based streamed initialization.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/quiz/src/script.ts Resolved

@pullfrog pullfrog 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.

Important

Markerless questions can still be initialized before their complete interactive markup arrives, leaving dynamically appended questions permanently incomplete.

Reviewed changes

This incremental review covered the completion heuristic added since the prior Pullfrog review, including the new poll and recall structural checks for markerless dynamic roots.

  • Extended markerless completion detection — Added poll-specific options/footer checks and recall-specific actions/answer checks while retaining the end-marker path for streamed roots.
  • Updated quiz integration context — Rechecked the runtime's mutation-observer setup and the existing dynamic and streamed rendering contract against the new heuristic.

⚠️ Markerless questions can be initialized too early

The markerless question predicate is satisfied as soon as the root has a direct .cqz-options, but the mutation observer can see that fieldset before the question's .cqz-actions and remaining option markup arrive. setup() then snapshots the partial model and models.has(el) prevents the later mutations from retrying it, so a renderer that appends a markerless question incrementally can leave it without Check/reveal controls or with missing options.

Technical details
# Defer incomplete markerless questions

## Affected sites
- `packages/quiz/src/script.ts:430-436` — the question completion predicate accepts a root with only `.cqz-options`.
- `packages/quiz/src/script.ts:493-501` — the mutation observer scans each added node immediately.
- `packages/quiz/src/script.ts:467-484` — setup caches the model and snapshots the current controls and options, preventing recovery.

## Required outcome
- Markerless questions appended incrementally must initialize only after all interactive children are present, or incomplete roots must remain retryable until they are complete.
- Complete markerless questions appended in one operation must still initialize and emit `comark-quiz:ready`.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub

vite-hub Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Addressed Pullfrog P1: markerless question roots now require both the options fieldset and direct actions before setup, so incremental insertion cannot initialize before its controls are present. The required formatting check also passes for packages/quiz/src/script.ts.

@pullfrog pullfrog 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.

Important

Markerless questions can still be initialized before their option rows are complete, so the documented dynamic-block path remains unreliable.

Reviewed changes

This incremental review covered the completion predicate change since the prior Pullfrog review, along with the full PR diff and the prior runtime feedback.

  • Narrowed question completion — Required both the options container and actions before initializing a markerless question, while retaining the poll and recall-specific checks.
  • Retained dynamic scanning — Kept the mutation observer's direct-root scan and the end-marker path for streamed HTML.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/quiz/src/script.ts Resolved

@pullfrog pullfrog 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.

Important

Markerless questions can still be initialized from a partial option list, so the documented dynamic-block path remains unreliable.

Reviewed changes This incremental review covered the completion predicate change since the prior Pullfrog review, with the full PR diff and prior runtime feedback rechecked for context.

  • Required an option row — Changed markerless poll and question detection to wait for at least one direct option row instead of only the options container.
  • Retained marker boundaries — Kept template.cqz-end as the authoritative completion signal for the renderer's streamed HTML while preserving structural fallbacks for markerless roots.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/quiz/src/script.ts Resolved

@pullfrog pullfrog 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.

Important

Markerless questions can still be initialized from a partial option list, so the documented dynamic-block path remains unreliable.

Reviewed changes

This incremental review covered the changes since the prior Pullfrog review: deferring markerless roots until the initial document settles and coalescing mutation-driven setup attempts.

  • Deferred markerless roots — Added an initial-load gate so markerless blocks are not read while the document is still being assembled.
  • Coalesced dynamic scans — Batched mutation-triggered setup with a zero-delay timer while preserving the explicit cqz-end marker path for streamed HTML.

Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:

  • packages/quiz/src/script.ts:3042 (RIGHT) — line 3042 (RIGHT) is not inside a diff hunk

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit 5709405 into main Oct 24, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
onmax added a commit that referenced this pull request Oct 24, 2026
Main gained the quiz package (#167), search keywords (#159), and the rename to comark-ui (#169). This
branch folds each package's docs into one page, so quiz's five pages become packages/quiz/docs/index.md,
and the preset's keywords move to Getting started. The redirect worker keeps both moves: old hosts go to
comark-ui.onmax.me, and old per-topic pages to each package's page.
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
@onmax
onmax deleted the feat/quiz branch November 1, 2026 11:04
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