elemes/frontend
a2nr 02d5969619 refactor(quiz): restructure quiz session, question view, and tab safety
Restructure quiz flow into QuizSession primitive + atomic quiz state in
LessonManager, and extract QuizQuestionView for split-view display.

Tab-safety fix: add lesson-tabs.ts with pickDefaultTab(), getAvailableTabs()
mirroring the exact {#if} conditions in +page.svelte, and ensureActiveTab()
safety-net that falls back to pickDefaultTab() when the desired tab is not
rendered. A reactive $effect in lesson/[slug]/+page.svelte validates
activeTab against lesson data on every change, preventing the "tab quiz
kosong" (empty workspace) regression for quiz-only lessons and phantom-tab
state after data changes.

Files:
- lib/services/lesson-tabs.ts (+test): pure helpers, 18 tests pass
- lesson/[slug]/+page.svelte: ensureActiveTab reactive guard + QuizQuestionView
- lesson/[slug]/lesson.svelte.ts: atomic startQuiz, getExitStatus, idempotent
  submit on navigate/exit
- lib/services/quiz-session.ts (+test), lib/types/quiz.ts, QuizTab.svelte
  (mgr-driven), QuizQuestionView.svelte, lesson.css
- services/lesson_service.py, services/tests/test_lesson_service_quiz.py
  (test_lesson_service_quiz.py), requirements.txt (+pytest)
- docs/07-quiz-authoring.md
- version.ts APP_VERSION 21 -> 22 (forces SW update for the fix)
- examples/content/dasar/quiz_test.md synced to live content root
2026-08-01 00:14:29 +07:00
..
src refactor(quiz): restructure quiz session, question view, and tab safety 2026-08-01 00:14:29 +07:00
static feat(frontend): Velxio iframe fullscreen + playground route + SvelteKit service worker 2026-07-18 17:26:59 +07:00
.dockerignore refactor to make it better 2026-03-25 09:39:51 +07:00
Dockerfile feat(elemes): v3.1 checkpoint — BLE deployer enhancements before port to Velxio 2026-07-04 20:21:46 +07:00
package-lock.json feat(frontend): add vitest + ByteStreamBuffer FIFO for orphan-read fix 2026-07-19 19:03:40 +07:00
package.json feat(frontend): add vitest + ByteStreamBuffer FIFO for orphan-read fix 2026-07-19 19:03:40 +07:00
svelte.config.js update green check, button start, de-overwhelm +page, improve mobile ui, add progress page for teacher only, add sessionStorage. 2026-03-27 16:41:57 +07:00
tsconfig.json refactor to make it better 2026-03-25 09:39:51 +07:00
vite.config.ts feat: implement LaTeX support with KaTeX and python-markdown-math 2026-04-26 15:47:11 +07:00
vitest.config.ts feat(frontend): add vitest + ByteStreamBuffer FIFO for orphan-read fix 2026-07-19 19:03:40 +07:00